Skip to content

fix(assert_has): Fix for failure to match when a hidden text match precedes a visible one in DOM order#195

Merged
ftes merged 1 commit into
ftes:mainfrom
Jump-App:ty/194
Jun 23, 2026
Merged

fix(assert_has): Fix for failure to match when a hidden text match precedes a visible one in DOM order#195
ftes merged 1 commit into
ftes:mainfrom
Jump-App:ty/194

Conversation

@s3cur3

@s3cur3 s3cur3 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Fixes an issue where assert_has(selector, text: ...) would fail if there was a hidden DOM node that matched the text before a visible one.

Comparing the selector generated in PhoenixTest.Playwright.found?/4:

Before After
"css=#hidden-text-repro >> visible=true >> internal:text=\"Text to find\"i" "css=#hidden-text-repro >> internal:text=\"Text to find\"i >> visible=true"

Resolves #194

…recedes a visible one in DOM order

Before:  `"css=#hidden-text-repro >> visible=true >> internal:text=\"Text to find\"i"`
After: `"css=#hidden-text-repro >> internal:text=\"Text to find\"i >> visible=true"`

Resolves ftes#194
@ftes

ftes commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Wonderful, thanks Tyler. Also verified on an existing large code base.

@ftes ftes changed the title fix (assert_has): Fix for failure to match when a hidden text match precedes a visible one in DOM order fix(assert_has): Fix for failure to match when a hidden text match precedes a visible one in DOM order Jun 23, 2026
@ftes
ftes merged commit bbec174 into ftes:main Jun 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assert_has(selector, text:) fails when a hidden text match precedes a visible one in DOM order

2 participants