Skip to content

Commit d665cc5

Browse files
committed
test: assert the multi-view window composition
Guard the BrowserView -> WebContentsView migration (Phase 3): after the welcome view settles, the app's view composition (titlebar + welcome + content area) should expose at least three pages. A dropped view post-migration lowers the count and fails this. Uses expect.poll, no fragile per-view selector. Note: AI-assisted (Claude Code). Manually verified: 4 e2e tests pass locally (count is 4 at launch); tsc/eslint/prettier clean.
1 parent bf3c63a commit d665cc5

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/e2e/smoke.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ test('on first run the Welcome window renders', async () => {
2828
}
2929
});
3030

31+
test('the session window composes multiple views (titlebar + welcome + content)', async () => {
32+
const { app, userDataDir } = await launchApp();
33+
try {
34+
// Once the welcome view has settled, the BrowserView/WebContentsView
35+
// composition should expose several views (titlebar, welcome, content area)
36+
// as separate pages. A dropped view after the Phase 3 WebContentsView
37+
// migration would lower this count.
38+
await pageByTitle(app, /welcome/i);
39+
await expect
40+
.poll(() => app.windows().length, { timeout: 10000 })
41+
.toBeGreaterThanOrEqual(3);
42+
} finally {
43+
await app.close();
44+
cleanup(userDataDir);
45+
}
46+
});
47+
3148
test('app shuts down cleanly without hanging', async () => {
3249
const { app, userDataDir } = await launchApp();
3350
try {

0 commit comments

Comments
 (0)