From 33149a8e4e31fb1762645a6f0ba65f4424905a6c Mon Sep 17 00:00:00 2001 From: "exe.dev user" Date: Wed, 11 Nov 2026 17:23:22 +0000 Subject: [PATCH] GEN-2888 add Projects dashboard subnav --- .../app/src/features/auth/account-bar.tsx | 5 +++ packages/app/test/jobs.browser.test.mjs | 31 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/packages/app/src/features/auth/account-bar.tsx b/packages/app/src/features/auth/account-bar.tsx index adb2c63d..cfcb4c3a 100644 --- a/packages/app/src/features/auth/account-bar.tsx +++ b/packages/app/src/features/auth/account-bar.tsx @@ -90,6 +90,11 @@ export function AccountBar() { : Account} + {authenticated && (pathname === "/" || pathname === "/projects") && } {logout.isError &&

{logout.error.message}

} ; } diff --git a/packages/app/test/jobs.browser.test.mjs b/packages/app/test/jobs.browser.test.mjs index c2aa6de0..56c15f72 100644 --- a/packages/app/test/jobs.browser.test.mjs +++ b/packages/app/test/jobs.browser.test.mjs @@ -303,6 +303,37 @@ test("project tabs stay on projects while job detail gets Runs and Settings navi assert.equal(await page.getByRole("navigation", { name: "Job navigation" }).getByRole("link", { name: "Settings", exact: true }).getAttribute("aria-current"), "page"); await context.close(); }); +test("dashboard Projects subnav completes keyboard navigation into project Jobs", async () => { + const { page, context } = await contextFor({ viewport: { width: 390, height: 844 } }); + await page.route("**/api/v1/projects", route => route.fulfill({ json: [{ id: projectId, name: "Release project", description: "Project jobs", jobCount: 1 }] })); + await page.route("**/api/v1/job-summaries?**", route => route.fulfill({ json: { items: [{ ...summary }], nextCursor: null } })); + + await page.goto(origin + "/projects"); + const dashboardNav = page.getByRole("navigation", { name: "Dashboard navigation" }); + const projectsTab = dashboardNav.getByRole("link", { name: "Projects", exact: true }); + await projectsTab.waitFor(); + assert.equal(await projectsTab.getAttribute("aria-current"), "page"); + assert.equal(await projectsTab.evaluate(element => getComputedStyle(element.parentElement).overflowX), "auto"); + + const dashboard = page.getByRole("link", { name: "Factorize dashboard" }); + await dashboard.focus(); + await page.keyboard.press("Enter"); + await page.getByRole("heading", { name: "Recent work" }).waitFor(); + assert.equal(await dashboardNav.getByRole("link", { name: "Projects", exact: true }).getAttribute("aria-current"), null); + + const dashboardProjects = dashboardNav.getByRole("link", { name: "Projects", exact: true }); + await dashboardProjects.focus(); + await page.keyboard.press("Enter"); + await page.getByRole("heading", { name: "Projects", exact: true }).waitFor(); + assert.equal(await dashboardNav.getByRole("link", { name: "Projects", exact: true }).getAttribute("aria-current"), "page"); + + const project = page.getByRole("link", { name: /Release project/ }); + await project.focus(); + await page.keyboard.press("Enter"); + await page.getByRole("heading", { name: "Release project jobs", exact: true }).waitFor(); + assert.equal(await page.getByRole("navigation", { name: "Project navigation" }).getByRole("link", { name: "Jobs", exact: true }).getAttribute("aria-current"), "page"); + await context.close(); +}); test("main navigation shows the current project switcher inside a project and its jobs", async () => { const { page, context } = await contextFor({ viewport: { width: 1280, height: 844 } }); await page.route("**/api/v1/projects", route => route.fulfill({ json: [{ id: projectId, name: "Release project", description: "Project jobs", jobCount: 1 }] }));