blade('');
expect($html)
->toContain('data-search')
->toContain('role="search"')
->toContain('type="search"')
->toContain('placeholder="Search shares"')
->toContain('aria-label="Search shares"')
->toContain('aria-controls="find-view"')
->toContain('aria-expanded="false"')
->toContain('wire:model.live.debounce.300ms="query"')
->toContain('id="find-view"')
->toContain('data-search-clear')
->toContain('aria-label="Back"')
->toContain('materialSearch(false)')
->not->toContain('data-search-results');
});
it('shows the results, or what to say when there are none', function () {
expect((string) $this->blade('holiday.zip'))
->toContain('data-search-results')
->toContain('holiday.zip')
->and((string) $this->blade('No shares match.'))
->toContain('No shares match.');
});
it('names the input, trails the bar, and stays docked on request', function () {
$html = (string) $this->blade('');
expect($html)
->toContain('placeholder="Search"')
->toContain('aria-label="Search your shares"')
->toContain('data-search-trailing')
->toContain('')
->toContain('materialSearch(true)');
});