-
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
[MV3] Fix e2e incremental security test for MV3 test build #16265
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. |
Builds ready [d93b7d8]
Page Load Metrics (2458 ± 115 ms)
|
@@ -130,6 +130,7 @@ describe('Incremental Security', function () { | |||
const revealedSeedPhrase = await driver.findElement( | |||
'.reveal-seed-phrase__secret-words', | |||
); | |||
await driver.waitForNonEmptyElement(revealedSeedPhrase); |
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.
If we know the seed phrase, can we just use driver.waitForSelector instead, and remove this new method?
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.
ty! not in this case, as here we are going to the complete onboarding flow for Create New Wallet, so every time we run it, it's a different seed-phrase
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.
Oh my bad, I didn't realise it was creating a new wallet. Thanks for getting back to me
@@ -130,6 +130,7 @@ describe('Incremental Security', function () { | |||
const revealedSeedPhrase = await driver.findElement( | |||
'.reveal-seed-phrase__secret-words', | |||
); | |||
await driver.waitForNonEmptyElement(revealedSeedPhrase); |
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.
Oh my bad, I didn't realise it was creating a new wallet. Thanks for getting back to me
Explanation
On the mv3 test build, the e2e test for incremental security is failing due to a tiny delay when we render the seed phrase inside the div box.
This fixes the issue by waiting until the element is not empty. This way we make sure the seed phrase is rendered when we make the assertion.
Note: in MV2 this error does not surface as it's slightly faster on rendering the seed phrase. We'll introduce performance metrics for calculating these delays introduced on the MV3 build.
More Information
encrypt-decrypt
test for MV3 test build #16264Screenshots/Screencaps
Before
After
Manual Testing Steps
yarn test:e2e:single test/e2e/tests/incremental-security.spec.js --browser=chrome
Pre-Merge Checklist
+ If there are functional changes: