Commit 5dbfbc2
authored
fix: flaky test
<!--
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 spec is flaky as sometimes we get a failed request, because we
stopped the mock server.
This changes the approach and keeps the mock server open. We only let
pass through the ens req
This will avoid errors while other API requests happen on the
background, as we keep the rest of the mocks as usual
<img width="401" height="126" alt="image"
src="https://github.com/user-attachments/assets/24f60101-e9e6-4376-823f-454cc61a1ba7"
/>
https://github.com/search?q=org%3AMetaMask+%22failed+to+generate+nonce%22&type=code
[](https://codespaces.new/MetaMask/metamask-extension/pull/37983?quickstart=1)
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
1. Check ci
## **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 Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.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/main/.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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Stabilizes the ENS/IPFS settings e2e test by keeping the mock server
running and pass-through ENS requests instead of stopping the server.
>
> - **E2E Tests
(`test/e2e/tests/settings/ipfs-ens-resolution.spec.ts`)**:
> - Import `MockedEndpoint` and add `ensDomainPassthrough` helper to
pass through `ENS_NAME_URL` and `ENS_DESTINATION_URL`.
> - Replace ad-hoc server handling with `testSpecificMock:
ensDomainPassthrough`; remove manual server stop.
> - Goal: avoid request failures by keeping mocks active while allowing
ENS requests to pass through.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7b076d8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->Settings Does not fetch ENS data for ENS Domain when ENS and IPFS switched off (#37983)1 parent 771fa62 commit 5dbfbc2
1 file changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
| |||
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
0 commit comments