File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
e2e/tests/packages/window-integration-tests Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { sleep } from "../../../../lib/sleep.function" ;
2
+
1
3
const Application = require ( "spectron" ) . Application ;
2
4
const electronPath = require ( "electron" ) ;
3
5
const { getActiveWindow, getWindows} = require ( "@nut-tree/nut-js" ) ;
@@ -65,6 +67,7 @@ describe("getActiveWindow", () => {
65
67
const xPosition = 42 ;
66
68
const yPosition = 23 ;
67
69
await app . browserWindow . setPosition ( xPosition , yPosition ) ;
70
+ await sleep ( 1000 ) ;
68
71
69
72
// WHEN
70
73
const foregroundWindow = await getActiveWindow ( ) ;
@@ -80,6 +83,7 @@ describe("getActiveWindow", () => {
80
83
const newWidth = 400 ;
81
84
const newHeight = 350 ;
82
85
await app . browserWindow . setSize ( newWidth , newHeight ) ;
86
+ await sleep ( 1000 ) ;
83
87
84
88
// WHEN
85
89
const foregroundWindow = await getActiveWindow ( ) ;
You can’t perform that action at this time.
0 commit comments