This repository was archived by the owner on Aug 6, 2025. It is now read-only.
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
locator.waitFor({ state: 'attached' }) but options.hidden === false in Testing Library? #506
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 usingoptions.hidden === falsewith 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 CSSdisplay: none,visibility: hidden, or the HTMLhiddenattribute".I don't know a fix for this unless we automatically force
options.hidden === truein these cases and haven't thought through the consequences of doing this.