fix(ui): F8-04b e2e — viewport-agnostic nav + refresh after create
Tests · UI / test (push) Failing after 3m8s
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:
@@ -9,6 +9,7 @@
|
||||
import { i18n, type TranslationKey } from "$lib/i18n/index.svelte";
|
||||
import { loadCore } from "../../platform/core/index";
|
||||
import { session } from "$lib/session-store.svelte";
|
||||
import { lobbyData } from "$lib/lobby-data.svelte";
|
||||
|
||||
const DEFAULT_MIN_PLAYERS = 2;
|
||||
const DEFAULT_MAX_PLAYERS = 8;
|
||||
@@ -102,9 +103,17 @@
|
||||
turnSchedule: trimmedSchedule,
|
||||
targetEngineVersion: targetEngineVersion.trim() || DEFAULT_TARGET_ENGINE_VERSION,
|
||||
});
|
||||
// Land on the private-games panel where the freshly created
|
||||
// game shows up — the lobby-data store will refresh on next
|
||||
// mount.
|
||||
// Refresh the lobby-data cache so the freshly-created game
|
||||
// shows up in the private-games panel the moment we land
|
||||
// there. The shared store is otherwise lazy (ensure-on-
|
||||
// first-mount) and would render a stale list across the
|
||||
// navigation.
|
||||
try {
|
||||
await lobbyData.refresh();
|
||||
} catch {
|
||||
// Refresh failure does not block the navigation —
|
||||
// the panel will retry on its own mount.
|
||||
}
|
||||
appScreen.go("games-private-games");
|
||||
} catch (err) {
|
||||
formError = describeLobbyError(err);
|
||||
|
||||
Reference in New Issue
Block a user