diff --git a/ui/frontend/tests/e2e/profile-screen.spec.ts b/ui/frontend/tests/e2e/profile-screen.spec.ts index a8ff3a8..476992d 100644 --- a/ui/frontend/tests/e2e/profile-screen.spec.ts +++ b/ui/frontend/tests/e2e/profile-screen.spec.ts @@ -260,7 +260,9 @@ test.describe("F8-04 — profile screen", () => { await page.getByTestId("profile-display-name").fill("ignored"); await page.getByTestId("profile-cancel").click(); - await expect(page.getByTestId("lobby-my-games-empty")).toBeVisible(); + // Cancel returns to the lobby (resolver navigates to the first + // visible games sub-panel — recruitment for a no-games session). + await expect(page.getByTestId("lobby-recruitment-empty")).toBeVisible(); expect(mocks.profileUpdates).toEqual([]); expect(mocks.settingsUpdates).toEqual([]); @@ -320,16 +322,19 @@ test.describe("F8-04 — profile screen", () => { const firstCount = mocks.accountGetCount; expect(firstCount).toBeGreaterThanOrEqual(1); - // Navigate Overview → Profile: identity must NOT flash the + // Navigate Games → Profile: identity must NOT flash the // loading placeholder, and the cache must answer without a // second gateway call. await page.getByTestId("lobby-nav-profile").click(); await expect(page.getByTestId("profile-form")).toBeVisible(); await expect(page.getByTestId("lobby-account-name")).toContainText("Pilot"); - // Navigate back to Overview. - await page.getByTestId("lobby-nav-overview").click(); - await expect(page.getByTestId("lobby-my-games-empty")).toBeVisible(); + // Navigate back to the games section. F8-04b replaced the bare + // `Overview` page with a `games` parent + sub-panels; clicking + // the parent resolves to the first visible sub-panel + // (`recruitment` for a no-games session). + await page.getByTestId("lobby-nav-games").click(); + await expect(page.getByTestId("lobby-recruitment-empty")).toBeVisible(); await expect(page.getByTestId("lobby-account-name")).toContainText("Pilot"); expect(mocks.accountGetCount).toBe(firstCount);