test(ui): update profile-screen e2e for F8-04b sidebar rename
Tests · UI / test (push) Failing after 11m56s

`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) <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-26 23:55:46 +02:00
parent 009ea560f9
commit 058c4fcf69
+10 -5
View File
@@ -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);