feat(lobby): F8-04b hierarchical sidebar + paid-tier gate for create-game #62
@@ -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