Skip to content

Commit

Permalink
(NT-67) Update E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Feb 11, 2024
1 parent 44d1f2f commit aa4c098
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions e2e/window-test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ describe("getActiveWindow", () => {

// WHEN
const foregroundWindow = await getActiveWindow();
await foregroundWindow.move({ x: xPosition, y: yPosition });
await sleep(1000);
const activeWindowRegion = await foregroundWindow.region;
// await foregroundWindow.move({ x: xPosition, y: yPosition });
// await sleep(1000);
// const activeWindowRegion = await foregroundWindow.region;

// THEN
expect(activeWindowRegion.left).toBe(xPosition);
expect(activeWindowRegion.top).toBe(yPosition);
// expect(activeWindowRegion.left).toBe(xPosition);
// expect(activeWindowRegion.top).toBe(yPosition);
await expect(
foregroundWindow.move({ x: xPosition, y: yPosition }),
).rejects.toThrow("Method not provided via libnut");
});

it("should determine correct window size for our application after resizing the window", async () => {
Expand All @@ -83,13 +86,16 @@ describe("getActiveWindow", () => {

// WHEN
const foregroundWindow = await getActiveWindow();
await foregroundWindow.resize({ width: newWidth, height: newHeight });
await sleep(1000);
const activeWindowRegion = await foregroundWindow.region;
// await foregroundWindow.resize({ width: newWidth, height: newHeight });
// await sleep(1000);
// const activeWindowRegion = await foregroundWindow.region;

// THEN
expect(activeWindowRegion.width).toBe(newWidth);
expect(activeWindowRegion.height).toBe(newHeight);
// expect(activeWindowRegion.width).toBe(newWidth);
// expect(activeWindowRegion.height).toBe(newHeight);
await expect(
foregroundWindow.resize({ width: newWidth, height: newHeight }),
).rejects.toThrow("Method not provided via libnut");
});
});

Expand Down

0 comments on commit aa4c098

Please sign in to comment.