-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Cherry-pick pr from develop to v11.16.0 to fix flaky test #24564
Conversation
Updates the gas fee controller to v11.15.2, so that the gas fee controller is instantiated with the proper metadata. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24520?quickstart=1) Fixes: #24383 1. Start a tx 2. Add recipient and amount 3. Check console, there should not be a `Error: No metadata found for 'nonRPCGasFeeApisDisabled'` - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] 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. - [ ] 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.
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. |
## **Description** ` request-queueing/ui.spec.js` has been particularly flaky. In particular, the problem was described as follows: > The test stalls for 10+ seconds locally at detecting 4 windows: > await driver.waitUntilXWindowHandles(numHandles) > The test is doing exactly what it's meant to but the waitUntilXWindowHandles call is taking an eternity I noticed that this line in particular in the `waitUntilXWindowHandles` helper method seemed to take a long time to resolve in only one case: `windowHandles = await this.driver.getAllWindowHandles();` So the problem seemed to be not with our `waitUntilXWindowHandles` itself, but something related to selenium- webdriver's own `getAllWindowHandles` method From this stack overflow post, it seems that others have had trouble with having `getAllWindowHandles` resolve when `executeScript` is not resolved https://stackoverflow.com/questions/64687179/calling-getwindowhandles-again-causing-timeout So the attempted fix, which worked on three successive local runs, is to properly await the executeScript that happens before the `getAllWindowHandles` call in question. We also need to remove the `return` from the script to be executed, so that webdriver-selenium is not waiting for a returned promise to resolve. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24440?quickstart=1) ## **Manual testing steps** 1. ` request-queueing/ui.spec.js` should pass in automated tests and not be flaky ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] 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.
The use of driver.navigate() in combination with the use of driver.navigate() in unlockWallet helper function was causing the page to reload in e2e tests. This is causing issues with filling in the password when unlocking the wallet. <img width="881" alt="image" src="https://github.com/MetaMask/metamask-extension/assets/10986371/db981ad9-4705-46f1-ae80-30456706e952"> I suspect the test was trying to access DOM elements created before the re-rendering. <!-- 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. --> <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24436?quickstart=1) Fixes: 1. Go to this page... 2. 3. <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- [screenshots/recordings] --> <!-- [screenshots/recordings] --> - [ ] I’ve followed [MetaMask 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. - [ ] 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.
…1.15.0 The version bump changes in #24306 were previously cherry-picked to v11.14.5, but the test changes were not, as they were not needed on that branch, as the gas feel controller wasn't actually updated on that branch. Now that v11.16.0 is using the latest gas-fee-controller, we need the sentry and snapshot changes
fed7882
to
46685a5
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/snaps-controllers@8.1.1, npm/@metamask/snaps-execution-environments@6.1.0, npm/@metamask/snaps-rpc-methods@8.1.0, npm/@metamask/snaps-sdk@4.2.0, npm/@metamask/snaps-utils@7.4.0 |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhy is contributor and author data important?Package does not specify a list of contributors or an author in package.json. Add a author field or contributors array to package.json. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Description
Cherry PR's from develop to release v11.16.0 for flaky test fix