feat(lobby): F8-04b hierarchical sidebar + paid-tier gate for create-game #62

Merged
developer merged 4 commits from feature/f8-04b-lobby-restructure into development 2026-05-27 07:18:33 +00:00
Showing only changes of commit f42ab87233 - Show all commits
@@ -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();