1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/test/e2e
Mark Stacey f763979bed
Add support for one-click onboarding (#7017)
* Add support for one-click onboarding

MetaMask now allows sites to register as onboarding the user, so that
the user is redirected back to the initiating site after onboarding.
This is accomplished through the use of the `metamask-onboarding`
library and the MetaMask forwarder.

At the end of onboarding, a 'snackbar'-stype component will explain to the
user they are about to be moved back to the originating dapp, and it will
show the origin of that dapp. This is intended to help prevent phishing
attempts, as it highlights that a redirect is taking place to an untrusted
third party.

If the onboarding initiator tab is closed when onboarding is finished,
the user is redirected to the onboarding originator as a fallback.

Closes #6161

* Add onboarding button to contract test dapp

The `contract-test` dapp (run with `yarn dapp`, used in e2e tests) now
uses a `Connect` button instead of connecting automatically. This
button also serves as an onboarding button when a MetaMask installation
is not detected.

* Add new static server for test dapp

The `static-server` library we were using for the `contract-test` dapp
didn't allow referencing files outside the server root. This should
have been possible to work around using symlinks, but there was a bug
that resulted in symlinks crashing the server.

Instead it has been replaced with a simple static file server that
will serve paths starting with `node_modules` from the project root.
This will be useful in testing the onboarding library without vendoring
it.

* Add `@metamask/onboarding` and `@metamask/forwarder`

Both libraries used to test onboarding are now included as dev
dependencies, to help with testing. A few convenience scripts
were added to help with this (`yarn forwarder` and `yarn dapp-forwarder`)
2019-11-22 13:03:51 -04:00
..
contract-test Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
mock-3box
send-eth-with-private-key-test
address-book.spec.js Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
ethereum-on.spec.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
fetch-mocks.json
from-import-ui.spec.js Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
func.js Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
helpers.js
incremental-security.spec.js Fix flaky e2e tests (#7307) 2019-10-23 14:00:16 -03:00
metamask-responsive-ui.spec.js Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
metamask-ui.spec.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
run-all.sh Adds and end to end test for typed signature requests 2019-11-14 10:37:58 -03:30
run-web3.sh Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
send-edit.spec.js Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
signature-request.spec.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00
threebox.spec.js Fix flaky e2e tests (#7307) 2019-10-23 14:00:16 -03:00
web3.spec.js Add support for one-click onboarding (#7017) 2019-11-22 13:03:51 -04:00