blade("Body")) ->toContain($classes) ->toContain('rounded-corner-md') ->toContain("data-card=\"{$variant}\""); })->with([ 'filled' => ['filled', 'bg-surface-container-highest'], 'elevated' => ['elevated', 'bg-surface-container-low shadow-elevation-1'], 'outlined' => ['outlined', 'border border-outline-variant bg-surface'], ]); it('is filled unless it knows the variant', function () { expect((string) $this->blade('Body')) ->toContain('bg-surface-container-highest') ->toContain('data-card="filled"'); }); it('lays out a header, menu, media, body and actions', function () { $html = (string) $this->blade(<<<'BLADE' Expires in 3 days. BLADE); expect($html) ->toContain('') ->toContain('

holiday-photos.zip

') ->toContain('248 MB') ->toContain('') ->toContain('role="separator"') ->toContain('Expires in 3 days.') ->toContain('') ->and(strpos($html, 'Expires'))->toBeLessThan(strpos($html, 'Copy link')); }); it('passes row attributes through', function () { expect((string) $this->blade('Open')) ->toContain('data-list-row') ->toContain('data-list-open'); }); it('makes a directly actionable card the one tab stop, named by its title', function () { $html = (string) $this->blade('Open'); expect($html) ->toContain('data-list-row') ->toContain('data-list-actionable') ->toContain('tabindex="0"') ->toContain('role="button"') ->toContain('aria-label="holiday-photos.zip"') ->and((string) $this->blade('Body')) ->toContain('role="link"') ->and(substr_count((string) $this->blade('Body'), 'role="link"'))->toBe(1) ->and((string) $this->blade('Body')) ->not->toContain('data-list-actionable') ->not->toContain('tabindex'); });