MetaMask / metamask-extension

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

Fix "Change assets sends the correct asset when switching..." flaky tests #27133

Open hjetpoluru opened 2 months ago

hjetpoluru commented 2 months ago

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/100097/workflows/f0123408-05ab-4303-af99-559e6f9e2d7b/jobs/3726567/tests

Build - mmi Browser - Chrome Test Scenario - Change assets sends the correct asset when switching from native currency to NFT Test Path - /test/e2e/tests/transaction/change-assets.spec.js

Error: Unable to obtain browser driver.
        For more information on how to install drivers see
        https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. Error: Error executing command for /home/circleci/project/node_modules/selenium-webdriver/bin/linux/selenium-manager with --browser,chrome,--output,json,--browser-version,126: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): error trying to connect: dns error: failed to lookup address information: Try again
  (Ran on CircleCI Node 5 of 12, Job test-e2e-chrome-mmi)
    at getPath (node_modules/selenium-webdriver/common/driverFinder.js:35:11)
    at thenableWebDriverProxy.createSession (node_modules/selenium-webdriver/chromium.js:696:45)
    at thenableWebDriverProxy.createSession (node_modules/selenium-webdriver/chrome.js:223:13)
    at createDriver (node_modules/selenium-webdriver/index.js:152:33)
    at Builder.build (node_modules/selenium-webdriver/index.js:680:16)
    at ChromeDriver.build (test/e2e/webdriver/chrome.js:106:28)
    at buildBrowserWebDriver (test/e2e/webdriver/index.js:38:33)
    at buildWebDriver (test/e2e/webdriver/index.js:20:13)
    at withFixtures (test/e2e/helpers.js:187:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Context.<anonymous> (test/e2e/tests/transaction/change-assets.spec.js:14:5)

image

Console log

Executing testcase: 'Change assets sends the correct asset when switching from native currency to NFT'

2024-09-12T15:32:38.149Z [driver] Called 'navigate' with arguments []
2024-09-12T15:32:41.300Z [driver] Called 'fill' with arguments ["#password","correct horse battery staple"]
2024-09-12T15:32:41.551Z [driver] Called 'press' with arguments ["#password",""]
2024-09-12T15:32:41.583Z [driver] Called 'assertElementNotPresent' with arguments ["[data-testid=\"unlock-page\"]"]
ServerMochaToBackground got a client connection
Failure on testcase: 'Change assets sends the correct asset when switching from native currency to NFT', for more information see the artifacts tab in CI

Error: Found element "[data-testid=\"unlock-page\"]" that should not be present
chloeYue commented 1 month ago

Test still flaky. CI failure: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/101977/workflows/a6a472df-82ee-4848-80a8-93c6720fad81/jobs/3802004