Skip to content

test(e2e): manage games through the rebuilt Games page (LAZ-1413) - #24550

Open
chnexusmods wants to merge 2 commits into
masterfrom
christopherhardy-laz-1413
Open

chnexusmods wants to merge 2 commits into
masterfrom
christopherhardy-laz-1413

Conversation

@chnexusmods

Copy link
Copy Markdown
Contributor

Fixes the shared manageGame E2E helper for the rebuilt Games page. A full local run on master had 30 of its 32 failures in this helper, before any spec's own steps ran. That covers every spec that needs a managed game: Health Check, mods, Profiles, QA-103 and QA-106.

Linear: LAZ-1413

Why it broke

  • "Manual add" found the wrong tile. Each tile's button now depends on its section: "Add game" under detected games, "Manual add" under all supported games, "Open" under added games. The locator searched the whole page. In logged-in tests, a game installed through a store (here Stardew Valley via Steam) is also listed under "New games detected". That section comes from a Nexus API lookup added in fe655f5, so the first match was the "Add game" tile.
  • Adding a game no longer opens it. Since c755a5c (LAZ-880), the spine follows the open page. The game still becomes active, but the user stays on the Games page in Home, so the helper's wait for "Mods" never passed.

Changes

  • selectors/games.ts: manualAddButton only looks under "All supported games". New openButton for "Added games". detectedSection matches both "Games detected" and "New games detected".
  • helpers/games.ts: after the dialog, open the game from its tile under "Added games", then wait for Mods. manageGame is split into addGameManually and openAddedGame.
  • helpers/timeouts.ts: new Timeouts.GAME_ACTIVATION for the activation waits, which aren't network-bound.

Detection gives Vortex no game path (VORTEX_E2E=1 still disables discovery), so the tests still go through the "Game not discovered" dialog and manage the fake install. They never touch a real one.

Testing

All runs local, headless, CI=1:

  • Health Check and mods specs: 30/30 passed.
  • game-management.spec.ts and profile.spec.ts: 5/5 passed before the helper split.
  • After the split: 4/5 passed. QA-103 failed on the Nexus login captcha during test setup, before reaching this code, and needs a re-run.

Open question

Is staying on the Games page after adding a game the intended UX after LAZ-880? If not, the product change would make the extra Open step unnecessary.

🤖 Generated with Claude Code

Scope "Manual add" to the "All supported games" section. In logged-in
tests a store-installed game is also listed under "New games detected",
whose tile leads with "Add game", so a page-wide lookup found the wrong
tile.

Adding a game activates it but no longer opens its workspace, since the
spine now follows the open page (LAZ-880). Open the game from its tile
under "Added games" before waiting for the Mods page.

Split manageGame into addGameManually and openAddedGame, give the
activation waits their own GAME_ACTIVATION timeout, and match the
detected section by either of its titles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chnexusmods
chnexusmods marked this pull request as ready for review October 15, 2026 13:05
@chnexusmods
chnexusmods requested a review from a team as a code owner October 15, 2026 13:05
@chnexusmods
chnexusmods marked this pull request as draft October 15, 2026 13:09
On the slower Linux runner the games list re-renders between the tile
becoming visible and the scroll, and scrollIntoViewIfNeeded fails on the
detached tile rather than retrying. hover already scrolls the tile into
view and retries, so drop the separate scroll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chnexusmods
chnexusmods marked this pull request as ready for review October 15, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant