cherry-pick test: fix flaky test `Import ERC1155 NFT should be... (#24709) into v11.16.1#24847
Merged
danjm merged 1 commit intoVersion-v11.16.1from May 28, 2024
Merged
Conversation
…ERC1155 NFT that user owns` (#24709) ## **Description** This PR fixes the flaky tests related to ERC1155 token imports. The problem is that whenever we import a token, we are making a call to IPFS, which was currently not mocked. This caused that anytime that the response took long, the test failed. The fix is simply add a mock for the IPFS request. However, this shows that we have a bug in the Import process, as we should be able to import the token even if the IPFS call has not ended. Now, it might take several minutes, and we can import the token once we get the timeout response `504`. I opened an issue [here](#24710) ## **Related issues** Fixes: #24604 ## **Manual testing steps** 1. Run the test multiple times `yarn test:e2e:single test/e2e/tests/tokens/nft/import-erc1155.spec.js --browser=firefox --leave-running --retryUntilFailure --retries=10` 2. Check ci ## **Screenshots/Recordings**  https://github.com/MetaMask/metamask-extension/assets/54408225/a397575b-52a9-47d7-8243-c0fec734e6d8 ## **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 - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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.
Contributor
|
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. |
Collaborator
|
No release label on PR. Adding release label release-11.16.1 on PR, as PR was cherry-picked in branch 11.16.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry-pick test: fix flaky test `Import ERC1155 NFT should be able to import an … 3ddb0d4 (#24709) into v11.16.1
No merge conflicts