-
Notifications
You must be signed in to change notification settings - Fork 364
Conversation
…cypress-with-custom-onboard-module-poc # Conflicts: # src/logic/wallets/onboard.ts
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Pull Request Test Coverage Report for Build 2276063298
💛 - Coveralls |
package.json
Outdated
@@ -90,6 +90,7 @@ | |||
"@openzeppelin/contracts": "4.4.2", | |||
"@sentry/react": "^6.10.0", | |||
"@sentry/tracing": "^6.10.0", | |||
"@truffle/hdwallet-provider": "^2.0.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go to devDependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no doubt
@yagopv since this doesn't break anything, I suggest we merge this to dev and wrote more tests that use the wallet on there. I'll add a mnemonic to GitHub secrets. |
ok, let's do that then. But need an approve :D |
😘 |
What it solves
It adds a custom module to
onboard
for Cypress testingHow this PR fixes it
This PR uses the truffle HDWallet Provider in order to allow Connected e2e tests in a more reliable way than using chrome extensions as metamask.
It includes a safe creation test suite
Using the
cy.configWindow({ connected: true })
command we can tell the main web if we want to load it in a connected or disconnected status.This instructs the web app to inject the custom module or the regular ones. It only works inside Cypress environment as we can check here
This is an experiment so please take a look and test it and feel free to accept, update or discard it as a valid approach
How to test it
Add 2 new env variables to your .env file
REACT_APP_E2E_MNEMONIC=12/24 words mnemonic
REACT_APP_E2E_PROVIDER_URL=https://rinkeby.infura.io/v3/{key}
The mnemonic of course should returns an account with some ETH for the test to work
Create Safe Video
create_safe.spec.js.mp4