Skip to content
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: [POM] Migrate dapp interaction e2e tests to TS and Page Object Model (part1) #30090

Merged
merged 13 commits into from
Feb 13, 2025

Conversation

chloeYue
Copy link
Contributor

@chloeYue chloeYue commented Feb 4, 2025

Description

First PR to migrate dapp interaction e2e tests to TypeScript and the Page Object Model.

Specs migrated:

test/e2e/tests/dapp-interactions/block-explorer.spec.js
test/e2e/tests/dapp-interactions/dapp-interactions.spec.js

Page classes created:

test/e2e/page-objects/pages/confirmations/redesign/add-network-confirmations.ts
test/e2e/page-objects/pages/confirmations/redesign/connect-account-confirmation.ts
test/e2e/page-objects/pages/mocked-page.ts

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

Check code readability, make sure tests pass.

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@chloeYue chloeYue added team-extension-platform Extension Platform team e2e-test End to end test for the MetaMask extension team-qa QA team labels Feb 4, 2025
@chloeYue chloeYue requested a review from a team February 4, 2025 11:29
@chloeYue chloeYue self-assigned this Feb 4, 2025
@chloeYue chloeYue requested a review from a team as a code owner February 4, 2025 11:29
@chloeYue chloeYue marked this pull request as draft February 4, 2025 11:30
Copy link
Contributor

github-actions bot commented Feb 4, 2025

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.

@chloeYue chloeYue changed the title test: Chloe tests dapp test: [POM] Migrate dapp interaction e2e tests to TS and Page Object Model (part1) Feb 4, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [cc7d329]
Page Load Metrics (1751 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15321997175112359
domContentLoaded15161986172412460
load15352013175112661
domInteractive2395412010
backgroundConnect973362311
firstReactRender16177423919
getState4141203115
initialActions01000
loadScripts10321534126812560
setupStore76417189
uiStartup172327302031218105
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 55 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue removed the request for review from a team February 4, 2025 12:21
@metamaskbot
Copy link
Collaborator

Builds ready [2823ea7]
Page Load Metrics (1890 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15562239190118589
domContentLoaded15292170185617282
load15442235189017886
domInteractive26104462612
backgroundConnect1396372512
firstReactRender16167573818
getState56217189
initialActions01000
loadScripts10681709137215474
setupStore880242311
uiStartup177730622245308148
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 55 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [84ea252]
Page Load Metrics (1814 ± 69 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34521161740355170
domContentLoaded15092064178914972
load15502081181414469
domInteractive25102392210
backgroundConnect116430199
firstReactRender17100382713
getState46217178
initialActions00000
loadScripts10761490130612460
setupStore777212211
uiStartup17392543208520397
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 55 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue marked this pull request as ready for review February 12, 2025 10:52
@metamaskbot
Copy link
Collaborator

Builds ready [e09dcf8]
Page Load Metrics (1728 ± 73 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15312092172615072
domContentLoaded15182008169013967
load15322103172815273
domInteractive248737189
backgroundConnect10104412613
firstReactRender1691402512
getState45917168
initialActions01000
loadScripts10251535121413062
setupStore66515168
uiStartup17142360198516378
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 55 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@seaona seaona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good 🔥 Added a small suggestion to mitigate future flakiness

hjetpoluru
hjetpoluru previously approved these changes Feb 12, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [1507d67]
Page Load Metrics (1671 ± 76 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32720791605333160
domContentLoaded14382024164814570
load14492081167115776
domInteractive17149483316
backgroundConnect86024168
firstReactRender1578432713
getState45613178
initialActions00000
loadScripts10191550120713565
setupStore75711115
uiStartup16932359191316077
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 55 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

seaona
seaona previously approved these changes Feb 13, 2025
test/e2e/constants.ts Outdated Show resolved Hide resolved
DDDDDanica
DDDDDanica previously approved these changes Feb 13, 2025
@chloeYue chloeYue dismissed stale reviews from DDDDDanica and seaona via eb618c9 February 13, 2025 10:48
DDDDDanica
DDDDDanica previously approved these changes Feb 13, 2025
seaona
seaona previously approved these changes Feb 13, 2025
@chloeYue chloeYue enabled auto-merge February 13, 2025 11:07
@chloeYue chloeYue dismissed stale reviews from seaona and DDDDDanica via 6b538b3 February 13, 2025 11:49
@chloeYue chloeYue disabled auto-merge February 13, 2025 11:54
@metamaskbot
Copy link
Collaborator

Builds ready [6b538b3]
Page Load Metrics (1684 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15121971169311254
domContentLoaded14591956166211857
load14701971168412258
domInteractive24120492814
backgroundConnect107127189
firstReactRender16103322612
getState55618199
initialActions00000
loadScripts10361453120810852
setupStore66419209
uiStartup17212239194414871
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 47 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue requested a review from DDDDDanica February 13, 2025 12:41
@DDDDDanica DDDDDanica added this pull request to the merge queue Feb 13, 2025
Merged via the queue into main with commit 9ec8eaf Feb 13, 2025
73 checks passed
@DDDDDanica DDDDDanica deleted the chloe-tests-dapp branch February 13, 2025 16:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2025
@metamaskbot metamaskbot added the release-12.13.0 Issue or pull request that will be included in release 12.13.0 label Feb 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2e-test End to end test for the MetaMask extension release-12.13.0 Issue or pull request that will be included in release 12.13.0 team-extension-platform Extension Platform team team-qa QA team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants