22542 add e2e test for update network#22762
Conversation
… 22542-add-e2e-test-for-update-network
|
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #22762 +/- ##
========================================
Coverage 68.47% 68.47%
========================================
Files 1088 1088
Lines 42956 42956
Branches 11436 11436
========================================
Hits 29410 29410
Misses 13546 13546 ☔ View full report in Codecov by Sentry. |
|
|
@HowardBraham ,Thank you for your keen observation regarding centralizing the object selectors. I absolutely agree that there is duplication in that regard. Mariona is currently working on implementing the Page Object Model, which will be a significant framework change, and we will address this issue as part of that process. I did explore TypeScript briefly, using your accounts as a reference, but I encountered some challenges. I plan to allocate some time today to give it another try. I agree with your recommendation that we should transition to writing our code in TypeScript. |
Builds ready [698d395]
Page Load Metrics (871 ± 41 ms)
Bundle size diffs
|
…taMask/metamask-extension into 22542-add-e2e-test-for-update-network
Builds ready [dee828c]
Page Load Metrics (817 ± 19 ms)
Bundle size diffs
|
|
I was thinking about what Mark Stacey said today with our very large CircleCI usage. In that context, it makes sense to combine and form larger tests. I tried, and this could be condensed into a single test that takes 55 seconds to run. This is true because nothing has to be "reset" in between tests. How do other people feel about this? |
Builds ready [57034e2]
Page Load Metrics (896 ± 97 ms)
Bundle size diffs
|
Hi @HowardBraham , Yes, I always agree with the idea of smart coupling for e2e test, It reduces execution time, it's more "end-to-end" to test a user flow, it's closer to real user's behaviour, as real user don't have a clean setup each time. Additionally, as you mentioned, it saves money on CircleCI. We do acknowledge the downside that if one step fails, the whole test will fail, making it slightly more challenging to debug. However, overall, the advantages outweigh the disadvantages, making it reasonable to combine certain our e2e tests. |
Builds ready [ec2d41b]
Page Load Metrics (930 ± 33 ms)
Bundle size diffs
|
danjm
left a comment
There was a problem hiding this comment.
Nice work. I'm glad we are validating the error case as well. I have made a couple of suggestions
… 22542-add-e2e-test-for-update-network
… added them in development code
…tId' and added them in development code" This reverts commit 955b056.
Builds ready [6a70b6f]
Page Load Metrics (739 ± 14 ms)
Bundle size diffs
|
Builds ready [2079e33]
Page Load Metrics (765 ± 24 ms)
Bundle size diffs
|
Builds ready [8e45c04]
Page Load Metrics (919 ± 32 ms)
Bundle size diffs
|
3e4b7a8
Builds ready [3e4b7a8]
Page Load Metrics (1096 ± 66 ms)
Bundle size diffs
|
Builds ready [babc8df]
Page Load Metrics (970 ± 41 ms)
Bundle size diffs
|
Description
This PR adds test coverage for update network which is critical flow in the extension.
Related issues
Fixes:
Manual testing steps
Run the tests locally
yarn
yarn start:test
yarn test:e2e:single test/e2e/tests/network/update-network.spec.ts --browser=chrome --debug --leave-running
yarn test:e2e:single test/e2e/tests/network/update-network.spec.ts --browser=firefox --debug --leave-running
Pre-merge author checklist
Pre-merge reviewer checklist