E2e request queuing
Description
Adds e2e tests for the request queuing system. Tests include enable the toggle settings, sending a tx from a different selected/global network which results in a switch chain request, and request queuing for multiple daps on different networks.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1404
Manual testing steps
yarn && yarn build:testyarn test:e2e:single test/e2e/tests/request-queuing/enable-queuing.spec.js --browser=chromeyarn test:e2e:single test/e2e/tests/request-queuing/switch-network.spec.js --browser=chromeyarn test:e2e:single test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js --browser=chrome- All request queuing tests should pass individually.
yarn test:e2e:chrome && yarn test:e2e:firefoxfor a bonus.
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [x] I’ve followed MetaMask Coding Standards.
- [x] I've clearly explained what problem this PR is solving and how it is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using JSDoc format if applicable
- [x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [x] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to "non-draft".
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.
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 Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 68.51%. Comparing base (
c9ccde4) to head (c599f14).
:exclamation: Current head c599f14 differs from pull request most recent head 698ab1e. Consider uploading reports for the commit 698ab1e to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## develop #22818 +/- ##
===========================================
+ Coverage 68.49% 68.51% +0.02%
===========================================
Files 1092 1088 -4
Lines 43170 42914 -256
Branches 11512 11426 -86
===========================================
- Hits 29567 29399 -168
+ Misses 13603 13515 -88
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [2600e22]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (753 ± 15 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 87 | 160 | 106 | 15 | 7 |
| domContentLoaded | 9 | 44 | 17 | 7 | 3 | ||
| load | 695 | 822 | 753 | 32 | 15 | ||
| domInteractive | 9 | 44 | 17 | 7 | 3 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [add1d9d]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (832 ± 31 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 92 | 151 | 118 | 15 | 7 |
| domContentLoaded | 10 | 30 | 19 | 6 | 3 | ||
| load | 728 | 1011 | 832 | 65 | 31 | ||
| domInteractive | 10 | 30 | 19 | 6 | 3 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [2f39f3f]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (779 ± 22 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 92 | 156 | 111 | 16 | 7 |
| domContentLoaded | 9 | 21 | 15 | 3 | 2 | ||
| load | 716 | 888 | 779 | 45 | 22 | ||
| domInteractive | 9 | 21 | 15 | 3 | 2 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [195fb6a]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (778 ± 12 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 87 | 116 | 98 | 8 | 4 |
| domContentLoaded | 10 | 21 | 16 | 3 | 1 | ||
| load | 736 | 860 | 778 | 25 | 12 | ||
| domInteractive | 10 | 21 | 16 | 3 | 1 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [4f97800]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (722 ± 16 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 81 | 117 | 89 | 9 | 4 |
| domContentLoaded | 9 | 22 | 16 | 3 | 1 | ||
| load | 687 | 789 | 722 | 34 | 16 | ||
| domInteractive | 9 | 22 | 16 | 3 | 1 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [bbed57f]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (811 ± 23 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 82 | 136 | 105 | 13 | 6 |
| domContentLoaded | 9 | 37 | 19 | 8 | 4 | ||
| load | 723 | 898 | 811 | 49 | 23 | ||
| domInteractive | 9 | 37 | 19 | 8 | 4 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [c599f14]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1029 ± 43 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 132 | 372 | 208 | 49 | 24 |
| domContentLoaded | 9 | 73 | 37 | 25 | 12 | ||
| load | 925 | 1298 | 1029 | 89 | 43 | ||
| domInteractive | 9 | 73 | 37 | 25 | 12 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [698ab1e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1911 ± 87 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 105 | 480 | 194 | 82 | 39 |
| domContentLoaded | 10 | 101 | 39 | 27 | 13 | ||
| load | 1632 | 2236 | 1911 | 182 | 87 | ||
| domInteractive | 10 | 101 | 39 | 27 | 13 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 86 Bytes (0.00%)
- common: 0 Bytes (0.00%)