diff --git a/tests/e2e/ai-os-positioning-audit.spec.ts b/tests/e2e/ai-os-positioning-audit.spec.ts index b30b763..84c7e8d 100644 --- a/tests/e2e/ai-os-positioning-audit.spec.ts +++ b/tests/e2e/ai-os-positioning-audit.spec.ts @@ -707,7 +707,7 @@ async function collectProbeContext(page: Page): Promise { if (!shellResponse.ok()) { shellText = `Shell navigation returned ${shellResponse.status()} ${shellResponse.statusText()}.`; } - await page.waitForSelector('.waggle-sidebar, [role="navigation"], main', { timeout: 15_000 }).catch(() => {}); + await page.waitForSelector('.waggle-sidebar:visible, [role="navigation"]:visible, main:visible', { timeout: 15_000 }).catch(() => {}); await page.waitForTimeout(600); const bodyText = await page.locator('body').innerText().catch(() => ''); shellText = bodyText || shellText; diff --git a/tests/e2e/five-persona-state-bundles.spec.ts b/tests/e2e/five-persona-state-bundles.spec.ts index 060b8c7..42444a4 100644 --- a/tests/e2e/five-persona-state-bundles.spec.ts +++ b/tests/e2e/five-persona-state-bundles.spec.ts @@ -510,7 +510,7 @@ function critical(items: string[], extraBenign: RegExp[] = []): string[] { } async function waitForShell(page: Page): Promise { - await page.waitForSelector('.waggle-sidebar, [role="navigation"], main', { timeout: 20_000 }); + await page.waitForSelector('.waggle-sidebar:visible, [role="navigation"]:visible, main:visible', { timeout: 20_000 }); await page.waitForTimeout(400); } diff --git a/tests/e2e/launcher-rendered-states.spec.ts b/tests/e2e/launcher-rendered-states.spec.ts index 577168e..226862c 100644 --- a/tests/e2e/launcher-rendered-states.spec.ts +++ b/tests/e2e/launcher-rendered-states.spec.ts @@ -8,7 +8,7 @@ function routeWithSkip(route: string): string { } async function waitForShell(page: Page): Promise { - await page.waitForSelector('.waggle-sidebar, [role="navigation"], main', { timeout: 15_000 }); + await page.waitForSelector('.waggle-sidebar:visible, [role="navigation"]:visible, main:visible', { timeout: 15_000 }); await page.waitForTimeout(300); } diff --git a/tests/e2e/runtime-a11y.spec.ts b/tests/e2e/runtime-a11y.spec.ts index ab94afa..ef94b82 100644 --- a/tests/e2e/runtime-a11y.spec.ts +++ b/tests/e2e/runtime-a11y.spec.ts @@ -70,7 +70,7 @@ function routeWithSkip(route: string) { async function gotoApp(page: Page, route: string) { await page.goto(routeWithSkip(route), { waitUntil: 'domcontentloaded' }); - await page.waitForSelector('.waggle-sidebar, [role="navigation"], main', { timeout: 15_000 }); + await page.waitForSelector('.waggle-sidebar:visible, [role="navigation"]:visible, main:visible', { timeout: 15_000 }); // Let lazy route content and the shell's 200ms entrance transition settle // before axe samples transient dialog/backdrop layers. await page.waitForTimeout(800); diff --git a/tests/e2e/user-journeys.spec.ts b/tests/e2e/user-journeys.spec.ts index 1c97d17..0085750 100644 --- a/tests/e2e/user-journeys.spec.ts +++ b/tests/e2e/user-journeys.spec.ts @@ -21,7 +21,7 @@ async function gotoApp(page: Page, route = '/home') { } async function waitForShell(page: Page) { - await page.waitForSelector('.waggle-sidebar, [role="navigation"], main', { timeout: 15_000 }); + await page.waitForSelector('.waggle-sidebar:visible, [role="navigation"]:visible, main:visible', { timeout: 15_000 }); await page.waitForTimeout(300); } @@ -601,12 +601,11 @@ test.describe('User Journey Tests', () => { test('J-mobile: create workspace prioritizes primary setup at 390px width', async ({ page }) => { await page.setViewportSize({ width: 390, height: 844 }); - await gotoApp(page); + // Phones have no sidebar: the bottom bar's More opens the palette, which + // leads to All workspaces and its New workspace button. + await gotoApp(page, '/workspaces'); - await page.getByTestId('sidebar-workspace').click(); - const switcher = page.getByRole('dialog', { name: /switch workspace/i }); - await expect(switcher).toBeVisible({ timeout: 5_000 }); - await switcher.getByRole('button', { name: /new workspace/i }).click(); + await page.getByTestId('all-workspaces-new').click(); const dialog = page.getByRole('dialog', { name: /create workspace/i }); await expect(dialog).toBeVisible({ timeout: 5_000 });