experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

test(smoke-flake): poll for quit/restart registration before querying

app/index.js registers quit and restart async during init(). The test's
single-shot cmd:query-commands + 2s timeout raced against that boot path
and failed intermittently when the query fired before the registrations
landed. Use the existing waitForCommand helper (200ms poll, 10s cap)
before the detail query so the assertion runs only once both commands
are present.

+6 -1
+6 -1
tests/desktop/smoke.spec.ts
··· 1436 1436 }); 1437 1437 1438 1438 test('quit and restart commands are registered', async () => { 1439 - // Query commands via cmd extension 1439 + // quit/restart are registered asynchronously during app boot (app/index.js). 1440 + // Poll via waitForCommand before querying details to avoid startup-race flake. 1441 + await waitForCommand(sharedBgWindow, 'quit', 10000); 1442 + await waitForCommand(sharedBgWindow, 'restart', 10000); 1443 + 1444 + // Query commands via cmd extension to verify descriptions 1440 1445 const result = await sharedBgWindow.evaluate(async () => { 1441 1446 const api = (window as any).app; 1442 1447