*/
function datepickerConfig(string $html): array
{
preg_match("/\.\.\.JSON\.parse\('(.+?)'\)/", $html, $match);
return json_decode(json_decode('"'.$match[1].'"'), true, flags: JSON_THROW_ON_ERROR);
}
it('draws a docked date field whose combobox controls a popover picker', function () {
$html = (string) $this->blade('');
expect($html)
->toContain('data-md-datepicker')
->toContain('')
->toContain('role="combobox"')
->toContain('aria-haspopup="dialog"')
->toContain('aria-controls="expires-picker"')
->toContain('aria-expanded="false"')
->toContain('aria-describedby="expires-support"')
->toContain('Type a date or pick one')
->toContain('