diff --git a/apps/desktop/e2e/quick-chat.spec.ts b/apps/desktop/e2e/quick-chat.spec.ts index 38f897ef69d..eacdf045a29 100644 --- a/apps/desktop/e2e/quick-chat.spec.ts +++ b/apps/desktop/e2e/quick-chat.spec.ts @@ -323,6 +323,8 @@ test.describe('quick chat window', () => { await test.step('a settings file without the setting keeps the ⌥Space it always had', async () => { const existing = await desktop.launch({ origin: fixture.origin, settings: settings() }) + // Main-process evaluates race startup until the first window exists. + await existing.app.firstWindow() await expect.poll(() => isRegistered(existing.app, 'Alt+Space')).toBe(true) await expect.poll(() => storedShortcut(existing.userData)).toBe('Alt+Space') await desktop.close(existing) @@ -331,6 +333,7 @@ test.describe('quick chat window', () => { const fresh = await test.step('a first run binds nothing and records that it is off', async () => { const launched = await desktop.launch({ origin: fixture.origin }) + await launched.app.firstWindow() await expect.poll(() => startupBound(launched.app)).toBe(true) expect(await isRegistered(launched.app, 'Alt+Space')).toBe(false) await expect.poll(() => storedShortcut(launched.userData)).toBeNull() @@ -340,6 +343,7 @@ test.describe('quick chat window', () => { await test.step('relaunching that profile still binds nothing', async () => { const relaunched = await desktop.launch({ origin: fixture.origin, userData: fresh.userData }) + await relaunched.app.firstWindow() await expect.poll(() => startupBound(relaunched.app)).toBe(true) expect(await isRegistered(relaunched.app, 'Alt+Space')).toBe(false) expect(storedShortcut(relaunched.userData)).toBeNull()