Skip to content

Commit 785e5b9

Browse files
committed
(#17) Updated test to focus our Electron window due to problems with additional batch windows on Windows
1 parent c3dced4 commit 785e5b9

File tree

1 file changed

+6
-4
lines changed
  • test/window-integration-tests

1 file changed

+6
-4
lines changed

test/window-integration-tests/test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ const { POS_X, POS_Y, WIDTH, HEIGTH, TITLE } = require("./constants");
66
let app;
77
const APP_TIMEOUT = 10000;
88

9-
beforeEach(() => {
9+
beforeAll(async () => {
1010
app = new Application({
1111
path: electronPath,
1212
args: ['main.js'],
1313
startTimeout: APP_TIMEOUT,
1414
waitTimeout: APP_TIMEOUT,
1515
});
16-
return app.start();
16+
await app.start();
17+
await app.browserWindow.setAlwaysOnTop(true);
18+
await app.browserWindow.focus();
1719
});
1820

1921
describe("getWindows", () => {
@@ -55,8 +57,8 @@ describe("getActiveWindow", () => {
5557
});
5658
});
5759

58-
afterEach(() => {
60+
afterAll(async () => {
5961
if (app && app.isRunning()) {
60-
return app.stop();
62+
await app.stop();
6163
}
6264
});

0 commit comments

Comments
 (0)