fix(ui): complete P5-00 shell readiness gates

This commit is contained in:
cesnimda
2026-09-21 21:38:11 +02:00
parent c325eb68c6
commit 926f2e5164
52 changed files with 6630 additions and 64 deletions
+11 -2
View File
@@ -168,9 +168,18 @@ for (const mode of ["light", "dark"] as const) for (const language of ["en", "nb
expect(new URL(page.url()).pathname).toBe("/jobs");
await first.focus(); await first.press("Enter");
await expect(page).toHaveURL(new RegExp(`/jobs/${owner.ids[0]}$`));
await expect(page.getByRole("heading", { name: /^Density 00/ })).toBeVisible();
await page.goBack();
// Existing App keeps the list mounted behind the dedicated workspace.
await expect(density).toHaveText(t.densityCompact);
// The dedicated route unmounts the table. Browser Back preserves the query;
// density is deliberately local and returns to its default.
expect(new URL(page.url()).search).toBe(query);
await expect(density).toHaveText(t.densityComfortable);
// P5-00-D02: browser Back does not restore row focus in the existing app.
// The explicit workspace Back action carries focusJobId; protect that path.
await first.focus(); await first.press("Enter");
await expect(page.getByRole("heading", { name: /^Density 00/ })).toBeVisible();
await page.getByRole("button", { name: t.workspaceBack, exact: true }).click();
await expect(page).toHaveURL(url => url.pathname === "/jobs" && url.search === query);
await expect(first).toBeFocused();
await main.getByRole("button", { name: t.tableNextPage }).click();