-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: flaky test Import flow @no-mmi Import wallet using Secret Recovery Phrase with pasting word by word
#26049
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Quality Gate passedIssues Measures |
Import flow @no-mmi Import wallet using Secret Recovery Phrase with pasting word by word
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.
PR Summary
This pull request addresses a race condition in the onboarding flow by ensuring asynchronous actions are properly awaited.
ui/pages/onboarding-flow/welcome/welcome.js
: Madedispatch
call inonImportClick
function asynchronous to prevent race conditions.ui/pages/onboarding-flow/welcome/welcome.test.js
: Updated tests to usewaitFor
for asynchronous actions, improving test reliability.ui/store/actions.ts
: ModifiedsetFirstTimeFlowType
to return aPromise<void>
and useasync/await
for better async handling.
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [1f07bb2]
Page Load Metrics (167 ± 203 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26049 +/- ##
========================================
Coverage 69.68% 69.68%
========================================
Files 1405 1405
Lines 49701 49701
Branches 13738 13737 -1
========================================
Hits 34630 34630
Misses 15071 15071 ☔ View full report in Codecov by Sentry. |
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.
LGTM!
Description
The test
Import flow @no-mmi Import wallet using Secret Recovery Phrase with pasting word by word
fails because after opting out from metametrics, we land into the Home page again instead of going to the Import SRP page, causing the test to fail as the srp element cannot be located (ci failure).This is a race condition on the wallet level, and not on the test level: iinstead of going inside the
ONBOARDING_IMPORT_WITH_SRP_ROUTE
condition, we fallback to the DEFAULT_ROUTE which directs you to home (see screenshot of the failure):I am able to consistently reproduce it locally if I add a timeout in the onImportClick function:
Related issues
Fixes: #26053
Manual testing steps
Import flow @no-mmi Import wallet using Secret Recovery Phrase with pasting word by word
Screenshots/Recordings
Race condition which lands me back to HOME page:
race-condition-import-flow.mp4
Pre-merge author checklist
Pre-merge reviewer checklist