31 lines
955 B
PHP
31 lines
955 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Blade;
|
|
|
|
it('renders a primary button with the AA-safe accent fill', function () {
|
|
$html = Blade::render('<x-ui.button>Go</x-ui.button>');
|
|
|
|
expect($html)->toContain('bg-accent-active')->toContain('Go');
|
|
});
|
|
|
|
it('renders an input with a linked label and error region', function () {
|
|
$html = Blade::render('<x-ui.input name="email" label="E-Mail" />');
|
|
|
|
expect($html)
|
|
->toContain('for="email"')
|
|
->toContain('name="email"')
|
|
->toContain('E-Mail');
|
|
});
|
|
|
|
it('maps badge status to a semantic tone', function () {
|
|
$html = Blade::render('<x-ui.badge status="active">Aktiv</x-ui.badge>');
|
|
|
|
expect($html)->toContain('text-success')->toContain('Aktiv');
|
|
});
|
|
|
|
it('renders a stat tile with a progress bar', function () {
|
|
$html = Blade::render('<x-ui.stat-tile label="Speicher" value="172" percent="69" />');
|
|
|
|
expect($html)->toContain('Speicher')->toContain('width: 69%');
|
|
});
|