-
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
Cherrypick flaky test fix 12.2.0 #26747
Conversation
…to metrics @no-mmi should send error events in background` (#26216) [The test is flaky](https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/94004/workflows/25f428d4-8fcb-4aca-8ddb-49edb51b57cf/jobs/3499122/tests) as sometimes we get a different error in the mocked endpoint, `Error: Could not establish connection. Receiving end does not exist`, instead of the expected one. This is because the condition for entering into the mock is not strict enough, and both errors include `value":"Cannot read properties of undefined (reading 'version')` in their body. The solution here is: - make the condition mock more strict, to make sure we capture the error we want (not the `receiving end` one) - verify that this specific request is mocked - no need to assert on the json body as we already have this in the mock condition, however we leave it for debugging purposes. The change that has been made, is to assert the complete error all in once, so we get a more meaningful assertion and failure (if that's the case) --------- Co-authored-by: Mark Stacey <markjstacey@gmail.com>
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. |
63b1a5f
to
9880b94
Compare
…S into address bar (#25782) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The fix is based on adding a css class `controller-loaded` whenever the initialization is done and using this class to determine when to proceed with the test action of navigating to a new page, where we try to resolve an ens address. The author of this work is @davidmurdoch [PR](#25334) , and I just fixed the conflicts with develop. Note: When I tried to do this in David's branch I got this error, and also if I try to merge this branch into his, then I see >900 changes against develop, which is quite strange 🤔 so I'm now targeting develop directly in this branch, on top of his commits. ![Screenshot from 2024-07-11 20-58-14](https://github.com/user-attachments/assets/c6d43195-2985-409c-88f0-48218ade03f4) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25782?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: David Murdoch <david@davidmurdoch.com>
## **Description** Temporarily disabling the tests that were added [here](#25060), because they need to be more stable. Once they are, we can enable them again. ## **Related issues** Fixes: ## **Manual testing steps** 1. `test-e2e-swap-playwright - OPTIONAL` step will not be run in a pull request. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Builds ready [4564ed1]
Page Load Metrics (736 ± 489 ms)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## Version-v12.2.0 #26747 +/- ##
===================================================
- Coverage 70.18% 70.17% -0.01%
===================================================
Files 1398 1398
Lines 49351 49358 +7
Branches 13566 13569 +3
===================================================
Hits 34633 34633
- Misses 14718 14725 +7 ☔ View full report in Codecov by Sentry. |
Builds ready [3de4857]
Page Load Metrics (431 ± 351 ms)
|
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!
No release label on PR. Adding release label release-12.2.0 on PR, as PR was cherry-picked in branch 12.2.0. |
Description
Cherrypick 2 flaky test fix in 12.2.0, so it will help future CI to pass quicker for this release.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist