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

Failing disclosure_navigation.js test #2996

Closed
howard-e opened this issue Apr 25, 2024 · 1 comment · Fixed by #2997 or #3059
Closed

Failing disclosure_navigation.js test #2996

howard-e opened this issue Apr 25, 2024 · 1 comment · Fixed by #2997 or #3059
Labels
bug Code defects; not for inaccurate prose regression-testing Related to AVA regression tests of example pages or AVA framework implementation within repo

Comments

@howard-e
Copy link
Contributor

howard-e commented Apr 25, 2024

A failure I've been noticing happening more frequently across all PR contribution is the following:

error shown in regression test logs: 'Element < a href="#mythical-page-content"> could not be scrolled into view'
not ok 193 - disclosure_navigation › content/patterns/disclosure/examples/disclosure-navigation.html [data-test-id="link-aria-current"]: "aria-current" attribute on links
  ---
    name: AssertionError
    message: Rejected promise returned by test
    values:
      'Rejected promise returned by test. Reason:': |-
        ElementNotInteractableError {
          remoteStacktrace: `RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8␊
          WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:193:5␊
          ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:353:5␊
          webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:166:11␊
          interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:135:11␊
          clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:204:29␊
          receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:84:31␊
          `,
          message: 'Element <a href="#mythical-page-content"> could not be scrolled into view',
        }
    at: >-
      Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15)

      parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:601:13)

      Executor.execute (node_modules/selenium-webdriver/lib/http.js:529:28)

      async thenableWebDriverProxy.execute
      (node_modules/selenium-webdriver/lib/webdriver.js:745:17)

      async test/tests/disclosure_navigation.js:76:9
  ...

Forcing the test to manually scroll to the element may be useful here.

I'm also able to consistently replicate this failure on main with Windows 11 + Node v20.11.1 by running the following command locally:

npm run regression -- -t test/tests/disclosure_navigation.js

@howard-e howard-e added bug Code defects; not for inaccurate prose regression-testing Related to AVA regression tests of example pages or AVA framework implementation within repo labels May 1, 2024
mcking65 pushed a commit that referenced this issue May 5, 2024
@howard-e
Copy link
Contributor Author

howard-e commented Jul 1, 2024

Looks to still be happening in the latest PRs changes. Running the previously suggested fix from #2997 test locally in 25 attempts gave 5 out of 25 failures.

Aligning the change instead with how the other tests' scrollIntoView calls are done passes all 25 attempts locally, that is:

await t.context.session.executeScript(function () {
  const link = arguments[0];
- link.scrollIntoView({ block: 'center' });
+ link.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}, links[l]);

But still fails when ran in CI, with changes I've pushed here.

@howard-e howard-e reopened this Jul 1, 2024
@mcking65 mcking65 added this to the H2/2024 APG Roadmap Issues milestone Jul 27, 2024
mcking65 pushed a commit that referenced this issue Jul 27, 2024
… element and click in `executeScript` context (pull #3059)

Additional changes to resolve issue #2996.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code defects; not for inaccurate prose regression-testing Related to AVA regression tests of example pages or AVA framework implementation within repo
Projects
None yet
2 participants