@@ -197,4 +197,53 @@ public function test_can_set_custom_pill_attributes_bag(): void
197197 $ this ->assertSame ($ bag ->getAttributes (), $ filter ->getPillAttributesBag ()->getAttributes ());
198198
199199 }
200+
201+ public function test_can_get_default_reset_attributes (): void
202+ {
203+ $ filter = self ::$ filterInstance ;
204+
205+ $ this ->assertSame ($ filter ->getPillResetButtonAttributes (), []);
206+ }
207+
208+ public function test_can_get_default_reset_attributes_merged (): void
209+ {
210+ $ filter = self ::$ filterInstance ;
211+
212+ $ this ->assertSame ($ filter ->getFilterPillResetButtonAttributesMerged ([]), [
213+ 'x-on:click.prevent ' => "resetSpecificFilter(' " .$ filter ->getKey ()."') " ,
214+ 'type ' => 'button ' ,
215+ ]);
216+ }
217+
218+ public function test_can_set_custom_reset_attributes (): void
219+ {
220+ $ filter = self ::$ filterInstance ;
221+ $ filter ->setPillResetButtonAttributes (['class ' => 'bg-red-500 ' ]);
222+ $ this ->assertSame ($ filter ->getPillResetButtonAttributes (), ['class ' => 'bg-red-500 ' ]);
223+ }
224+
225+ public function test_can_get_reset_attributes_merged (): void
226+ {
227+ $ filter = self ::$ filterInstance ;
228+
229+ $ this ->assertSame ($ filter ->getFilterPillResetButtonAttributesMerged (['class ' => 'bg-red-500 ' ]), [
230+ 'x-on:click.prevent ' => "resetSpecificFilter(' " .$ filter ->getKey ()."') " ,
231+ 'type ' => 'button ' ,
232+ 'class ' => 'bg-red-500 ' ,
233+ ]);
234+ }
235+
236+ public function test_can_set_reset_attributes_merged (): void
237+ {
238+ $ filter = self ::$ filterInstance ;
239+
240+ $ filter ->setPillResetButtonAttributes (['class ' => 'bg-blue-500 ' ]);
241+
242+ $ this ->assertSame ($ filter ->getFilterPillResetButtonAttributesMerged ($ filter ->getPillResetButtonAttributes ()), [
243+ 'x-on:click.prevent ' => "resetSpecificFilter(' " .$ filter ->getKey ()."') " ,
244+ 'type ' => 'button ' ,
245+ 'class ' => 'bg-blue-500 ' ,
246+ ]);
247+ }
248+
200249}
0 commit comments