Skip to content

test: MMQA 1570 - migrate ppom-toggle-settings.spec.js to POM#40926

Draft
LeVinhGithub wants to merge 3 commits intomainfrom
harry/MMQA-1570
Draft

test: MMQA 1570 - migrate ppom-toggle-settings.spec.js to POM#40926
LeVinhGithub wants to merge 3 commits intomainfrom
harry/MMQA-1570

Conversation

@LeVinhGithub
Copy link
Contributor

@LeVinhGithub LeVinhGithub commented Mar 16, 2026

Description

Refactors the PPOM Settings E2E tests to align with the project's Page Object Model (POM) and TypeScript standards.

  1. TypeScript migration: Replaces ppom-toggle-settings.spec.js with a TypeScript version (.ts) and uses ES module imports instead of require.
  2. POM refactor: Replaces hardcoded selectors with page object methods:
    • TestDapp: Adds maliciousPermitButton locator and clickMaliciousPermitButton() for the malicious permit button.
    • Confirmation: Adds securityProviderBannerAlert locator and checkSecurityProviderBannerAlertIsPresent() for the Blockaid alert banner.
    • Reuses existing methods for settings navigation: HeaderNavbar.openSettingsPage(), SettingsPage.goToPrivacySettings(), and PrivacySettings.toggleBlockaidAlerts().
  3. Test logic: Keeps both scenarios unchanged: (1) PPOM warning hidden when toggle is off, (2) PPOM warning shown when toggle is on (default).

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: MMQA-1570

Manual testing steps

  1. Build the test bundle: yarn build:test
  2. Run the PPOM Settings tests: yarn test:e2e:single test/e2e/tests/ppom/ppom-toggle-settings.spec.ts --browser=chrome
  3. Tests are currently skipped (it.skip); for manual verification, remove the skip and run the above command.

Screenshots/Recordings

Before

N/A — test refactor only; no UI changes.

After

N/A — test refactor only; no UI changes.

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.

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

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 16, 2026

✨ Files requiring CODEOWNER review ✨

🧪 @MetaMask/qa (2 files, +15 -0)
  • 📁 test/
    • 📁 e2e/
      • 📁 page-objects/
        • 📁 pages/
          • 📁 confirmations/
            • 📄 confirmation.ts +7 -0
            • 📄 test-dapp.ts +8 -0

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 16, 2026

Builds ready [80d110b]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account36926849498479494
total36926849498479494
Confirm Txconfirm_tx6031600260642160416064
total6031600260642160416064
Bridge User Actionsbridge_load_page27322834546308345
bridge_load_asset_picker22816126238258262
bridge_search_token75173877214762772
total1251122712641412621264
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14321215183510914731623
load118999915569812351364
domContentLoaded118299215509612291358
domInteractive2917123202685
firstPaint161691376143209287
backgroundConnect21119627013212241
firstReactRender20124572136
initialActions105114
loadScripts98880313439510311164
setupStore1363151621
numNetworkReqs393186164079
Power User HomeuiStartup5737227718504289666549590
load13651156215514814021672
domContentLoaded13441149213714413821660
domInteractive44212984636163
firstPaint20596565102282359
backgroundConnect207531014982261328935146
firstReactRender26174762739
initialActions108113
loadScripts1111938185213311571392
setupStore1777191832
numNetworkReqs2298939864264345
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2212172253222225
srpButtonToSrpForm9896101298101
confirmSrpToPwForm22222302323
pwFormToMetricsScreen16161601616
metricsToWalletReadyScreen17171811718
doneButtonToHomeScreen64662567018664670
openAccountMenuToAccountListLoaded2925290029501729252950
total3949393739771639453977
Onboarding New WalletcreateWalletToSocialScreen2202192221221222
srpButtonToPwForm1101081121110112
createPwToRecoveryScreen989099
skipBackupToMetricsScreen40384214042
agreeButtonToOnboardingSuccess16151711717
doneButtonToAssetList50248451113511511
total89887891215912912
Asset DetailsassetClickToPriceChart56536345563
total56536345563
Solana Asset DetailsassetClickToPriceChart1008112317111123
total1008112317111123
Import Srp HomeloginToHomeScreen2247221722692122662269
openAccountMenuAfterLogin59486676466
homeAfterImportWithNewWallet2407236824282424252428
total4711466047584047424758
Send TransactionsopenSendPageFromHome472379237279
selectTokenToSendFormLoaded29263222832
reviewTransactionToConfirmationPage1053696141825912681418
total1139751147826213751478
SwapopenSwapPageFromHome1217615228150152
fetchAndDisplaySwapQuotes269226902693126922693
total2814277028442728412844
🌐 Dapp Page Load Benchmarks

