1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
Mark Stacey
fe28e0d134
Cleanup beforeunload handler after transaction is resolved (#7333)
* Cleanup beforeunload handler after transaction is resolved

The notification window was updated to reject transactions upon close
in #6340. A handler that rejects the transaction was added to
`window.onbeforeunload`, and it was cleared in `actions.js` if it was
confirmed or rejected.

However, the `onbeforeunload` handler remained uncleared if the
transaction was resolved in another window. This results in the
transaction being rejected when the notification window closes, even
long after the transaction is submitted and confirmed. This has been
the cause of many problems with the Firefox e2e tests.

Instead the `onbeforeunload` handler is cleared in the
`componentWillUnmount` lifecycle function, alongside where it's set in
the first place. This ensures that it's correctly unset regardless
of how the transaction was resolved, and it better matches user
expectations.

* Fix indentation and remove redundant export

The `run-all.sh` Bash script now uses consistent indentation, and is
consistent about only re-exporting the Ganache arguments when they
change.

* Ensure transactions are completed before checking balance

Various intermittent e2e test failures appear to be caused by React
re-rendering the transaction list during the test, as the transaction
goes from pending to confirmed. To avoid this race condition, the
transaction is now explicitly looked for in the confirmed transaction
list in each of the tests using this pattern.

* Enable all e2e tests on Firefox

The remaining tests that were disabled on Firefox now work correctly.
Only a few timing adjustments were needed.

* Update Firefox used in CI

Firefox v70 is now used on CI instead of v68. This necessitated
rewriting the function where the extension ID was obtained because the
Firefox extensions page was redesigned.
2019-10-31 13:27:22 -03:00
Alexander Tseung
fba17d77de Refactor first time flow, remove seed phrase from state (#5994)
* Refactor and fix styling for first time flow. Remove seed phrase from persisted metamask state

* Fix linting and tests

* Fix translations, initialization notice routing

* Fix drizzle tests

* Fix e2e tests

* Fix integration tests

* Fix styling

* Fix migration naming from 030 to 031

* Open extension in browser when user has not completed onboarding
2019-01-23 11:55:34 -03:30
Dan Miller
fd1647965f Moves e2e tests for extension only behaviour to metamask-beta-responsive-ui.spec 2018-11-08 07:59:32 -03:30
kumavis
77daed5c74 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-07-03 12:42:14 -07:00
kumavis
a89902c170 Merge branch 'develop' of github.com:MetaMask/metamask-extension into network-remove-provider-engine 2018-07-02 13:54:05 -07:00
Whymarrh Whitby
c56ed16891 Fix e2e test Chrome profile paths 2018-06-12 14:11:20 -02:30
kumavis
4773a7f3ec test - e2e - extensionUri should point to home.html 2018-06-11 18:56:59 -07:00
kumavis
2e3f421b73 test - e2e - properly export setupBrowserAndExtension 2018-06-11 14:55:50 -07:00
kumavis
8a0961b4a8 test - e2e - more factoring of test setup 2018-06-11 14:46:45 -07:00
kumavis
907594463d test - e2e - use fs-extra instead of fs 2018-06-11 14:35:20 -07:00
kumavis
ebb9447593 test - e2e - factor out setup phase + rename METAMASK_CONFIG to METAMASK_TEST_CONFIG 2018-06-11 14:25:49 -07:00
Whymarrh Whitby
715624227a Add basic e2e tests for the new UI 2018-05-24 23:23:42 -02:30
Thomas
cd42d18203 Merge e2e tests into one 2018-05-14 17:17:36 -07:00
Thomas
9dfe4f410d Firefox 2018-05-01 12:18:22 -07:00
Thomas
0db4ba1086 chromedriver, changed extension id(might need zip/crx file) 2018-01-18 08:10:53 -08:00
tmashuang
a79b4db06a E2E testing with selenium 2017-09-12 14:14:24 -07:00