feat(ui): redesign grouped application shell

This commit is contained in:
cesnimda
2026-09-28 17:26:02 +02:00
parent 57a6bd02c6
commit 8e56ceabf5
30 changed files with 398 additions and 92 deletions
@@ -309,6 +309,46 @@ for (const mode of ["light", "dark"] as const) for (const language of ["en", "nb
}
});
test(`[P5-01 PRES-E07 E08 A03] ${suffix} grouped shell, rail menu and route focus`, async ({ page }, info) => {
test.setTimeout(90_000);
const t = translations[language];
await page.setViewportSize({ width: 1440, height: 900 });
await page.goto("/kanban");
const navigation = page.getByRole("navigation", { name: t.navigation });
await expect(navigation.getByText(t.jobSearch, { exact: true })).toBeVisible();
await expect(navigation.getByText(t.career, { exact: true })).toBeVisible();
await expect(navigation.getByRole("button", { name: t.jobApplications, exact: true })).toHaveAttribute("aria-current", "location");
await expect(navigation.getByRole("button", { name: t.kanbanBoard, exact: true })).toHaveAttribute("aria-current", "page");
await expect(navigation.getByRole("button", { name: t.connectedAccounts, exact: true })).toBeInViewport({ ratio: 1 });
await expect(page.getByRole("link", { name: t.skipToMainContent, exact: true })).toHaveAttribute("href", "#app-main-content");
await capture(page, info, `grouped-shell-${suffix}`);
await scan(page, info, `grouped-shell-${suffix}`, "nav");
await page.getByRole("button", { name: t.collapseSidebar, exact: true }).click();
const jobsRail = page.getByRole("button", { name: t.jobApplications, exact: true });
await jobsRail.focus();
await jobsRail.press("Enter");
const railMenu = page.getByRole("menu");
await expect(railMenu.getByRole("menuitem", { name: t.trash, exact: true })).toBeVisible();
await capture(page, info, `grouped-rail-${suffix}`);
await railMenu.getByRole("menuitem", { name: t.trash, exact: true }).click();
await expect(page).toHaveURL(/\/trash$/);
await expect(page.getByRole("heading", { level: 1, name: t.trash, exact: true })).toBeFocused();
await page.setViewportSize({ width: 390, height: 844 });
const trigger = page.getByRole("button", { name: t.openNavigation, exact: true });
await trigger.click();
const drawer = page.getByRole("dialog", { name: t.navigation });
await expect(drawer.getByText(t.jobSearch, { exact: true })).toBeVisible();
await expect(drawer.getByRole("button", { name: t.trash, exact: true })).toHaveAttribute("aria-current", "page");
await capture(page, info, `grouped-mobile-${suffix}`);
await scan(page, info, `grouped-mobile-${suffix}`, '[role="dialog"]');
await drawer.getByRole("button", { name: t.kanbanBoard, exact: true }).click();
await expect(page).toHaveURL(/\/kanban$/);
await expect(page.getByRole("heading", { level: 1, name: t.kanbanBoard, exact: true })).toBeFocused();
await expect(drawer).not.toBeVisible();
});
if ((mode === "light" && language === "en") || (mode === "dark" && language === "nb")) {
test(`[P5-00 PRES-E07 E09 C06 S02 S03] ${suffix} dirty editor survives shell utilities and cancel`, async ({ page, context, owner }, info) => {
test.setTimeout(90_000);