blade(<<<'BLADE' BLADE); expect($html) ->toContain('data-button-group="split"') ->toContain('mt-4') ->toContain('data-split="leading"') ->toContain('wire:click="downloadZip"') ->toContain('data-split="trailing"') ->toContain('aria-label="Download options"') ->toContain('role="menu"') ->toContain('As a ZIP') ->and(substr_count($html, 'wire:click="downloadZip"'))->toBe(1); }); it('leaves the corners to the group', function () { $html = (string) $this->blade(''); preg_match_all('/]*data-split="[^"]*"[^>]*>/', $html, $halves); expect($halves[0])->toHaveCount(2); foreach ($halves[0] as $half) { expect($half)->not->toContain('rounded-corner-full')->not->toContain('active:rounded-corner'); } }); it('is filled unless another container variant is asked for', function () { expect((string) $this->blade(''))->toContain('data-md-variant="filled"')->not->toContain('data-md-variant="text"') ->and((string) $this->blade(''))->toContain('data-md-variant="tonal"'); }); it('gives the two smallest sizes their narrower inner padding and 48px trailing button', function () { expect((string) $this->blade('')) ->toContain('pe-2.5') ->toContain('w-12'); });