Skip to content

test: Add e2e test for transfer confirmations #15346

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 26 commits into from
Jun 4, 2025
Merged

test: Add e2e test for transfer confirmations #15346

merged 26 commits into from
Jun 4, 2025

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented May 15, 2025

Description

This PR aims to adjust e2e tests and infrastructure.

E2e tests changes:

  • Adds e2e/specs/confirmations-redesigned/transactions/wallet-initiated-transfer.spec.js
    • Basic send flow e2e tests
    • Use max e2e test
  • Adds e2e/specs/confirmations-redesigned/transactions/dapp-initiated-transfer.spec.js
    • EIP1559 transfer button in test-dapp
  • Adds e2e/specs/confirmations-redesigned/transactions/contract-interaction.spec.js
    • Basic ERC721 mint interaction
  • Re-enable skipped security alert API e2e

Infrastructure changes:

  • Remove section ids as we are using "rows" now
    • Rename existing sections into rows.
  • Add ignoreFields support to mock-server in case if we want to ignore fields from request - this gives us flexibility of mocking requests.

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4874
Fixes: #15726

Manual testing steps

N/A

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.

@OGPoyraz OGPoyraz requested a review from a team as a code owner May 15, 2025 07:24
@OGPoyraz OGPoyraz added DO-NOT-MERGE Pull requests that should not be merged No QA Needed Apply this label when your PR does not need any QA effort. No E2E Smoke Needed If the PR does not need E2E smoke test run no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels May 15, 2025
@OGPoyraz OGPoyraz marked this pull request as draft May 15, 2025 07:24
@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label May 15, 2025
@OGPoyraz OGPoyraz added Run Smoke E2E Requires smoke E2E testing and removed DO-NOT-MERGE Pull requests that should not be merged No E2E Smoke Needed If the PR does not need E2E smoke test run labels Jun 1, 2025
@OGPoyraz OGPoyraz marked this pull request as ready for review June 1, 2025 07:06
@OGPoyraz OGPoyraz changed the title [DRAFT] test: Add e2e test for transfer confirmations test: Add e2e test for transfer confirmations Jun 1, 2025
Copy link
Contributor

github-actions bot commented Jun 1, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 8188775
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/30d60dfe-b80e-4494-92d6-164a2bc203dd

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@OGPoyraz OGPoyraz marked this pull request as draft June 1, 2025 08:00
@OGPoyraz OGPoyraz marked this pull request as ready for review June 4, 2025 02:50
@OGPoyraz OGPoyraz added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: deafb3b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/45e3c96a-c5cb-4758-a5e3-98b38b5107e3

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@OGPoyraz OGPoyraz mentioned this pull request Jun 4, 2025
9 tasks
@OGPoyraz OGPoyraz linked an issue Jun 4, 2025 that may be closed by this pull request
9 tasks
@OGPoyraz OGPoyraz added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 5338f08
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4dccc8dd-b3c3-409c-83b4-601c45c26f37

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@OGPoyraz OGPoyraz added Run Smoke E2E Requires smoke E2E testing and removed Run Smoke E2E Requires smoke E2E testing labels Jun 4, 2025
Copy link
Contributor

github-actions bot commented Jun 4, 2025

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: de7c083
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/651abef1-bc71-40c2-a1fa-65ce8a80754f

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@OGPoyraz OGPoyraz removed the Run Smoke E2E Requires smoke E2E testing label Jun 4, 2025
@OGPoyraz
Copy link
Member Author

OGPoyraz commented Jun 4, 2025

As last commit already passed e2e here : #15346 (comment)
And I fixed conflict just on app/components/Views/confirmations/components/UI/inline-alert/inline-alert.tsx to save some time - I will add "No e2e smoke needed"

@OGPoyraz OGPoyraz added the No E2E Smoke Needed If the PR does not need E2E smoke test run label Jun 4, 2025
@OGPoyraz OGPoyraz enabled auto-merge June 4, 2025 16:02
Copy link

sonarqubecloud bot commented Jun 4, 2025

@OGPoyraz OGPoyraz added this pull request to the merge queue Jun 4, 2025
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

small feedback, your code looks 👨‍🍳

@@ -0,0 +1,50 @@
import { ConfirmationRowComponentIDs } from '../../../selectors/Confirmation/ConfirmationView.selectors';
Copy link
Member

Choose a reason for hiding this comment

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

We are working on migrating from js to ts. Can you convert this file to ts so its one less file we need to worrk about?

@@ -0,0 +1,14 @@
import { ConfirmationUIType } from '../../../selectors/Confirmation/ConfirmationView.selectors';
Copy link
Member

Choose a reason for hiding this comment

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

We are working on migrating from js to ts. Can you convert this file to ts so its one less file we need to worrk about?

@@ -0,0 +1,87 @@
import { SMART_CONTRACTS } from '../../../../app/util/test/smart-contracts';
Copy link
Member

Choose a reason for hiding this comment

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

Can you convert your new tests to ts instead

Merged via the queue into main with commit cf783d1 Jun 4, 2025
47 of 48 checks passed
@OGPoyraz OGPoyraz deleted the ogp/4874 branch June 4, 2025 16:36
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2025
@metamaskbot metamaskbot added the release-7.48.0 Issue or pull request that will be included in release 7.48.0 label Jun 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.48.0 Issue or pull request that will be included in release 7.48.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security Alert API e2e failure
5 participants