Skip to content

Commit

Permalink
🔧 Search for the @ within the entire selector not just the start
Browse files Browse the repository at this point in the history
  • Loading branch information
rabrowne85 authored Jun 17, 2024
1 parent 320da60 commit 6a07897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ElementResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public function format($selector)
array_keys($sortedElements), array_values($sortedElements), $originalSelector = $selector
);

if (Str::startsWith($selector, '@') && $selector === $originalSelector) {
if (Str::contains($selector, '@') && $selector === $originalSelector) {
$selector = preg_replace('/@(\S+)/', '['.Dusk::$selectorHtmlAttribute.'="$1"]', $selector);
}

Expand Down

0 comments on commit 6a07897

Please sign in to comment.