Skip to content

Commit 301eb6c

Browse files
[test] fix race condition in env_spec.js - wait for module content instead of wrapper
1 parent fd49283 commit 301eb6c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/electron/env_spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ describe("Electron app environment", () => {
1111
});
1212

1313
it("should open browserwindow", async () => {
14-
const module = await helpers.getElement("#module_0_helloworld");
15-
await expect(module.textContent()).resolves.toContain("Test Display Header");
14+
// Wait for module content to be rendered, not just the module wrapper
15+
const moduleContent = await helpers.getElement("#module_0_helloworld .module-content");
16+
await expect(moduleContent.textContent()).resolves.toContain("Test Display Header");
1617
expect(global.electronApp.windows()).toHaveLength(1);
1718
});
1819
});

0 commit comments

Comments
 (0)