MetaMask / MetaMask/metamask-extension
Refactor e2e testcases for implement smart contract deployment on the background using ganache seeder
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**Goal**
The main goal is to deploy the smart contracts directly on Ganache, instead of using the Dapp Test interface for achieving the same actions.
These smart contracts can be used later within the e2e tests in order to reduce the amount of code needed to be written in order to execute the same action every time for each of the tests (i.e. contract deployment). This would also reduce the time needed for e2e tests execution because waiting for the UI action response will be eliminated.
**Approach**
We are going to split this task in 2 parts. The first one will take care of preparing the contracts and the seeder, so it deploys correctly any contract we pass them into Ganache, from the background.
First PR is already merged here
https://github.com/MetaMask/metamask-extension/pull/14631
The second part will take care of the refactor of the e2e testcases, in order to use the smart contract deployer, instead of deploying each contract manually, using the Dapp UI.
- [x] `contract-interactions.specs.js` [PR #15553](https://github.com/MetaMask/metamask-extension/pull/15553)
- [x] `collectibles.specs.js`
- [ ] `custom-token-add-approve.specs.js` [PR #15728](https://github.com/MetaMask/metamask-extension/pull/15728)
- [x] `failing-contract.specs.js` [PR #15601](https://github.com/MetaMask/metamask-extension/pull/15601)
- [x] `send-hex-address.specs.js` [PR #15604](https://github.com/MetaMask/metamask-extension/pull/15604)
- [x] `send-to-contract.specs.js` [PR #15605](https://github.com/MetaMask/metamask-extension/pull/15605)
- [ ] `metamask-ui.specs.js`
Contributor guide
Assessment
This issue has not been assessed yet.