Added small timeouts to account for possibly slow window movement

This commit is contained in:
Simon Hofmann
2021-01-06 22:51:54 +01:00
parent 1309463056
commit 760c0bd2bc
@@ -1,10 +1,12 @@
import {sleep} from "../../../../lib/sleep.function";
const Application = require("spectron").Application;
const electronPath = require("electron");
const {getActiveWindow, getWindows} = require("@nut-tree/nut-js");
const { POS_X, POS_Y, WIDTH, HEIGTH, TITLE } = require("./constants");
const { join } = require("path");
const {POS_X, POS_Y, WIDTH, HEIGTH, TITLE} = require("./constants");
const {join} = require("path");
const sleep = async (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
};
let app;
const APP_TIMEOUT = 10000;