1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00
metamask-extension/.circleci/scripts
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
..
collect-har-artifact.sh ci - install deps with "--har" flag to capture network activity (#7143) 2019-09-12 00:03:47 +08:00
create-sesify-viz ci - build-artifacts - generate sesify-viz for inspecting deps (#7151) 2019-09-11 22:47:21 +08:00
deps-install.sh ci - install deps - limit install scripts to whitelist (#7208) 2019-09-25 20:01:10 +08:00
firefox-install Cleanup beforeunload handler after transaction is resolved (#7333) 2019-10-31 13:27:22 -03:00
firefox.cfg ci: Disable Firefox updates 2018-08-17 18:41:12 -02:30
release-bump-changelog-version Add scripts to automate GitHub releases (#6653) 2019-07-17 22:51:47 -07:00
release-bump-manifest-version Add scripts to automate GitHub releases (#6653) 2019-07-17 22:51:47 -07:00
release-create-gh-release Publish GitHub release from master branch (#7136) 2019-09-11 11:44:36 -03:00
release-create-master-pr Publish GitHub release from master branch (#7136) 2019-09-11 11:44:36 -03:00
release-create-release-pr Publish GitHub release from master branch (#7136) 2019-09-11 11:44:36 -03:00
show-changelog.awk Add scripts to automate GitHub releases (#6653) 2019-07-17 22:51:47 -07:00
yarn-audit Switch from npm to yarn (#6843) 2019-07-30 15:36:23 -03:00