Prove no Tailwind utility class remains in resources/ or tests/
StylesheetsTest.php's new test runs DesignGuard's own family table (check (i)) over resources/views, resources/js, src, tests/Browser and tests/Feature — the guard turned on the package's own source, so the two never drift apart. tests/Feature/DesignGuardTest.php and tests/Fixtures/design-guard/ carry Tailwind on purpose and are left out. The scan found Tailwind-shaped class strings used as caller classes in 21 test files (a component test proving a caller's class lands on the root or a caller's size wins, mostly), left over from before Tailwind cleared the whole stack: replaced with neutral application-style names (`app-hero-icon`) or, where one already carries the right meaning, an `md-*` class (`md-text-end`, `md-ink-warning`). BreakpointsTest.php's own heredoc probe — which needs a genuine Tailwind-shaped breakpoint prefix to prove its detection works — now builds that one string from a placeholder at runtime, so its own source stays clean for this same scan. Plan step 42 (Phase F), Part A. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
3d9e494e22
commit
6897306e18
@@ -28,8 +28,8 @@ it('draws the size it is given, and still takes a caller\'s class', function ()
|
||||
$this->blade('<x-icon name="calendar_month" size="32" />')
|
||||
->assertSee('style="--md-icon-size: 32px"', false);
|
||||
|
||||
$this->blade('<x-icon name="calendar_month" class="size-4 text-primary" />')
|
||||
->assertSee('class="size-4 text-primary"', false);
|
||||
$this->blade('<x-icon name="calendar_month" class="app-hero-icon" />')
|
||||
->assertSee('class="app-hero-icon"', false);
|
||||
});
|
||||
|
||||
it('ignores a size that is not a whole number of pixels in range', function () {
|
||||
@@ -76,11 +76,11 @@ it('draws the filled symbol when asked', function () {
|
||||
});
|
||||
|
||||
it('draws the optical size 20 cut when the caller asks for it', function () {
|
||||
$standard = (string) $this->blade('<x-icon name="home" class="size-5" />');
|
||||
$dense = (string) $this->blade('<x-icon name="home" class="size-5" optical="20" />');
|
||||
$standard = (string) $this->blade('<x-icon name="home" class="app-list-icon" />');
|
||||
$dense = (string) $this->blade('<x-icon name="home" class="app-list-icon" optical="20" />');
|
||||
|
||||
expect($dense)->not->toBe($standard)
|
||||
->and($dense)->toContain('class="size-5"')
|
||||
->and($dense)->toContain('class="app-list-icon"')
|
||||
->and($dense)->toContain('fill="currentColor"')
|
||||
->and($dense)->toContain(symbolGeometry('outlined-20/home'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user