Skip to content
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

Flaky Test: "Import ERC1155 NFT should be able to import an ERC1155 NFT that user owns" #24604

Closed
9 tasks
chloeYue opened this issue May 20, 2024 · 1 comment · Fixed by #24709
Closed
9 tasks
Assignees
Labels
flaky tests release-11.16.1 Issue or pull request that will be included in release 11.16.1 release-12.0.0 team-extension-platform

Comments

@chloeYue
Copy link
Contributor

What is this about?

Failure:
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/81132/workflows/76b59ca6-3a4d-4273-84a9-38283f2d2754/jobs/2874086/tests

Error message
Screenshot 2024-05-20 at 11 21 02

Screenshot
Screenshot 2024-05-20 at 11 20 50

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@seaona seaona self-assigned this May 21, 2024
seaona added a commit that referenced this issue May 22, 2024
…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**

![Screenshot from 2024-05-22
15-42-15](https://github.com/MetaMask/metamask-extension/assets/54408225/2dbd4f9f-8e22-47da-9aaa-4e5b002b47d8)



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.
dbrans pushed a commit that referenced this issue May 28, 2024
…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**

![Screenshot from 2024-05-22
15-42-15](https://github.com/MetaMask/metamask-extension/assets/54408225/2dbd4f9f-8e22-47da-9aaa-4e5b002b47d8)



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.
@metamaskbot metamaskbot added the release-11.16.1 Issue or pull request that will be included in release 11.16.1 label May 28, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-11.16.1 on issue. Adding release label release-11.16.1 on issue, as issue is linked to PR #24709 which has this release label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky tests release-11.16.1 Issue or pull request that will be included in release 11.16.1 release-12.0.0 team-extension-platform
Projects
None yet
4 participants