Skip to content

Commit df95713

Browse files
committed
Restructure e2e tests
1 parent 192467a commit df95713

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.e2e.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ const close = async () => {
4141
await mouse.leftClick();
4242
};
4343

44-
describe("E2E screen test", () => {
44+
describe("E2E tests", () => {
45+
afterEach(async () => {
46+
await keyboard.type(Key.LeftControl, Key.LeftAlt, Key.Left);
47+
});
48+
4549
it("should throw on invalid images", async () => {
4650
jest.setTimeout(30000);
4751
await expect(screen.find("mouse.png")).rejects.toContain("Failed to load image");
4852
});
49-
});
5053

51-
describe("E2E demo", () => {
52-
it("should run without throwing", async () => {
54+
it("should perform some calculations", async () => {
5355
jest.setTimeout(30000);
5456
screen.config.resourceDirectory = "./e2e/assets";
5557
await assert.isVisible("mouse.png");
@@ -60,13 +62,11 @@ describe("E2E demo", () => {
6062
await assert.isVisible("calculator.png");
6163
await keyboard.type("525");
6264
await calculate();
63-
await assert.isVisible("result.png");
65+
await screen.waitFor("result.png");
6466
await close();
6567
});
66-
});
6768

68-
describe("E2E drag & drop demo", () => {
69-
it("should run without throwing", async () => {
69+
it("drag & drop", async () => {
7070
jest.setTimeout(60000);
7171
screen.config.resourceDirectory = "./e2e/assets";
7272

0 commit comments

Comments
 (0)