blade(''); expect($html) ->toContain('role="progressbar"') ->toContain('aria-label="Loading"') ->toContain('size-12') ->toContain('text-primary') ->toContain('toContain('class="size-full motion-reduce:hidden"') ->toContain('class="hidden size-full motion-reduce:block"'); }); it('sits on a primary-container circle when contained', function () { expect((string) $this->blade('')) ->toContain('rounded-corner-full bg-primary-container text-on-primary-container') ->toContain('size-8') ->not->toContain('size-12') ->toContain('aria-label="Uploading"'); }); it('takes the caller\'s colour', function () { expect((string) $this->blade('')) ->toContain('text-tertiary') ->not->toContain('text-primary'); }); it('says nothing where something else already does', function () { expect((string) $this->blade('')) ->toContain('aria-hidden="true"') ->not->toContain('role="progressbar"'); expect((string) $this->blade('')) ->toContain('not->toContain('role="progressbar"'); }); it('animates without script and rests the same shape', function () { $animated = file_get_contents(__DIR__.'/../../../resources/svg/loading-indicator/indeterminate.svg'); $static = file_get_contents(__DIR__.'/../../../resources/svg/loading-indicator/static.svg'); expect($animated)->toStartWith('') ->toContain('repeatCount="indefinite"') ->not->toContain('not->toContain('__ID__') ->and($static)->toStartWith('') ->not->toContain('