Skip to content

Fix resolver not formatting properly when selector has a closing parenthesis#1184

Merged
taylorotwell merged 2 commits intolaravel:8.xfrom
chinleung:8.x
Feb 10, 2026
Merged

Fix resolver not formatting properly when selector has a closing parenthesis#1184
taylorotwell merged 2 commits intolaravel:8.xfrom
chinleung:8.x

Conversation

@chinleung
Copy link
Contributor

@chinleung chinleung commented Feb 10, 2026

I'm trying to do something like this:

$browser->assertSeeIn('@products div:nth-child(2 of @product)', '...');

The selector resolves into a broken selector where the closing parenthesis from @product) is included in the dusk attribute because the current pattern is @(\S+).

body [dusk="products"] div:nth-child(2 of [dusk="product)"]

With the new pattern @([^\s\)]+), we get a fully functional selector:

body [dusk="products"] div:nth-child(2 of [dusk="product"])

@chinleung chinleung marked this pull request as draft February 10, 2026 17:28
@chinleung chinleung marked this pull request as ready for review February 10, 2026 17:30
@taylorotwell taylorotwell merged commit 5c3beee into laravel:8.x Feb 10, 2026
52 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.

2 participants