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

Inconsistent visibility requirement between get/query and find queries #523

Open
jrolfs opened this issue Sep 22, 2022 · 0 comments
Open
Assignees
Labels
5.0 Issues with potential breaking changes to resolve before/in the 5.0 release documentation Improvements or additions to documentation

Comments

@jrolfs
Copy link
Member

jrolfs commented Sep 22, 2022

This originally came up in #519 / #519 (comment)

Because we use Locator.waitFor() in the find* queries implementation, we have to specify a Playwright state for the element we are waiting on. I naively went with the Playwright default, which is visible. However, this causes inconsistency with the get* and query* queries because they don't verify the element state in Playwright at all.

Here are some options I see to resolve this:

  1. Switch the default state/asyncUtilExpectedState to 'attached'
  2. Assert the state consistently (isVisible()), for elements returned from the other types of queries (we'd probably also want to rename the option to remove async from the name 😒)
  3. Document this well and be okay that find* queries already serve a different purpose on top of the other query types

1 and 2 will now be breaking changes since we already released stuff on 4.4.0. We should probably do 3 in some form in the meantime regardless of what we choose.

Related inconsistency/rough edge: #506

@jrolfs jrolfs added 5.0 Issues with potential breaking changes to resolve before/in the 5.0 release documentation Improvements or additions to documentation labels Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 Issues with potential breaking changes to resolve before/in the 5.0 release documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants