-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: flaky test Settings Redirects to ENS domains when user inputs ENS into address bar
#24898
Conversation
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. |
return currentUrl === ENS_DESTINATION_URL; | ||
}, tinyDelayMs); | ||
|
||
await driver.quit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to start or stop the driver manually, as now it's done within the fixtures
@@ -10,25 +155,36 @@ describe('Settings', function () { | |||
it('Redirects to ENS domains when user inputs ENS into address bar', async function () { | |||
// Using proxy port that doesn't resolve so that the browser can error out properly | |||
// on the ".eth" hostname. The proxy does too much interference with 8000. | |||
const { driver } = await buildWebDriver({ proxyUrl: '127.0.0.1:8001' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to preserve the proxy number, we now pass this as an option in fixtures, and forward it to the chrome/firefox drivers as an option
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #24898 +/- ##
========================================
Coverage 64.92% 64.92%
========================================
Files 1385 1385
Lines 54875 54875
Branches 14409 14409
========================================
Hits 35625 35625
Misses 19250 19250 ☔ View full report in Codecov by Sentry. |
@seaona, I am getting this error when I ran locally against firefox and its not consistent.
|
Builds ready [5da3ac2]
Page Load Metrics (837 ± 559 ms)
Bundle size diffs
|
Co-authored-by: legobeat <[email protected]>
hey @hjetpoluru 👋 thank you for reporting this 🙇♀️ I'll trigger a couple of more ci runs to double-check it does not fail and report back here 🙏 |
Builds ready [852ccdf]
Page Load Metrics (214 ± 216 ms)
|
@seaona , Good part is that - the issue is partially fixed - we are now able to obtain the failure details in the artifacts. However, the downside is that it's still flaky.https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/84316/workflows/2cea2ca2-c1d0-4e82-96dc-a51859d177dc/jobs/3033481/artifacts |
yeah @hjetpoluru I move this to draft to investigate further the flakiness observed in ci, now that we have screenshots available with the current fix 👍 thank you!! |
Builds ready [2fe41ee]
Page Load Metrics (42 ± 2 ms)
Bundle size diffs
|
The redirect flakiness has now been mitigated using @HowardBraham 's suggestion with the use of a greater max value. |
Builds ready [0c255ca]
Page Load Metrics (132 ± 164 ms)
Bundle size diffs
|
Description
This PR fixes some flakiness of the test
Settings Redirects to ENS domains when user inputs ENS into address bar
. After looking into the code I've identified a source of flakiness, as well as a problem that prevents to upload the artifacts (screenshot) if the test fail.verboseReportOnFailure(title,error)
on error, making it harder to debug, as no artifacts are uploaded for this test, if it fails. Now we are going to be able to see the screenshot if the test ever fails againCircle ci job: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/83569/workflows/0883aa51-cd94-4066-9f96-77d1375e5e9b/jobs/2994904/tests
Failure log:
TimeoutError: Wait timed out after 213ms
Extra note: @davidmurdoch is also working on mitigating the rest of the flakiness by waiting for the metamask to be fully initialized before proceeding with the test. This work will be done in a separate PR.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
See no artifact file was uploaded:
https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/83569/workflows/0883aa51-cd94-4066-9f96-77d1375e5e9b/jobs/2994904/artifacts
Pre-merge author checklist
Pre-merge reviewer checklist