metamask-extension
metamask-extension copied to clipboard
docs: Add jsdoc comments for driver functions
Description
As part of our documentation efforts, adding JSDoc comments to the driver function will enhance understanding of what the functions perform. Including examples for some functions is essential for better comprehension and usage, leading to improved coverage. This may also help in reducing flakiness and improving code consistency. Anyone onboarding and wishing to use automation with a customized Selenium driver should be able to manage effectively.
Related issues
Fixes: #23698
Manual testing steps
Pre-merge author checklist
- [x] I’ve followed MetaMask Coding Standards.
- [x] I've completed the PR template to the best of my ability
- [ ] 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.
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.
Builds ready [4b95d74]
- 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 (1478 ± 607 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 72 | 348 | 172 | 79 | 38 |
domContentLoaded | 11 | 103 | 41 | 29 | 14 | ||
load | 59 | 3455 | 1478 | 1265 | 607 | ||
domInteractive | 11 | 103 | 41 | 29 | 14 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 67.60%. Comparing base (
55d364d
) to head (4f16912
).
:exclamation: Current head 4f16912 differs from pull request most recent head 3ad8ed6
Please upload reports for the commit 3ad8ed6 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## develop #23699 +/- ##
===========================================
+ Coverage 67.38% 67.60% +0.22%
===========================================
Files 1289 1253 -36
Lines 50235 49025 -1210
Branches 13008 12807 -201
===========================================
- Hits 33849 33143 -706
+ Misses 16386 15882 -504
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [4cfe11f]
- 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 (1328 ± 595 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 76 | 328 | 150 | 73 | 35 |
domContentLoaded | 10 | 83 | 31 | 19 | 9 | ||
load | 61 | 3130 | 1328 | 1239 | 595 | ||
domInteractive | 10 | 83 | 31 | 19 | 9 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [44c8af6]
- 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 (1232 ± 551 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 68 | 331 | 150 | 71 | 34 |
domContentLoaded | 12 | 63 | 31 | 14 | 7 | ||
load | 53 | 2603 | 1232 | 1148 | 551 | ||
domInteractive | 11 | 63 | 31 | 14 | 7 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [156be32]
- 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 (1524 ± 635 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 76 | 342 | 155 | 88 | 42 |
domContentLoaded | 12 | 69 | 26 | 16 | 8 | ||
load | 62 | 3494 | 1524 | 1323 | 635 | ||
domInteractive | 12 | 69 | 26 | 16 | 8 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
@HowardBraham , Thank you for the feedback. I've simplified and updated the text, including the parameter descriptions and return values as you suggested. I've also provided detailed explanations in the README and organized it accordingly. Please let me know if there's anything else that needs to be done. Note:- I have included examples for the essential functions in the Driver, and all are covered in the README.
Builds ready [4f16912]
- 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 (1218 ± 669 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 69 | 821 | 178 | 171 | 82 |
domContentLoaded | 11 | 160 | 40 | 34 | 16 | ||
load | 56 | 3168 | 1218 | 1393 | 669 | ||
domInteractive | 11 | 160 | 40 | 34 | 16 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [3ad8ed6]
- 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 (912 ± 552 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 69 | 151 | 99 | 27 | 13 |
domContentLoaded | 10 | 37 | 13 | 6 | 3 | ||
load | 56 | 3088 | 912 | 1150 | 552 | ||
domInteractive | 10 | 37 | 13 | 6 | 3 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)