-
Notifications
You must be signed in to change notification settings - Fork 161
Refactor recovery phrase e2e and add more test cases. #3523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the recovery phrase end-to-end tests by introducing reusable Playwright fixtures for common test setup, significantly improving test organization and maintainability. The refactoring creates a Page Object Model pattern for recovery phrase operations and identity management, making the tests more focused on business logic rather than setup code.
Key changes:
- Introduced two new Playwright fixtures (
identityandrecoveryPhrasePage) using test.extend() to encapsulate common test setup - Expanded test coverage from 3 test scenarios to 23 scenarios, covering activation, verification, reset, and cancellation flows with various retry paths
- Added aria-label to recovery phrase input boxes for improved accessibility and test reliability
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/tests/e2e-playwright/fixtures/recovery-phrase-page.ts | New fixture providing RecoveryPhrasePage and RecoveryPhraseWizard page objects for interacting with recovery phrase flows |
| src/frontend/tests/e2e-playwright/fixtures/identity.ts | New fixture providing identity sign-in/sign-up functionality with persistent authentication across tests |
| src/frontend/tests/e2e-playwright/fixtures/index.ts | Merges identity and recovery phrase fixtures into a single test instance |
| src/frontend/tests/e2e-playwright/dashboard/recoveryPhrase.spec.ts | Refactored tests using new fixtures, expanding from 3 to 23 test scenarios with better organization |
| src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte | Added aria-label attribute to recovery phrase input boxes using position-based labels |
Comments suppressed due to low confidence (1)
src/frontend/tests/e2e-playwright/dashboard/recoveryPhrase.spec.ts:217
- Unused variable oldWords.
const oldWords = await recoveryPhrasePage.activate(async (wizard) => {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/frontend/tests/e2e-playwright/dashboard/recoveryPhrase.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
…factor' into sea-snake/recovery-phrase-e2e-refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very thorough (and much clearer) testing. Thanks!
|
Is there a test to show that a non-verified phrase can be reset? Maybe I missed it |
Yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(only way to get out of review mode was to leave this comment...)
Refactor recovery phrase e2e and add more test cases.
Changes
🟡 Some screens were changed