Skip to content

Commit

Permalink
Adjust wire attributes for filters
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Dec 15, 2023
1 parent 05fb3bb commit 12f82ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/Feature/Filters/FilterBooleanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function filters(): array
])
->call($theme)
->assertSeeHtml('wire:input.blur="filterBoolean(\'in_stock\', $event.target.value, \'In Stock\')"')
->assertSeeHtml('wire:model.blur="filters.boolean.in_stock"');
->assertSeeHtml('wire:model="filters.boolean.in_stock"');

expect($component->filters)
->toBeEmpty();
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/Filters/FilterInputEnumSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
fn (string $component, object $params) => livewire($component)
->call($params->theme)
->assertSeeHtmlInOrder([
'wire:model.live.debounce.500ms="filters.select.dishes.diet"',
'wire:input.debounce.500ms="filterSelect(\'dishes.diet\', \'Dieta\')"',
'wire:model="filters.select.dishes.diet"',
'wire:input.debounce.600ms="filterSelect(\'dishes.diet\', \'Dieta\')"',
])
->assertSeeHtmlInOrder([
'All',
Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/Filters/FilterSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
])
->call($params->theme)
->assertSeeHtmlInOrder([
'wire:model.live.debounce.500ms="filters.select.category_id"',
'wire:input.debounce.500ms="filterSelect(\'category_id\', \'Category\')"',
'wire:model="filters.select.category_id"',
'wire:input.debounce.600ms="filterSelect(\'category_id\', \'Category\')"',
'<option value="">All</option>',
]);
})->group('filters', 'filterSelect')
Expand Down

0 comments on commit 12f82ff

Please sign in to comment.