MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.92k stars 4.88k forks source link

Fix "Test Snap Get File test snap_getFile functionality" flaky tests #27276

Open hjetpoluru opened 1 week ago

hjetpoluru commented 1 week ago

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/101097/workflows/11c190ee-691c-4d05-9fbb-8c9a8f2125ad/jobs/3763990/tests

Build - Regular Browser - Chrome Test Path - /test/e2e/snaps/test-snap-get-file.spec.js Test Scenario - Test Snap Get File test snap_getFile functionality

Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/project/test/e2e/snaps/test-snap-get-file.spec.js)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)
bowensanders commented 22 hours ago

Diving in to this particular flake above, you find this:

Executing testcase: 'test snap_getFile functionality' 2024-09-18T15:35:22.336Z [driver] Called 'navigate' with arguments [] 2024-09-18T15:35:25.331Z [driver] Called 'fill' with arguments ["#password","correct horse battery staple"] 2024-09-18T15:35:25.613Z [driver] Called 'press' with arguments ["#password",""] 2024-09-18T15:35:25.642Z [driver] Called 'assertElementNotPresent' with arguments ["[data-testid=\"unlock-page\"]"] ServerMochaToBackground got a client connection Failure on testcase: 'test snap_getFile functionality', for more information see the artifacts tab in CI Error: Found element "[data-testid=\"unlock-page\"]" that should not be present

This error is happening at the connecting / opening of metamask and not during the test.