- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.4k
          fix: flaky test Switching between account from different networks Create a Solana account and switch to another network
          #31382
        
          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
| 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. | 
| accountName: 'Solana 1', | ||
| }); | ||
| } | ||
| await headerComponent.check_accountLabel('Solana 1'); | 
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.
this ensures that we have loaded the solana account in the wallet before proceeding to the next step
| Builds ready [64d0f24]
 UI Startup Metrics (1193 ± 47 ms)
 Bundle size diffs
 | 
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! Thanks for the fix !
Description
Fixes a race condition when we create a Solana account and immediately switch to Solana Mainnet network. The problem is that the account is not yet loaded when we perform the network switch, making the dialog for "you need a Solana accoun" to sometimes appear, and obfuscate the next action make the test fail with the error
ElementClickInterceptedError:Failure: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/134203/workflows/554e280c-2fa9-4dff-8652-0398b8ab80a0/jobs/4697627/tests
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
See dialog for "you need a Solana account" obfuscating the home page
Pre-merge author checklist
Pre-merge reviewer checklist