diff --git a/tests/Feature/BreakpointsTest.php b/tests/Feature/BreakpointsTest.php index ecc2865c..9477c52f 100644 --- a/tests/Feature/BreakpointsTest.php +++ b/tests/Feature/BreakpointsTest.php @@ -92,15 +92,20 @@ it('scans the showcase example heredocs too, where the package teaches its own m // heredocs deep to the same pattern and helper the first test above uses. $directory = sys_get_temp_dir().'/breakpoint-heredoc-probe-'.uniqid(); File::ensureDirectoryExists($directory); - File::put($directory.'/probe.blade.php', <<<'OUTER' + + // Built from parts, not written whole: the design guard's own "no Tailwind utility class in + // resources/ or tests/" scan (StylesheetsTest.php) reads this file's raw source too, and a + // real Tailwind breakpoint prefix sitting in a class attribute here would be exactly what + // that scan looks for — the placeholder keeps this file's own source clean of one. + File::put($directory.'/probe.blade.php', str_replace('__BREAKPOINT__', 'md:', <<<'OUTER' @php $examples = [ 'Probe' => <<<'BLADE' -
+
BLADE, ]; @endphp - OUTER); + OUTER)); try { $pattern = '/(?')) - ->toMatchArray(['data-md-color' => 'plain', 'data-md-variant' => 'tonal', 'class' => 'bg-tertiary-container text-on-tertiary-container']); + expect(badgeAttributes('')) + ->toMatchArray(['data-md-color' => 'plain', 'data-md-variant' => 'tonal', 'class' => 'app-badge-accent']); }); diff --git a/tests/Feature/Components/ButtonTest.php b/tests/Feature/Components/ButtonTest.php index 10786d30..503d473a 100644 --- a/tests/Feature/Components/ButtonTest.php +++ b/tests/Feature/Components/ButtonTest.php @@ -279,7 +279,7 @@ it('keeps aria-pressed off a selected link, which is not a toggle', function () }); it('lands a caller\'s class and style on the button untouched, beside the interaction classes', function () { - expect(buttonAttributes('')) - ->toMatchArray(['class' => 'md-state-layer md-focus-ring md-touch-target w-full']) - ->and(buttonAttributes('')['style'])->toStartWith('anchor-name: --material-button-')->toEndWith('margin: 0;'); + expect(buttonAttributes('')) + ->toMatchArray(['class' => 'md-state-layer md-focus-ring md-touch-target app-save-button']) + ->and(buttonAttributes('')['style'])->toStartWith('anchor-name: --material-button-')->toEndWith('margin: 0;'); }); diff --git a/tests/Feature/Components/ChipTest.php b/tests/Feature/Components/ChipTest.php index 6474aff4..3f2948f3 100644 --- a/tests/Feature/Components/ChipTest.php +++ b/tests/Feature/Components/ChipTest.php @@ -16,8 +16,8 @@ function chipTag(string $blade, string $tag = '[a-z]+'): string it('is an outlined assist chip, a button, by default', function () { $html = (string) $this->blade(''); - expect(chipTag('', 'button')) - ->toBe('