Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Flaky add-hide-token.spec file by programatically closing flashi… #28624

Closed
wants to merge 2 commits into from

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Nov 21, 2024

Description

Mitigates flakiness in add-hide-token.spec on firefox related to a flashing modal obscuring buttons beneath it, causing tests to fail consistently.

Introduces a change that programmatically closes this modal if present. However, I'm not convinced that this modal provides any real value to the user, and there have been several other related bug issues raised.

test-failure-screenshot-1

Open in GitHub Codespaces

Related issues

Related bug reports:
#23255
#25196

Note that this does not fix the above issues, this only mitigates the flakiness in firefox e2e ci.

Manual testing steps

yarn build:test:mv2
yarn start:test:mv2
ENABLE_MV3=false SELENIUM_BROWSER=firefox yarn test:e2e:single add-hide-token.spec.js --browser=firefox --debug --leave-running

Screenshots/Recordings

Before:

ElementClickInterceptedError: Element <div class="mm-box selectable-list-item-wrapper"> is not clickable at point (866,482) because another element <div class="popover-bg"> obscures it
  (Ran on CircleCI Node 0 of 24, Job test-e2e-firefox)
    at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15)
    at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:601:13)
    at Executor.execute (node_modules/selenium-webdriver/lib/http.js:529:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async thenableWebDriverProxy.execute (node_modules/selenium-webdriver/lib/webdriver.js:745:17)
    at async element.click (test/e2e/webdriver/driver.js:96:9)
    at async Driver.clickElement (test/e2e/webdriver/driver.js:601:9)
    at async /home/circleci/project/test/e2e/tests/tokens/add-hide-token.spec.js:133:9
    at async withFixtures (test/e2e/helpers.js:220:5)
    at async Context.<anonymous> (test/e2e/tests/tokens/add-hide-token.spec.js:108:5)

After:

Success on testcase: 'Add existing token using search renders the balance for the chosen token'

ServerMochaToBackground disconnected from client
Failed to handle request: socket hang up
manifest-flag-mocha-hooks.ts -- afterEach hook
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="8.406" tests="1" failures="0">
  <testsuite name="Root Suite" timestamp="2024-11-21T19:41:23" tests="0" time="0.000" failures="0">
  </testsuite>
  <testsuite name="Add existing token using search" timestamp="2024-11-21T19:41:23" tests="1" file="/Users/nicholasgambino/code/clones/metamask-extension/test/e2e/tests/tokens/add-hide-token.spec.js" time="8.405" failures="0">
    <testcase name="Add existing token using search renders the balance for the chosen token" time="8.400" classname="renders the balance for the chosen token">
    </testcase>
  </testsuite>
</testsuites>

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@gambinish gambinish closed this Nov 21, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants