Skip to content

[QA-94] add view-profile-on-web e2e test#23349

Open
emwrn wants to merge 2 commits into
masterfrom
QA-94/view-profile-on-web
Open

[QA-94] add view-profile-on-web e2e test#23349
emwrn wants to merge 2 commits into
masterfrom
QA-94/view-profile-on-web

Conversation

@emwrn
Copy link
Copy Markdown
Contributor

@emwrn emwrn commented May 28, 2026

Summary

  • Adds QA-94 e2e test: free user clicks "View profile on web" in the profile dropdown and is taken to their Nexus Mods profile URL via shell.openExternal.
  • Mirrors the QA-96 (upgrade-to-premium) pattern: stub shell.openExternal in the Electron main process to capture URLs, then assert the captured URL matches nexusmods.com/users/<id>.

Implementation notes

  • loginToNexus's logged-in verification step clicks the avatar and leaves the dropdown open. The test dismisses it with Escape first, then drives its own open/click cycle so the assertions don't depend on the helper's side effects.
  • No new selectors or helpers — purely a new spec.

Test plan

  • Local: pnpm --filter @vortex/e2e exec playwright test view-profile-on-web.spec.ts passes (1.1m).
  • Local: pnpm run format:check clean under WSL Linux oxfmt.
  • Local: typecheck/lint clean as part of pnpm run build.

Logs in as a free user, dismisses the dropdown that loginToNexus leaves
open as part of its logged-in verification, stubs shell.openExternal in
the main process, clicks the avatar to open the profile dropdown, clicks
"View profile on web", and asserts the captured URL is a nexusmods.com
/users/<id> page.
@emwrn emwrn marked this pull request as ready for review June 2, 2026 10:10
@emwrn emwrn requested a review from a team as a code owner June 2, 2026 10:10
Copy link
Copy Markdown
Member

@erri120 erri120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use new timeout constants instead of magic numbers. E2E best practices have also changed on timeouts. Best to wait for #23376 as login has changed as well.

Aligns with the e2e best-practices doc:
- Drop the per-test test.setTimeout override (GlobalTimeouts.TEST covers it).
- Swap the avatar's 60s wait for Timeouts.NETWORK (userInfo round-trip).
- Remove the explicit 10s override on the dropdown item; it's a pure UI
  element after a click and should use the default GlobalTimeouts.EXPECT.
@erri120
Copy link
Copy Markdown
Member

erri120 commented Jun 3, 2026

Needs a rebase.

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.

2 participants