test(e2e): wait for the visible shell and use the phone path to new workspaces

Since phones get a bottom bar instead of the sidebar (UF-057), the shell
wait matched the hidden sidebar first and timed out at 390 px, and the
mobile journey clicked the sidebar's workspace button. The wait now takes
the first visible shell element, and the journey opens New workspace from
All workspaces, as a phone user does.
This commit is contained in:
shumeiko.it
2026-11-01 10:56:12 +01:00
parent 4d54612374
commit 8e528b3467
5 changed files with 9 additions and 10 deletions

View File

@@ -707,7 +707,7 @@ async function collectProbeContext(page: Page): Promise<ProbeContext> {
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;