Skip to content

Commit 760c0bd

Browse files
committed
Added small timeouts to account for possibly slow window movement
1 parent 1309463 commit 760c0bd

File tree

1 file changed

+6
-4
lines changed
  • e2e/tests/packages/window-integration-tests

1 file changed

+6
-4
lines changed

e2e/tests/packages/window-integration-tests/test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import {sleep} from "../../../../lib/sleep.function";
2-
31
const Application = require("spectron").Application;
42
const electronPath = require("electron");
53
const {getActiveWindow, getWindows} = require("@nut-tree/nut-js");
6-
const { POS_X, POS_Y, WIDTH, HEIGTH, TITLE } = require("./constants");
7-
const { join } = require("path");
4+
const {POS_X, POS_Y, WIDTH, HEIGTH, TITLE} = require("./constants");
5+
const {join} = require("path");
6+
7+
const sleep = async (ms) => {
8+
return new Promise(resolve => setTimeout(resolve, ms));
9+
};
810

911
let app;
1012
const APP_TIMEOUT = 10000;

0 commit comments

Comments
 (0)