Files
livewire-material/tests/Feature/Components/StatTest.php
T
Andreas Reinhold / reiniandClaude Opus 5 648ad8efaf
tests / lint (push) Successful in 1m3s
tests / feature (8.4) (push) Failing after 1m5s
tests / feature (8.5) (push) Failing after 1m4s
tests / browser (chrome, chromium) (push) Failing after 1m5s
tests / browser (firefox, firefox) (push) Failing after 1m1s
tests / browser (safari, webkit) (push) Failing after 1m1s
Add the snackbar, badges, rich tooltips, alerts, stats and empty states
<x-toast> hosts the snackbar queue for the Toasts concern and
window.materialToast(), one at a time, paused on hover and focus, with
an optional action; it listens from the moment its script loads, so a
toast dispatched before Alpine starts is shown rather than lost.
<x-badge> is M3's dot and count, plus a tonal or outlined status label;
<x-rich-tooltip> is transient or persistent; <x-alert>, <x-stat> and
<x-empty-state> are built from M3's parts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
2026-09-13 06:59:40 +02:00

15 lines
538 B
PHP

<?php
it('shows a figure that counts, with its title and description', function () {
$html = (string) $this->blade('<x-stat title="Shares" value="1,204" icon="link" description="12 this week"><span>quota</span></x-stat>');
expect($html)
->toContain('bg-surface-container')
->toContain('Shares')
->toContain('x-figure>1,204</p>')
->toContain('type-emphasized-headline-md tabular-nums')
->toContain('12 this week')
->toContain('<span>quota</span>')
->toContain('<svg');
});