Skip to content

Commit e2352ac

Browse files
committed
(#5) Updated E2E test to renamed API
1 parent e594cb7 commit e2352ac

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

Diff for: e2e/tests/packages/window-integration-tests/test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Application = require("spectron").Application;
22
const electronPath = require("electron");
3-
const {activeWindow, windows} = require("@nut-tree/nut-js");
3+
const {getActiveWindow, getWindows} = require("@nut-tree/nut-js");
44
const { POS_X, POS_Y, WIDTH, HEIGTH, TITLE } = require("./constants");
55
const { join } = require("path");
66

@@ -24,7 +24,7 @@ beforeAll(async () => {
2424
describe("getWindows", () => {
2525
it("should list our started application window", async () => {
2626
// GIVEN
27-
const openWindows = await windows();
27+
const openWindows = await getWindows();
2828

2929
// WHEN
3030
const windowNames = await Promise.all(openWindows.map((wnd) => wnd.title));
@@ -39,7 +39,7 @@ describe("getActiveWindow", () => {
3939
// GIVEN
4040

4141
// WHEN
42-
const foregroundWindow = await activeWindow();
42+
const foregroundWindow = await getActiveWindow();
4343
const windowTitle = await foregroundWindow.title;
4444

4545
// THEN
@@ -50,7 +50,7 @@ describe("getActiveWindow", () => {
5050
// GIVEN
5151

5252
// WHEN
53-
const foregroundWindow = await activeWindow();
53+
const foregroundWindow = await getActiveWindow();
5454
const activeWindowRegion = await foregroundWindow.region;
5555

5656
// THEN
@@ -67,7 +67,7 @@ describe("getActiveWindow", () => {
6767
await app.browserWindow.setPosition(xPosition, yPosition);
6868

6969
// WHEN
70-
const foregroundWindow = await activeWindow();
70+
const foregroundWindow = await getActiveWindow();
7171
const activeWindowRegion = await foregroundWindow.region;
7272

7373
// THEN
@@ -82,7 +82,7 @@ describe("getActiveWindow", () => {
8282
await app.browserWindow.setSize(newWidth, newHeight);
8383

8484
// WHEN
85-
const foregroundWindow = await activeWindow();
85+
const foregroundWindow = await getActiveWindow();
8686
const activeWindowRegion = await foregroundWindow.region;
8787

8888
// THEN

0 commit comments

Comments
 (0)