Skip to content

What if locator.waitFor({ state: 'attached' }) but options.hidden === false in Testing Library? #506

Open
@sebinsua

Description

@sebinsua

One thing that I've noticed is the possibility of disagreement between the visibility checking of Playwright and Testing Library.

For example, what if internally we are executing locator.waitFor({ state: 'attached' }) but are also querying using options.hidden === false with Testing Library. The latter programmatically ensures that elements are not picked up due to "host language semantics specifying that the element is not displayed, such as CSS display: none, visibility: hidden, or the HTML hidden attribute".

I don't know a fix for this unless we automatically force options.hidden === true in these cases and haven't thought through the consequences of doing this.

Metadata

Metadata

Assignees

Labels

5.0Issues with potential breaking changes to resolve before/in the 5.0 releasedocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions