-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 Account Custom Name..
#26062
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. |
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
The PR addresses a flaky test issue by modifying the test script to ensure the 'Create' button is properly clicked and waits for it to disappear.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button. - This change ensures the test waits for the 'Create' button to disappear after being clicked, improving reliability.
- Fixes issue Flaky test - Account Custom Name Persistence persists custom account label through account change and wallet lock #26061 related to the
Account Custom Name Persistence
test.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
… fix-flaky-test-custom-name
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
(updates since last review)
The PR addresses a flaky test issue by modifying the test script to ensure the 'Create' button is properly clicked and waits for it to disappear.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button. - Removed
test-e2e-swap-playwright
job from.circleci/config.yml
to streamline the CI pipeline. - Added
SWAP_TEST_ETH_USDC_TRADES_MOCK
intest/data/mock-data.js
for enhanced swap test scenarios. - Simplified logic in
test/e2e/api-specs/ConfirmationRejectionRule.ts
by removing conditional checks for 'Reject' button. - Updated
test/e2e/helpers.js
to add checks for specific selectors, reducing flaky tests.
24 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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, Thank you!
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
(updates since last review)
This PR addresses a flaky test issue in the Account Custom Name Persistence
test suite by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
Fixed linting and ran locally on both Firefox and Chrome. LGTM.
…mask-extension into fix-flaky-test-custom-name
… fix-flaky-test-custom-name
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
(updates since last review)
This PR addresses a flaky test issue in the Account Custom Name Persistence
test suite by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button.
No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Quality Gate passedIssues Measures |
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button. - Removed 'sendAToken' message key from multiple localization files (
app/_locales/*/messages.json
), ensuring no references remain in the codebase. - Enhanced
ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx
by adding additional props to theSearch
component and adjusting padding/margin properties. - Introduced
textProps
toui/components/multichain/pages/page/components/header/header.tsx
for more flexible customization of theText
component. - Updated header text and properties in
ui/components/multichain/pages/send/send.js
to improve UI consistency.
18 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
The test failures are not related to this PR
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 quick fix!
… fix-flaky-test-custom-name
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to replaceclickElement
withclickElementAndWaitToDisappear
for the 'Create' button. - Updated
app/scripts/background.js
to conditionally initializegetSocketBackgroundToMocha
during test builds. - Added
server-mocha-to-background.ts
andsocket-background-to-mocha.ts
for improved communication between Mocha/Selenium tests and the background script. - Enhanced
test/e2e/helpers.js
with a newclickElementSafe
helper function to improve test reliability. - Updated
package.json
to include new dependencies and devDependencies for enhanced functionality and compatibility.
71 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
… fix-flaky-test-custom-name
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/tests/settings/show-hex-data.spec.js
to update selectors and add conditional logic for different environments. - Updated
clickElementsInSequence
function to include a conditional check for theMMI
environment variable. - Improved reliability of the test by ensuring correct elements are interacted with, especially in different environments.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
… fix-flaky-test-custom-name
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to useclickElementAndWaitToDisappear
for the 'Create' button. - Refactored
development/generate-rc-commits.js
to fetch author-team mappings from an externalteams.json
file, improving maintainability. - Added error handling for fetching
teams.json
and ensured JSON structure correctness.
No major changes found since the last review.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
… fix-flaky-test-custom-name
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- Modified
test/e2e/accounts/account-custom-name.spec.ts
to useclickElementAndWaitToDisappear
for the 'Create' button. - Updated
test/e2e/vault-decryption-chrome.spec.js
to improve test stability by addingdisableServerMochaToBackground
and ensuring correct window handling. - Replaced
Typography
withText
component inui/pages/onboarding-flow/creation-successful/creation-successful.js
for design consistency.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
As @HowardBraham mentioned, we will be unable to merge this PR until the other tests are addressed. |
… fix-flaky-test-custom-name
Quality Gate passedIssues Measures |
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
(updates since last review)
This PR addresses a flaky test related to the Account Custom Name Persistence
by ensuring the 'Create' button is clicked successfully, even when obscured by other elements.
- test/e2e/accounts/account-custom-name.spec.ts: Replaced
clickElement
withclickElementAndWaitToDisappear
for the 'Create' button to ensure it is clicked even when obscured. - test/e2e/webdriver/chrome.js: Locked ChromeDriver to version 126 to maintain test stability.
- ui/components/app/import-token/token-list/token-list.component.js: Removed
showHalo
prop fromAvatarToken
component. - ui/components/multichain/asset-picker-amount/asset-picker/asset-picker.tsx: Removed
showHalo
prop fromAvatarToken
component. - ui/components/multichain/import-tokens-modal/import-tokens-modal-confirm.js: Removed
showHalo
prop fromAvatarToken
component.
5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26062 +/- ##
========================================
Coverage 69.67% 69.67%
========================================
Files 1405 1405
Lines 49728 49728
Branches 13748 13748
========================================
Hits 34646 34646
Misses 15082 15082 ☔ View full report in Codecov by Sentry. |
Builds ready [429068f]
Page Load Metrics (305 ± 254 ms)
Bundle size diffs
|
Description
This PR address the fix flaky test related to the
Account Custom Name Persistence persists custom account label through account change and wallet lock
Based on the screenshot from the pipeline, the Create button could not be clicked. Therefore, it has been replaced with the clickElementAndWaitToDisappear function.
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/92651/workflows/dac61e17-caa2-44ab-979c-05c38b16541b/jobs/3449337/tests
Related issues
Fixes:
#26061
Manual testing steps
Execute the test locally or codespaces using below commands:
yarn
ENABLE_MV3=false yarn build:test:flask
ENABLE_MV3=false yarn test:e2e:single test/e2e/accounts/create-snap-account.spec.ts --browser=firefox
There should not be CI failures related to the test.
Pre-merge author checklist
Pre-merge reviewer checklist