MetaMask / metamask-extension

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

Fix "Test Snap JSX can use JSX for snap dialog" flaky tests #27164

Open hjetpoluru opened 2 days ago

hjetpoluru commented 2 days ago

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/100411/workflows/99915b63-e5d8-440b-95ca-2fe4d70bc893/jobs/3738187/tests

Build - webpack Browser - Chrome Test Path - /test/e2e/snaps/test-snap-jsx.spec.js Test Scenario - Test Snap JSX can use JSX for snap dialog

TimeoutError: Waiting for element to be located By(xpath, //*[contains(text(), "Confirm")])
Wait timed out after 10154ms
  (Ran on CircleCI Node 5 of 20, Job test-e2e-chrome-webpack)
    at /home/circleci/project/node_modules/selenium-webdriver/lib/webdriver.js:929:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
bowensanders commented 2 days ago

test-failure-screenshot-2 This test flaked during the "connect" phase of installing the JSX snap. After clicking the Connect button, it attempts to install the JSX snap via npm. The next command is to waitForSelector({ text: 'Confirm' }); as the next page is the confirmation dialog to install the snap. The flake occurred one time after having exceeded the default timeout of 10 seconds, which to me would indicate that even increasing the timeout variable, the test still would have flaked due to a likely timed out network request. Options to avoid network related timeouts are being explored.

Also to note, this flake occurred in the test-e2e-weback test package.