Skip to content

test: [POM] Migrate Send tx Revoke Permissions spec #29273

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

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Dec 17, 2024

Description

  • Migrates test/e2e/tests/request-queuing/sendTx-revokePermissions.spec.js spec to POM and ts
  • Updates method classes to accommodate new functions needed in this spec
  • A new bug has been discovered thanks to this migration, and a new TODO has been added, to add a new spec to cover that flow, once the bug is fixed

Open in GitHub Codespaces

Related issues

Fixes: #29276

Manual testing steps

  1. Check ci
  2. Run test yarn test:e2e:single test/e2e/tests/request-queuing/sendTx-revokePermissions.spec.ts --browser=chrome --leave-running=true

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.

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.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Dec 17, 2024
describe('Request Queuing', function () {
// TODO: add a new spec which checks that after revoking and connecting again
// a pending tx is still closed when using revokePermissions.
// To be done once this bug is fixed: #29272
Copy link
Contributor Author

Choose a reason for hiding this comment

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

a new bug has been discovered while migrating this spec.
Once the bug is fixed, we should add a new spec to verify that flow too.
Basically the first time we perform the flow it works as expected, but if we re-conenct to the dapp, trigger a new tx, and revoke permissions, that new tx is not cleared.

await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);

const transactionConfirmation = new TransactionConfirmation(driver);
await transactionConfirmation.check_dappInitiatedHeadingTitle();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need to wait until the confirmation screen is loaded, otherwise we run into a race condition where the tx is not cleared, as it was not yet in the state

@metamaskbot
Copy link
Collaborator

Builds ready [e5e2467]
Page Load Metrics (1771 ± 103 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24623481606467224
domContentLoaded14402212173720598
load148823491771214103
domInteractive23106482412
backgroundConnect87529199
firstReactRender17168413718
getState574232311
initialActions01000
loadScripts10611688130216981
setupStore76517189
uiStartup170028092063328158
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@seaona seaona self-assigned this Dec 17, 2024
@seaona seaona added e2e-test End to end test for the MetaMask extension area-qa Relating to QA work (Quality Assurance) labels Dec 17, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [7ed25dd]
Page Load Metrics (1917 ± 78 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23521951815390187
domContentLoaded16572248188616780
load17142255191716378
domInteractive28179563617
backgroundConnect11133312914
firstReactRender1897513115
getState780242311
initialActions01000
loadScripts12391703142613565
setupStore784282613
uiStartup196829532306293141
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM !

@metamaskbot
Copy link
Collaborator

Builds ready [90dfcf1]
Page Load Metrics (1601 ± 103 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23821091394460221
domContentLoaded132822111576209101
load136622351601215103
domInteractive217833168
backgroundConnect76626189
firstReactRender1594272412
getState471212210
initialActions00000
loadScripts9781787118718589
setupStore69710
uiStartup155124131882226109
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue added this pull request to the merge queue Dec 17, 2024
Merged via the queue into main with commit a31d808 Dec 17, 2024
77 checks passed
@chloeYue chloeYue deleted the pom-sendtx-revokepermissions branch December 17, 2024 15:55
@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
area-qa Relating to QA work (Quality Assurance) e2e-test End to end test for the MetaMask extension release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-extension-platform Extension Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[POM] Migrate Send tx Revoke Permissions spec
4 participants