Skip to content

fix: at selector with value filtering - #220

Merged
MrPunyapal merged 1 commit into
pestphp:5.xfrom
joostdebruijn:joost/fix-at-selector-with-value
Oct 27, 2026
Merged

MrPunyapal merged 1 commit into
pestphp:5.xfrom
joostdebruijn:joost/fix-at-selector-with-value

Conversation

@joostdebruijn

Copy link
Copy Markdown

This fixes a bug in GuessLocator.php where @... selectors using an optional value would resolve [data-testid=...] / [data-test=...] before applying the [value=...] filter.

In grouped radios or checkboxes that share the same test id, that meant assertions and interactions could fall back to the first matching element instead of the one with the requested value. Without this change, calls like assertRadioSelected('@color', 'blue') could inspect the first @color radio instead of the radio with value blue.

Test coverage is added to validate the correct behavior.

@joostdebruijn
joostdebruijn changed the base branch from 4.x to 5.x October 27, 2026 18:57
@joostdebruijn
joostdebruijn force-pushed the joost/fix-at-selector-with-value branch from 6def546 to 8bffc13 Compare October 27, 2026 19:05
@joostdebruijn

Copy link
Copy Markdown
Author

@MrPunyapal I've rebased this PR against 5.x. Any chance to get this one merged?

@MrPunyapal
MrPunyapal merged commit 6c74503 into pestphp:5.x Oct 27, 2026
2 checks passed
@MrPunyapal

Copy link
Copy Markdown
Member

thanks

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.

2 participants