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] Create base classes and methods for bitcoin e2e tests #29235

Merged
merged 15 commits into from
Dec 17, 2024

Conversation

chloeYue
Copy link
Contributor

@chloeYue chloeYue commented Dec 16, 2024

Description

  • Create a Bitcoin home page class and methods. The locators on homepage for Bitcoin accounts are different from the locators for other accounts. I think the best way to implement this is to create a BitcoinHomepage class that extends from Homepage. This approach will be flexible and easier to implement when we have new modifications for Bitcoin account functionalities.
  • Migrate bitcoin account e2e tests to TS and Page Object Model
test/e2e/flask/btc/btc-account-overview.spec.ts
test/e2e/flask/btc/btc-dapp-connection.spec.ts
test/e2e/flask/btc/btc-experimental-settings.spec.ts

Open in GitHub Codespaces

Related issues

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 self-assigned this Dec 16, 2024
@chloeYue chloeYue marked this pull request as draft December 16, 2024 14:39
Copy link
Contributor

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 requested a review from seaona December 16, 2024 14:39
css: '[data-testid="multichain-token-list-item-value"]',
text: '8.5 TST',
},
{ timeout: 10000 },
Copy link
Contributor Author

@chloeYue chloeYue Dec 16, 2024

Choose a reason for hiding this comment

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

remove the timeout parameter as the default timeout for findElement is 10000, we don't need to specify here

@metamaskbot
Copy link
Collaborator

Builds ready [6e9667f]
Page Load Metrics (1862 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32321561770367176
domContentLoaded15622131182815474
load15732157186216077
domInteractive278544189
backgroundConnect9167343718
firstReactRender1798492814
getState56417199
initialActions00000
loadScripts11401590134812359
setupStore787292914
uiStartup176329352200286137
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue marked this pull request as ready for review December 16, 2024 20:21
@chloeYue chloeYue changed the title test: migrate btc tests test: [POM] Create base classes and methods for bitcoin e2e tests Dec 16, 2024
@seaona
Copy link
Contributor

seaona commented Dec 17, 2024

Overall looks good 🙌 just added a couple of nits, feel free to take them or leave them 🙏

@metamaskbot
Copy link
Collaborator

Builds ready [cf0692c]
Page Load Metrics (2151 ± 63 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint26123061625829398
domContentLoaded18552347211712259
load18622354215113163
domInteractive30179613215
backgroundConnect8107312713
firstReactRender197938199
getState780302411
initialActions01000
loadScripts13731767159210550
setupStore85320168
uiStartup212732252513255122
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [faeb94e]
Page Load Metrics (1824 ± 72 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15662122182215474
domContentLoaded15462093178615775
load15682123182415172
domInteractive269541178
backgroundConnect976342110
firstReactRender1799432914
getState789242211
initialActions01000
loadScripts11131549133512862
setupStore790192211
uiStartup181028492146250120
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue requested a review from seaona December 17, 2024 11:13
seaona
seaona previously approved these changes Dec 17, 2024
seaona
seaona previously approved these changes Dec 17, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [a1cbd8a]
Page Load Metrics (1678 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14382115168320598
domContentLoaded14262102165420398
load144021211678208100
domInteractive24149463316
backgroundConnect126830178
firstReactRender1592382713
getState57815199
initialActions01000
loadScripts10491664125416981
setupStore65314168
uiStartup159727651987295142
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

cmd-ob
cmd-ob previously approved these changes Dec 17, 2024
@seaona seaona added this pull request to the merge queue Dec 17, 2024
@chloeYue chloeYue removed this pull request from the merge queue due to a manual request Dec 17, 2024
@chloeYue chloeYue dismissed stale reviews from cmd-ob and seaona via cac5274 December 17, 2024 14:27
@metamaskbot
Copy link
Collaborator

Builds ready [c7ad5a1]
Page Load Metrics (1701 ± 139 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint142824161712287138
domContentLoaded140023891680287138
load141323951701289139
domInteractive23104532512
backgroundConnect105026147
firstReactRender1581322411
getState66618199
initialActions00000
loadScripts104618841259225108
setupStore67114199
uiStartup156826981937323155
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue requested review from cmd-ob and seaona December 17, 2024 15:30
@chloeYue chloeYue added this pull request to the merge queue Dec 17, 2024
Merged via the queue into main with commit 460536a Dec 17, 2024
77 checks passed
@chloeYue chloeYue deleted the chloe-btc-tests branch December 17, 2024 17:56
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants