-
Notifications
You must be signed in to change notification settings - Fork 5k
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
test: Writing new test about metamask section links #22911
Conversation
… e2e/settings-about-metamask-links-test
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. |
Builds ready [3c1f4b2]
Page Load Metrics (995 ± 41 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #22911 +/- ##
===========================================
+ Coverage 68.55% 68.56% +0.01%
===========================================
Files 1096 1094 -2
Lines 43251 43231 -20
Branches 11525 11524 -1
===========================================
- Hits 29649 29641 -8
+ Misses 13602 13590 -12 ☔ View full report in Codecov by Sentry. |
Builds ready [e37ff3e]
Page Load Metrics (978 ± 26 ms)
Bundle size diffs
|
… e2e/settings-about-metamask-links-test
…etaMask/metamask-extension into e2e/settings-about-metamask-links-test
Builds ready [3d4fdd9]
Page Load Metrics (1917 ± 143 ms)
Bundle size diffs
|
Builds ready [8b3f89a]
Page Load Metrics (2215 ± 181 ms)
Bundle size diffs
|
Builds ready [baa70cc]
Page Load Metrics (1830 ± 106 ms)
Bundle size diffs
|
Builds ready [a3f2f7f]
Page Load Metrics (1860 ± 98 ms)
Bundle size diffs
|
Builds ready [e5988dc]
Page Load Metrics (1962 ± 124 ms)
Bundle size diffs
|
Builds ready [6077293]
Page Load Metrics (1630 ± 77 ms)
Bundle size diffs
|
Builds ready [3adcf96]
Page Load Metrics (1983 ± 81 ms)
Bundle size diffs
|
0a73d83
Builds ready [178e84c]
Page Load Metrics (1019 ± 404 ms)
Bundle size diffs
|
Description
This PR adds test coverage for About MetaMask section - Links using TypeScript which is critical flow in the extension.
Related issues
Fixes: #22812
Manual testing steps
Run the tests locally checkout to the branch
yarn
yarn start:test
yarn test:e2e:single test/e2e/tests/settings/about-metamask/ui-validation.spec.ts --browser=firefox --debug --leave-running
yarn test:e2e:single test/e2e/tests/settings/about-metamask/ui-validation.spec.ts --browser=chrome --debug --leave-running
** Notes **
This PR specifically addresses the links found in the About section, which is an essential aspect of the extension. This section provides users with access to support and privacy-related information, making it a critical pathway for user engagement and trust.
Initially, my strategy involved validating the functionality by clicking on the links within this section, which would then open in a new tab in the web browser, directing to the MetaMask and ConsenSys sites. However, I encountered a challenge: we needed to include the links in the privacy-snapshot.json file, along with the corresponding child links (such as YouTube, Twitter, etc.).
Consequently, the decision was made to avoid clicking on the links directly. Instead, we opted to validate the href attributes, and this task was successfully completed as part of the end-to-end (e2e) testing process. I strongly agree with the feedback provided by @seaona and I believe that this validation process should indeed be incorporated into the unit testing due to the effort involved in the validation now.
After dedicating some time to learning, I was able to write the unit tests and also have the e2e tests for comparative purposes. I also intend to document this here for future reference on the approach taken.
Pre-merge author checklist
Pre-merge reviewer checklist