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: MetaMask PPOM tests #1114

Merged
merged 2 commits into from
Mar 7, 2024
Merged

✨ feat: MetaMask PPOM tests #1114

merged 2 commits into from
Mar 7, 2024

Conversation

matstyler
Copy link
Collaborator

@matstyler matstyler commented Mar 4, 2024

Motivation and context

MetaMask PPOM tested.

Does it fix any issue?

https://linear.app/synpress/issue/SYN-66/metamask-ppom-tests

Quality checklist

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough e2e tests.

⚠️👆 Delete any section you see irrelevant before submitting the pull request 👆⚠️


Generated summary

TL;DR

This pull request introduces a new set of tests for the MetaMask wallet, specifically focusing on the PPOM security mechanism. It also adds a new test for the custom transaction form.

What changed

Two files were modified in this pull request:

  1. wallets/metamask/test/e2e/metamask/PPOM.spec.ts: This is a new file that contains tests for the PPOM security mechanism. It checks if the mechanism can prevent malicious ETH transfers, ERC20 transfers, ERC20 approvals, approvals for all, permits, trade orders, and seaports.

  2. wallets/metamask/test/e2e/metamask/confirmTransaction.spec.ts: This file was updated to include a new test for the custom transaction form. It checks if the form can send a defined amount.

How to test

To test these changes, follow these steps:

  1. Pull the changes from this branch into your local environment.
  2. Navigate to the wallets/metamask/test/e2e/metamask directory.
  3. Run the PPOM.spec.ts and confirmTransaction.spec.ts test files using your preferred test runner.
  4. Ensure all tests pass and there are no unexpected errors.

Why make this change

These changes were made to improve the test coverage for the MetaMask wallet. By testing the PPOM security mechanism and the custom transaction form, we can ensure that these features are working as expected and prevent potential issues in the future.

@matstyler matstyler requested a review from drptbl March 4, 2024 18:47
Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
synpress ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 4, 2024 6:49pm

@drptbl drptbl merged commit 46390a6 into new-dawn Mar 7, 2024
12 checks passed
@drptbl drptbl deleted the feat/metamask-ppom branch March 7, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants