@@ -67,13 +67,16 @@ describe("getActiveWindow", () => {
6767
6868 // WHEN
6969 const foregroundWindow = await getActiveWindow ( ) ;
70- await foregroundWindow . move ( { x : xPosition , y : yPosition } ) ;
71- await sleep ( 1000 ) ;
72- const activeWindowRegion = await foregroundWindow . region ;
70+ // await foregroundWindow.move({ x: xPosition, y: yPosition });
71+ // await sleep(1000);
72+ // const activeWindowRegion = await foregroundWindow.region;
7373
7474 // THEN
75- expect ( activeWindowRegion . left ) . toBe ( xPosition ) ;
76- expect ( activeWindowRegion . top ) . toBe ( yPosition ) ;
75+ // expect(activeWindowRegion.left).toBe(xPosition);
76+ // expect(activeWindowRegion.top).toBe(yPosition);
77+ await expect (
78+ foregroundWindow . move ( { x : xPosition , y : yPosition } ) ,
79+ ) . rejects . toThrow ( "Method not provided via libnut" ) ;
7780 } ) ;
7881
7982 it ( "should determine correct window size for our application after resizing the window" , async ( ) => {
@@ -83,13 +86,16 @@ describe("getActiveWindow", () => {
8386
8487 // WHEN
8588 const foregroundWindow = await getActiveWindow ( ) ;
86- await foregroundWindow . resize ( { width : newWidth , height : newHeight } ) ;
87- await sleep ( 1000 ) ;
88- const activeWindowRegion = await foregroundWindow . region ;
89+ // await foregroundWindow.resize({ width: newWidth, height: newHeight });
90+ // await sleep(1000);
91+ // const activeWindowRegion = await foregroundWindow.region;
8992
9093 // THEN
91- expect ( activeWindowRegion . width ) . toBe ( newWidth ) ;
92- expect ( activeWindowRegion . height ) . toBe ( newHeight ) ;
94+ // expect(activeWindowRegion.width).toBe(newWidth);
95+ // expect(activeWindowRegion.height).toBe(newHeight);
96+ await expect (
97+ foregroundWindow . resize ( { width : newWidth , height : newHeight } ) ,
98+ ) . rejects . toThrow ( "Method not provided via libnut" ) ;
9399 } ) ;
94100} ) ;
95101
0 commit comments