metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

docs: Add jsdoc comments for driver functions

Open hjetpoluru opened this issue 11 months ago • 10 comments

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.

Open in GitHub Codespaces

Related issues

Fixes: #23698

Manual testing steps

Click here to access README

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.

hjetpoluru avatar Mar 25 '24 14:03 hjetpoluru

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.

github-actions[bot] avatar Mar 25 '24 14:03 github-actions[bot]

Builds ready [4b95d74]
Page Load Metrics (1478 ± 607 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint723481727938
domContentLoaded11103412914
load59345514781265607
domInteractive11103412914
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Apr 15 '24 00:04 metamaskbot

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.

codecov[bot] avatar Apr 15 '24 00:04 codecov[bot]

Builds ready [4cfe11f]
Page Load Metrics (1328 ± 595 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint763281507335
domContentLoaded108331199
load61313013281239595
domInteractive108331199
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Apr 16 '24 03:04 metamaskbot

Builds ready [44c8af6]
Page Load Metrics (1232 ± 551 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint683311507134
domContentLoaded126331147
load53260312321148551
domInteractive116331147
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Apr 16 '24 13:04 metamaskbot

Builds ready [156be32]
Page Load Metrics (1524 ± 635 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint763421558842
domContentLoaded126926168
load62349415241323635
domInteractive126926168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Apr 19 '24 00:04 metamaskbot

@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.

hjetpoluru avatar Apr 19 '24 13:04 hjetpoluru

Builds ready [4f16912]
Page Load Metrics (1218 ± 669 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6982117817182
domContentLoaded11160403416
load56316812181393669
domInteractive11160403416
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar Apr 19 '24 13:04 metamaskbot

Builds ready [3ad8ed6]
Page Load Metrics (912 ± 552 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint69151992713
domContentLoaded10371363
load5630889121150552
domInteractive10371363
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar May 20 '24 20:05 metamaskbot