Skip to content

feat: add virtual wallet injection & webServer config for E2E tests (#16) - #37

Merged
elizabetheonoja-art merged 2 commits into
Utility-Protocol:mainfrom
sandrawillow001-afk:feat/issue-16-e2e-wallet-tests
Jun 20, 2026
Merged

feat: add virtual wallet injection & webServer config for E2E tests (#16)#37
elizabetheonoja-art merged 2 commits into
Utility-Protocol:mainfrom
sandrawillow001-afk:feat/issue-16-e2e-wallet-tests

Conversation

@sandrawillow001-afk

@sandrawillow001-afk sandrawillow001-afk commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Changes

What was done

  • playwright.config.ts — Added webServer auto-start config with reuseExistingServer: !!process.env.CI so the dev server starts automatically in local dev and reuses the CI-managed server in GitHub Actions
  • tests/e2e/wallet.spec.ts — Added virtual wallet injection infrastructure and 7 new tests:
    • injectWalletSession() helper that navigates to the app, sets localStorage with a pre-configured auth session, and reloads — no Stellar SDK dependency
    • 5 virtual injection tests: verify connected state from injected session, specific addresses, disconnect clears state, reload persistence, expired session fallback
    • 2 edge case tests: corrupt localStorage graceful fallback, missing secret still shows address
    • All 7 original tests preserved intact
  • eslint.config.mjs — Added test-results/** and playwright-report/** to ignore patterns
  • .gitignore — Added Playwright output directories

Validation (all green)

Check Result
E2E (Playwright) 14/14 passed
Unit (Vitest) 44/44 passed
TypeScript 0 errors
ESLint 0 errors/warnings
Build (npm run build) Passed

Full CI pipeline

npm run build && npm test && npx playwright test

All three stages pass clean.
closes #37

…tility-Protocol#16)

- Add webServer auto-start config to playwright.config.ts
- Add virtual wallet injection helpers (injectWalletSession)
- Add 7 new E2E tests: 5 virtual injection + 2 edge cases
- Add test-results and playwright-report to eslint ignores
- Add playwright output dirs to .gitignore

@elizabetheonoja-art elizabetheonoja-art left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@elizabetheonoja-art
elizabetheonoja-art merged commit f30ce9a into Utility-Protocol:main Jun 20, 2026
3 checks passed
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