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: "Custom network customNetwork should add mainnet network" #24634

Closed
9 tasks
chloeYue opened this issue May 20, 2024 · 1 comment · Fixed by #24895
Closed
9 tasks

Flaky test: "Custom network customNetwork should add mainnet network" #24634

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

Comments

@chloeYue
Copy link
Contributor

What is this about?

Failure:
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/81018/workflows/092574cf-d4e8-4fbd-a5ae-b185ee6b9737/jobs/2868183/tests

Error message

Screenshot 2024-05-20 at 16 28 34

Screenshot
Screenshot 2024-05-20 at 16 28 10

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

@chloeYue
Copy link
Contributor Author

chloeYue commented May 20, 2024

Same error on this flaky test:

Custom network Popular Networks List when the network details validation toggle is turned off, don't validate user inserted details

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/81074/workflows/2646fbfb-5ee6-4a3c-8fb7-bd39a5aa7e40/jobs/2871100/tests

Image

@chloeYue chloeYue self-assigned this Jun 27, 2024
DDDDDanica pushed a commit that referenced this issue Jun 28, 2024
…t network" (#24895)

## **Description**

This PR addresses the flakiness in e2e test "Custom network
customNetwork should add mainnet network."

Root Cause: The flakiness happens due to occasionally hitting the API
rate limit while fetching the token symbol, resulting in the warning
message `"Ticker symbol verification data is currently unavailable..."`,
as indicated by the failure screenshots in the CI job. However, the test
is intended to verify the presence of a different warning: `"The token
symbol doesn't match the network or chainID..."`. Both warnings share
the same data-testid but differ in text. Consequently, when the first
warning appears, the test mistakenly identifies it as the second
warning, leading to test failure.

Fix Implemented: The solution for this test is to refine the selector
for the specific warning message we aim to verify. By making the
selector more precise, we ensure that the test accurately checks for the
intended warning, thereby eliminating the flakiness caused by the
confusion between the two warnings.


![Screenshot 2024-05-30 at 13 55
57](https://github.com/MetaMask/metamask-extension/assets/105063779/85e9dd36-6be1-4960-8920-f2e9f5d505a0)


![Screenshot 2024-05-30 at 11 57
16](https://github.com/MetaMask/metamask-extension/assets/105063779/5e47af8d-4c0f-4b31-a05e-0b9f9da04106)


[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24895?quickstart=1)

## **Related issues**

Fixes: #24634 

## **Manual testing steps**

1. Run the test several times yarn test:e2e:single
test/e2e/tests/network/add-custom-network.spec.js --browser=firefox
--leave-running --retryUntilFailure --retries=10
2. Check ci jobs

## **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**

- [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**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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: seaona <[email protected]>
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky tests release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-extension-platform
Projects
None yet
2 participants