Skip to content

test(accordion): avoid scroll assist cloned input - #25853

Merged
liamdebeasi merged 1 commit into
mainfrom
accordion-test
Aug 30, 2022
Merged

test(accordion): avoid scroll assist cloned input#25853
liamdebeasi merged 1 commit into
mainfrom
accordion-test

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: N/A

Accordion related tests were failing intermittently on Safari. Scroll assist adds a cloned input inside of ion-input as part of its adjustment work, and sometimes that would be in the DOM long enough for playwright to pick it up. This led to errors such as the following:

expect.toBeFocused: Error: strict mode violation: "#address1 input" resolved to 2 elements:
        1) <input type="text" placeholder="" autocorrect="off" aut…/> aka playwright.$("input[name="ion-input-11"] >> nth=0")
        2) <input type="text" tabindex="-1" placeholder="" autocor…/> aka playwright.$("input[name="ion-input-11"] >> nth=1")

What is the new behavior?

  • Avoid selecting the cloned input in tests

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 30, 2022
@liamdebeasi
liamdebeasi marked this pull request as ready for review August 30, 2022 14:50
@liamdebeasi
liamdebeasi requested a review from a team August 30, 2022 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants