Skip to content

Commit 0d5ed99

Browse files
committed
(#18) Updated tests to use new functions for resizing and moving of windows
1 parent b3be979 commit 0d5ed99

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

test/window-integration-tests/test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ describe("getActiveWindow", () => {
6767
// GIVEN
6868
const xPosition = 42;
6969
const yPosition = 25;
70-
await app.browserWindow.setPosition(xPosition, yPosition);
71-
await sleep(1000);
7270

7371
// WHEN
7472
const activeWindowHandle = libnut.getActiveWindow();
73+
libnut.moveWindow(activeWindowHandle, { x: xPosition, y: yPosition });
74+
await sleep(1000);
7575
const activeWindowRect = libnut.getWindowRect(activeWindowHandle);
7676

7777
// THEN
@@ -83,11 +83,11 @@ describe("getActiveWindow", () => {
8383
// GIVEN
8484
const newWidth = 400;
8585
const newHeight = 250;
86-
await app.browserWindow.setSize(newWidth, newHeight);
87-
await sleep(1000);
8886

8987
// WHEN
9088
const activeWindowHandle = libnut.getActiveWindow();
89+
libnut.resizeWindow(activeWindowHandle, { width: newWidth, height: newHeight });
90+
await sleep(1000);
9191
const activeWindowRect = libnut.getWindowRect(activeWindowHandle);
9292

9393
// THEN

0 commit comments

Comments
 (0)