1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00
metamask-extension/test
Mark Stacey 96c00df6f0
Reduce e2e test flakiness (#19507)
Three e2e tests have been updated to fix a possible race condition
causing intermittent e2e test failures.

In each of the updated tests, the test checks the current network.
The check is performed as a two-step process: locate the current
network element, then check the text to ensure it's correct.

This fails when the test driver finds the element before it re-renders.
If the test runs too quickly, it compares the text before the switch
is shown on screen, and the test fails.

Instead the tests use the element locator to describe what they want.
This tells the test driver to keep looking until the conditions are
met, ensuring the test doesn't fail unless the network switch takes
longer than the default timeout (which should not happen).

This is a good example of why we should avoid using assertions on
elements in e2e tests. Express your assertions as locators instead to
make the test more resilient in the case where the test runs before the
next render.
2023-06-08 14:34:48 -02:30
..
data [FLASK] Rework Snaps headers and footers (#19442) 2023-06-07 15:18:49 +02:00
e2e Reduce e2e test flakiness (#19507) 2023-06-08 14:34:48 -02:30
helpers devDeps: eslint@8.14.0,8.20.0->8.36.0 (#18748) 2023-04-28 07:45:15 +09:00
jest Deprecated Icon and ButtonIcon clean up (#19220) 2023-05-19 10:33:02 -07:00
lib Extract out confirm-data and confirm-hex-data components from confirm-transaction-base.component.js (#17822) 2023-03-09 10:38:37 +05:30
mocks remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
stub Update eth-json-rpc-middleware from v9 to v10 (#17591) 2023-02-27 13:19:08 -03:30
unit-global update ses@0.18.4 (#17521) 2023-04-27 21:31:52 +09:00
env.js [FLASK] snaps-monorepo@0.33.1-flask.1 (#18913) 2023-05-15 19:36:24 +02:00
merge-coverage.js ci: temporarily disable codecov status checks (#19354) 2023-06-01 10:11:22 -05:00
run-unit-tests.js split unit tests (#16455) 2023-01-11 12:23:38 -06:00
setup.js Disable typechecking while running Mocha tests (#17701) 2023-02-12 14:34:35 -07:00