test(ui): update profile-screen e2e for F8-04b sidebar rename
Tests · UI / test (push) Failing after 11m56s
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:
@@ -260,7 +260,9 @@ test.describe("F8-04 — profile screen", () => {
|
|||||||
await page.getByTestId("profile-display-name").fill("ignored");
|
await page.getByTestId("profile-display-name").fill("ignored");
|
||||||
await page.getByTestId("profile-cancel").click();
|
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.profileUpdates).toEqual([]);
|
||||||
expect(mocks.settingsUpdates).toEqual([]);
|
expect(mocks.settingsUpdates).toEqual([]);
|
||||||
|
|
||||||
@@ -320,16 +322,19 @@ test.describe("F8-04 — profile screen", () => {
|
|||||||
const firstCount = mocks.accountGetCount;
|
const firstCount = mocks.accountGetCount;
|
||||||
expect(firstCount).toBeGreaterThanOrEqual(1);
|
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
|
// loading placeholder, and the cache must answer without a
|
||||||
// second gateway call.
|
// second gateway call.
|
||||||
await page.getByTestId("lobby-nav-profile").click();
|
await page.getByTestId("lobby-nav-profile").click();
|
||||||
await expect(page.getByTestId("profile-form")).toBeVisible();
|
await expect(page.getByTestId("profile-form")).toBeVisible();
|
||||||
await expect(page.getByTestId("lobby-account-name")).toContainText("Pilot");
|
await expect(page.getByTestId("lobby-account-name")).toContainText("Pilot");
|
||||||
|
|
||||||
// Navigate back to Overview.
|
// Navigate back to the games section. F8-04b replaced the bare
|
||||||
await page.getByTestId("lobby-nav-overview").click();
|
// `Overview` page with a `games` parent + sub-panels; clicking
|
||||||
await expect(page.getByTestId("lobby-my-games-empty")).toBeVisible();
|
// 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");
|
await expect(page.getByTestId("lobby-account-name")).toContainText("Pilot");
|
||||||
|
|
||||||
expect(mocks.accountGetCount).toBe(firstCount);
|
expect(mocks.accountGetCount).toBe(firstCount);
|
||||||
|
|||||||
Reference in New Issue
Block a user