1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/test/e2e
Mark Stacey 7199d9c567 Use externally hosted phishing warning page
An externally hosted phishing warning page is now used rather than the
built-in phishing warning page.The phishing page warning URL is set via
configuration file or environment variable. The default URL is either
the expected production URL or `http://localhost:9999/` for e2e testing
environments.

The new external phishing page includes a design change when it is
loaded within an iframe. In that case it now shows a condensed message,
and prompts the user to open the full warning page in a new tab to see
more details or bypass the warning. This is to prevent a clickjacking
attack from safelisting a site without user consent.

The new external phishing page also includes a simple caching service
worker to ensure it continues to work offline (or if our hosting goes
offline), as long as the user has successfully loaded the page at least
once. We also load the page temporarily during the extension startup
process to trigger the service worker installation.

The old phishing page and all related lines have been removed. The
property `web_accessible_resources` has also been removed from the
manifest. The only entry apart from the phishing page was `inpage.js`,
and we don't need that to be web accessible anymore because we inject
the script inline into each page rather than loading the file directly.

New e2e tests have been added to cover more phishing warning page
functionality, including the "safelist" action and the "iframe" case.
2022-05-16 14:40:50 -02:30
..
fixtures implement event fragments for tx controller (#13331) 2022-01-20 10:26:39 -06:00
mock-3box Refactoring threebox.spec.js to use fixtures (#10849) 2021-04-08 19:53:18 -04:00
mock-page-with-disallowed-iframe Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
mock-page-with-iframe Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
send-eth-with-private-key-test Adding support for EIP-1559 in E2E tests (#13282) 2022-01-19 04:38:41 +05:30
snaps Fixed firefox Snaps + add initial end-to-end tests (#13671) 2022-03-10 14:01:55 -08:00
tests Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
webdriver Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
benchmark.js Fix 'yarn setup' on M1 Macs (#11887) 2021-09-01 10:40:40 -06:00
fixture-server.js Add fixture server substitutions (#12476) 2021-10-25 12:33:53 -02:30
ganache.js E2e mocking (#13640) 2022-02-16 14:21:41 +00:00
helpers.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
metamask-ui.spec.js update gas fees (#13646) 2022-03-25 21:11:04 +04:00
mock-e2e.js E2e Swap Api mockup response for suggestedGasFees (#13991) 2022-03-16 17:06:13 +01:00
phishing-warning-page-server.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30
run-all.js Fixed firefox Snaps + add initial end-to-end tests (#13671) 2022-03-10 14:01:55 -08:00
run-e2e-test.js Simplify Mocha npm scripts (#12313) 2021-10-12 10:10:33 -02:30
x-server.js Fix 'yarn setup' on M1 Macs (#11887) 2021-09-01 10:40:40 -06:00