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

feat: Add e2e tests of speeding up and cancelling transactions #30212

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Feb 7, 2025

Description

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4141

Manual testing steps

  1. Go to this page...

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.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Feb 7, 2025
@pedronfigueiredo pedronfigueiredo self-assigned this Feb 7, 2025
Copy link
Contributor

github-actions bot commented Feb 7, 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.

@metamaskbot
Copy link
Collaborator

Builds ready [98895bd]
Page Load Metrics (1827 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31522481750367176
domContentLoaded15422185179816378
load15472205182716077
domInteractive27103412110
backgroundConnect977322311
firstReactRender18103552914
getState46114157
initialActions0764178
loadScripts10751604130813665
setupStore76517178
uiStartup174526012136243117
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [ac4a3ca]
Page Load Metrics (1705 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint42119821550383184
domContentLoaded15052201167216579
load15142208170516680
domInteractive2310337199
backgroundConnect9218414421
firstReactRender15117332713
getState476162110
initialActions01000
loadScripts9851582119012861
setupStore66416189
uiStartup175229971988290139
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)


// Click speed up button and confirm
await driver.clickElement('[data-testid="speedup-button"]');
await driver.clickElement({ text: 'Submit', tag: 'button' });
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think we could use page objects in both specs? 🙏

jpuri
jpuri previously approved these changes Feb 11, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [92c5f75]
Page Load Metrics (1690 ± 53 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14971921169911857
domContentLoaded14561897166611756
load14981906169011153
domInteractive20102422211
backgroundConnect970262010
firstReactRender1584392512
getState45617168
initialActions01000
loadScripts10241400119510048
setupStore76518189
uiStartup16492534196519795
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

OGPoyraz
OGPoyraz previously approved these changes Feb 11, 2025
@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Feb 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 11, 2025
@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Feb 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 11, 2025
@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Feb 11, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 11, 2025
@pedronfigueiredo pedronfigueiredo dismissed stale reviews from OGPoyraz and jpuri via bec9e7f February 11, 2025 13:34
async goToActivityTab() {
await this.driver.clickElement(
'[data-testid="account-overview__activity-tab"]',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have a class for the Home page which goes to activity list:

https://github.com/MetaMask/metamask-extension/blob/main/test/e2e/page-objects/pages/home/homepage.ts#L100


async cancelTransaction() {
await this.driver.clickElement({ text: 'Cancel', tag: 'button' });
await this.driver.clickElement({ text: 'Submit', tag: 'button' });
Copy link
Contributor

@seaona seaona Feb 11, 2025

Choose a reason for hiding this comment

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

we already have a class for the ActivityList page where we can use existing methods, and extend whatever is needed there, instead of creating a new page 🙏

https://github.com/MetaMask/metamask-extension/blob/main/test/e2e/page-objects/pages/home/activity-list.ts

OGPoyraz
OGPoyraz previously approved these changes Feb 11, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [bec9e7f]
Page Load Metrics (1728 ± 45 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint35718911657313150
domContentLoaded1518187416969445
load1529188817289445
domInteractive24123422411
backgroundConnect8102392813
firstReactRender1781442412
getState58615199
initialActions01000
loadScripts1099139312377737
setupStore66918189
uiStartup17102548198918689
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

jpuri
jpuri previously approved these changes Feb 11, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [5b27525]
Page Load Metrics (1773 ± 47 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1577193417769847
domContentLoaded1567192817519144
load1578193417739847
domInteractive258833147
backgroundConnect107228199
firstReactRender1774352311
getState55816178
initialActions01000
loadScripts1124147412808742
setupStore762242110
uiStartup18232261203110852
Bundle size diffs
  • background: 0 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.

awesome 🔥 thank you for the changes 🙏

@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 8005275 Feb 12, 2025
72 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/4141 branch February 12, 2025 10:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2025
@metamaskbot metamaskbot added the release-12.13.0 Issue or pull request that will be included in release 12.13.0 label Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.13.0 Issue or pull request that will be included in release 12.13.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants