MetaMask / test-dapp

The sample dapp used for e2e testing and metamask-extension QA
https://metamask.github.io/test-dapp/
MIT License
587 stars 347 forks source link

feat: add deeplinks for Send Eth, Send ERC20 and Approve ERC20 #313

Closed seaona closed 5 months ago

seaona commented 5 months ago

Description

This PR adds support to Deeplinks in the test dapp. This will allows us to automate e2e tests around the feature. Specifically,

Screenshots

Screenshot from 2024-04-08 20-03-33

https://github.com/MetaMask/test-dapp/assets/54408225/723e133e-9cb6-4422-b4c1-764e1c632c08

Manual QA

  1. Build the test dapp locally
  2. With the Extension/Mobile test dapp: deploy an ERC20 token
  3. Copy the address the the decimals (default is 4)
  4. Now, go to the Mobile Browser (outside the MetaMask wallet)
  5. Add this URL: http://localhost:9011/?contract=0x35e22143f85CD31F5319Ae4295B36F396bF27f78&decimals=4 but change the contract address and decimals for the one you deployed
  6. Click Send Eth --open MM and proceed with the tx
  7. Go back to the browser
  8. Click Transfer Tokens -- open MM and proceed with the tx
  9. Go back to the browser
  10. Click Approve Tokens -- open MM and proceed with the tx