fix(ui): F8-04b e2e — viewport-agnostic nav + refresh after create
Tests · UI / test (push) Failing after 3m8s

- lobby-create-screen: call lobbyData.refresh() after a successful
  POST so the new game shows up in the private-games panel
  immediately. The shared lobby-data store is otherwise lazy
  (ensure-on-first-mount), which rendered a stale list across the
  post-create navigation in the e2e suite.
- e2e tests that move between lobby sub-panels now go through
  `window.__galaxyNav.go(...)` rather than clicking the sidebar
  items. The mobile sidebar tucks the submenu behind a dropdown, so
  testid-based clicks fail on the mobile-iphone-13 / pixel-5
  viewports — the dev nav surface bypasses that UX (which has its
  own coverage in `lobby-tier-gate` / future submenu specs).
- game-shell-map missing-membership test: assert
  `lobby-account-name` instead of `lobby-create-button` on
  drop-back-to-lobby (the button moved into the paid-only
  private-games sub-panel; the identity strip is the constant lobby
  chrome).
- inspector-ship-group + ship-group-send synthetic loader specs:
  jump straight to the dev-only `synthetic-reports` top-level
  screen via the dev nav surface before looking for the file
  input (the loader moved off Overview in F8-04b).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-27 00:25:49 +02:00
parent 058c4fcf69
commit cff7cc3859
7 changed files with 48 additions and 21 deletions
+10 -5
View File
@@ -271,8 +271,11 @@ test.describe("Phase 8 — lobby flow", () => {
// Default landing is `games-recruitment` (empty, no public games).
await expect(page.getByTestId("lobby-recruitment-empty")).toBeVisible();
// Paid tier exposes the `private games` sub-panel; navigate to it.
await page.getByTestId("lobby-nav-games-private-games").click();
// Paid tier exposes the `private games` sub-panel; navigate to
// it via the dev nav surface so the spec is viewport-agnostic
// (the mobile sidebar hides the desktop submenu behind a
// dropdown — that UX is covered by lobby-submenu specs).
await page.evaluate(() => window.__galaxyNav!.go("games-private-games"));
await expect(page.getByTestId("lobby-games-private-empty")).toBeVisible();
await page.getByTestId("lobby-create-button").click();
@@ -348,14 +351,16 @@ test.describe("Phase 8 — lobby flow", () => {
});
await completeLogin(page);
// Navigate to the invitations sub-panel.
await page.getByTestId("lobby-nav-games-invitations").click();
// Navigate to the invitations sub-panel via the dev nav surface
// (viewport-agnostic — the mobile sidebar hides the desktop
// submenu behind a dropdown).
await page.evaluate(() => window.__galaxyNav!.go("games-invitations"));
await expect(page.getByTestId("lobby-invite-accept")).toBeVisible();
await page.getByTestId("lobby-invite-accept").click();
await expect(page.getByTestId("lobby-invite-accept")).toBeHidden();
// Active-past now has the invited game.
await page.getByTestId("lobby-nav-games-active-past").click();
await page.evaluate(() => window.__galaxyNav!.go("games-active-past"));
await expect(page.getByTestId("lobby-my-game-card")).toContainText("Invited Game");
expect(mocks.inviteRedeemCalls).toEqual([
{ gameId: "private-1", inviteId: "invite-1" },