From 058c4fcf693b617bf2c89ecae0bf89d38db675d6 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Tue, 26 May 2026 23:55:46 +0200 Subject: [PATCH] test(ui): update profile-screen e2e for F8-04b sidebar rename `lobby-nav-overview` is replaced by `lobby-nav-games` (the new parent), and the empty-games active-past sub-panel is hidden entirely so the landing testid becomes `lobby-recruitment-empty` (the always-visible sub-panel for a no-games session). Co-Authored-By: Claude Opus 4.7 (1M context) --- ui/frontend/tests/e2e/profile-screen.spec.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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);