diff --git a/ui/frontend/tests/e2e/lobby-tier-gate.spec.ts b/ui/frontend/tests/e2e/lobby-tier-gate.spec.ts index ae2ab93..4788b90 100644 --- a/ui/frontend/tests/e2e/lobby-tier-gate.spec.ts +++ b/ui/frontend/tests/e2e/lobby-tier-gate.spec.ts @@ -174,16 +174,16 @@ test.describe("F8-04b — tier gate", () => { // absent. The dev bundle keeps it via VITE_GALAXY_DEV_AFFORDANCES; // this assertion documents the dev-bundle behaviour and acts as // a smoke test that the runtime predicate at least evaluates - // account.entitlement.is_paid without throwing. + // account.entitlement.is_paid without throwing. Use `attached` + // instead of `visible` because the desktop submenu button is + // CSS-hidden on the mobile viewports — the mobile sidebar + // tucks the same entry behind a dropdown popover. const privateGamesEntry = page.getByTestId("lobby-nav-games-private-games"); - // In dev DEV_AFFORDANCES=true → entry is visible (the gate is - // bypassed for owner testing). The assertion captures that. - await expect(privateGamesEntry).toBeVisible(); + await expect(privateGamesEntry).toBeAttached(); // Free-tier callers reach the create form via the DEV-visible // entry, but the backend still rejects the POST. Use the dev - // nav surface so the assertion works on mobile too (the mobile - // sidebar tucks the private-games entry behind a dropdown). + // nav surface so the assertion works on mobile too. await page.evaluate(() => window.__galaxyNav!.go("games-private-games")); await page.getByTestId("lobby-create-button").click(); await expect(page.getByTestId("lobby-create-form")).toBeVisible();