Skip to content

fix: at selector with value filtering#220

Open
joostdebruijn wants to merge 1 commit into
pestphp:4.xfrom
joostdebruijn:joost/fix-at-selector-with-value
Open

fix: at selector with value filtering#220
joostdebruijn wants to merge 1 commit into
pestphp:4.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.

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.

1 participant