'UTC', 'label' => 'UTC'], ['value' => 'Europe/Berlin', 'label' => 'Europe/Berlin'], ['value' => 'America/New_York', 'label' => 'America/New_York'], ]" :wire="false" value="UTC" /> BLADE); expect($html) ->toContain('Server timezone') ->toContain('Search timezones') ->toContain('No matching timezone') ->toContain('serverTimezone-trigger') ->toContain('x-ref="search"') ->toContain('get filtered()') ->toContain('searchable-listbox-panel') ->toContain('Berlin') ->toContain('New_York'); }); test('server timezone fields use the searchable listbox component', function () { $localhost = file_get_contents(resource_path('views/livewire/server/partials/localhost-general.blade.php')); $show = file_get_contents(resource_path('views/livewire/server/show.blade.php')); expect($localhost) ->toContain('x-forms.searchable-listbox id="serverTimezone"') ->toContain('searchPlaceholder="Search timezones"') ->not->toContain('toContain('x-forms.searchable-listbox id="serverTimezone"') ->toContain('searchPlaceholder="Search timezones"') ->not->toMatch('/ BLADE); expect($html) ->toContain('Used for cron jobs.') ->toContain('aria-label="More information"') ->not->toMatch('/]*for="tz-trigger"[^>]*>[\s\S]*aria-label="More information"[\s\S]*<\/label>/'); }); test('searchable listbox serializes change handlers', function () { $listbox = file_get_contents(resource_path('views/components/forms/searchable-listbox.blade.php')); expect($listbox) ->toContain('saving: false') ->toContain('async choose(option)') ->toContain('if (this.saving || option.disabled)') ->toContain('await this.$wire.') ->toContain("'pointer-events-none opacity-70': saving") ->toContain('@elseif ($live && ! $onChange) @entangle($id).live'); });