Current Commit: 80d110b | Date: 3/16/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±41ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 721ms (±38ms) 🟢 | historical mean value: 738ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 41ms 973ms 1.32s 1.05s 1.32s
domContentLoaded 721ms 38ms 676ms 996ms 739ms 996ms
firstPaint 79ms 11ms 64ms 176ms 88ms 176ms
firstContentfulPaint 79ms 11ms 64ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@LeVinhGithub LeVinhGithub changed the title test: migrate ppom-toggle-settings.spec.js to POM test: MMQA 1570 - migrate ppom-toggle-settings.spec.js to POM Mar 17, 2026
@sonarqubecloud
Copy link

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 17, 2026

Builds ready [ab64778]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account29628531812302318
total29628531812302318
Confirm Txconfirm_tx6066603361183460726118
total6066603361183460726118
Bridge User Actionsbridge_load_page23920327524246275
bridge_load_asset_picker24422426514252265
bridge_search_token7707617786771778
total125012481252212521252
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup15491273218612115991738
load12821030178611213371466
domContentLoaded12731019177311113301459
domInteractive3219117222794
firstPaint218731391235228417
backgroundConnect21920027316223256
firstReactRender20125572134
initialActions107115
loadScripts1074827153910911271255
setupStore1485271625
numNetworkReqs393191173183
Power User HomeuiStartup5283239913861227463648518
load13111077192113413711586
domContentLoaded12881067188812813471527
domInteractive36191963332114
firstPaint1898651094269334
backgroundConnect152528010568192012944793
firstReactRender24175152632
initialActions106113
loadScripts1066859164812210981285
setupStore167169171626
numNetworkReqs25912035560306337
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202192221220222
srpButtonToSrpForm96959719797
confirmSrpToPwForm22222302223
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16161601616
doneButtonToHomeScreen6106036207620620
openAccountMenuToAccountListLoaded291629062926929242926
total390038973905439053905
Onboarding New WalletcreateWalletToSocialScreen2192182211220221
srpButtonToPwForm1101081132112113
createPwToRecoveryScreen889099
skipBackupToMetricsScreen39383913939
agreeButtonToOnboardingSuccess16161701617
doneButtonToAssetList453304581111548581
total846696974112942974
Asset DetailsassetClickToPriceChart715191178691
total715191178691
Solana Asset DetailsassetClickToPriceChart1124517345143173
total1124517345143173
Import Srp HomeloginToHomeScreen2288224123604723012360
openAccountMenuAfterLogin523364126464
homeAfterImportWithNewWallet23752231257713624232577
total4658462147295047294729
Send TransactionsopenSendPageFromHome36294453544
selectTokenToSendFormLoaded29253543035
reviewTransactionToConfirmationPage1216980140017913801400
total12811050146917214391469
SwapopenSwapPageFromHome1349717829138178
fetchAndDisplaySwapQuotes269126862698426932698
total2826278628753228232875
🌐 Dapp Page Load Benchmarks

Current Commit: ab64778 | Date: 3/17/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±115ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 745ms (±129ms) 🟢 | historical mean value: 727ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 99ms (±198ms) 🟢 | historical mean value: 90ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 115ms 1.02s 2.14s 1.07s 2.14s
domContentLoaded 745ms 129ms 714ms 1.99s 754ms 1.99s
firstPaint 99ms 198ms 64ms 2.07s 96ms 2.07s
firstContentfulPaint 99ms 198ms 64ms 2.07s 96ms 2.07s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant