@@ -90,6 +90,8 @@ public function test_bulk_dropdown_shows_when_necessary_extended(): void
9090            public  function  configure (): void 
9191            {
9292                $ this setPrimaryKey ('id ' );
93+                 $ this setDataTableFingerprint ('tabletest123 ' );
94+ 
9395            }
9496
9597            public  function  bulkActions (): array 
@@ -112,6 +114,8 @@ public function configure(): void
112114            {
113115                $ this setPrimaryKey ('id ' )
114116                    ->setShouldAlwaysHideBulkActionsDropdownOption (false );
117+                 $ this setDataTableFingerprint ('tabletest123 ' );
118+ 
115119            }
116120
117121            public  function  bulkActions (): array 
@@ -134,6 +138,8 @@ public function configure(): void
134138            {
135139                $ this setPrimaryKey ('id ' )
136140                    ->setShouldAlwaysHideBulkActionsDropdownOption (true );
141+                 $ this setDataTableFingerprint ('tabletest123 ' );
142+ 
137143            }
138144
139145            public  function  bulkActions (): array 
@@ -152,10 +158,17 @@ public function test_bulk_dropdown_shows_when_not_permanently_hidden_disabled():
152158    {
153159        Livewire::test (new  class  extends  PetsTable
154160        {
161+             public  function  boot (): void 
162+             {
163+                 $ this setDataTableFingerprint ('tabletest123 ' );
164+             }
165+ 
155166            public  function  configure (): void 
156167            {
157168                $ this setPrimaryKey ('id ' )
158169                    ->setShouldAlwaysHideBulkActionsDropdownOptionDisabled ();
170+                 $ this setDataTableFingerprint ('tabletest123 ' );
171+ 
159172            }
160173
161174            public  function  bulkActions (): array 
@@ -174,10 +187,16 @@ public function test_bulk_dropdown_hides_when_permanently_hidden_enabled(): void
174187    {
175188        Livewire::test (new  class  extends  PetsTable
176189        {
190+             public  function  boot (): void 
191+             {
192+                 $ this setDataTableFingerprint ('tabletest123 ' );
193+             }
177194            public  function  configure (): void 
178195            {
179196                $ this setPrimaryKey ('id ' )
180197                    ->setShouldAlwaysHideBulkActionsDropdownOptionEnabled ();
198+                 $ this setDataTableFingerprint ('tabletest123 ' );
199+ 
181200            }
182201
183202            public  function  bulkActions (): array 
@@ -194,11 +213,12 @@ public function exportBulk($items)
194213
195214    public  function  test_bulk_dropdown_can_have_customised_classes_with_no_defaults (): void 
196215    {
197-         Livewire:: test ( new  class  extends  PetsTable
216+         $ class  =  new  class  extends  PetsTable
198217        {
199218            public  function  configure (): void 
200219            {
201220                $ this setPrimaryKey ('id ' );
221+ 
202222                $ this setBulkActionsThAttributes ([
203223                    'class '  => 'bg-yellow-500 dark:bg-yellow-800 ' ,
204224                    'default '  => false ,
@@ -217,18 +237,26 @@ public function exportBulk($items)
217237            {
218238                return  $ items
219239            }
220-         })->assertSee ('Bulk Actions ' )
240+         };
241+         
242+         $ fingerprint$ classgetDataTableFingerprint ();
243+         Livewire::test ($ classassertSee ('Bulk Actions ' )
221244            ->assertSeeHtmlInOrder ([
222245                'scope="col" ' ,
223246                'class="bg-yellow-500 dark:bg-yellow-800" ' ,
224-                 'wire:key="table -thead-bulk-actions" ' ,
247+                 'wire:key=" '  . $ fingerprint . ' -thead-bulk-actions" '
225248            ]);
226249    }
227250
228251    public  function  test_bulk_dropdown_can_have_customised_classes_with_default_styling (): void 
229252    {
230-         Livewire:: test ( new  class  extends  PetsTable
253+         $ class  =  new  class  extends  PetsTable
231254        {
255+             public  function  boot (): void 
256+             {
257+                 $ this setDataTableFingerprint ('tabletest123 ' );
258+             }
259+ 
232260            public  function  configure (): void 
233261            {
234262                $ this setPrimaryKey ('id ' );
@@ -238,6 +266,7 @@ public function configure(): void
238266                    'default-styling '  => true ,
239267                    'default-colors '  => false ,
240268                ]);
269+                 $ this setDataTableFingerprint ('tabletest123 ' );
241270
242271            }
243272
@@ -250,17 +279,20 @@ public function exportBulk($items)
250279            {
251280                return  $ items
252281            }
253-         })->assertSee ('Bulk Actions ' )
282+         };
283+         
284+         $ fingerprint$ classgetDataTableFingerprint ();
285+         Livewire::test ($ classassertSee ('Bulk Actions ' )
254286            ->assertSeeHtmlInOrder ([
255287                'scope="col" ' ,
256288                'class="table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left laravel-livewire-tables-reorderingMinimised bg-yellow-500 dark:bg-yellow-800" ' ,
257-                 'wire:key="table -thead-bulk-actions" ' ,
258-              ]);
289+                 'wire:key=" '  . $ fingerprint . ' -thead-bulk-actions" '
290+         ]);
259291    }
260292
261293    public  function  test_bulk_dropdown_can_have_customised_classes_with_default_colors (): void 
262294    {
263-         Livewire:: test ( new  class  extends  PetsTable
295+         $ class  =  new  class  extends  PetsTable
264296        {
265297            public  function  configure (): void 
266298            {
@@ -271,7 +303,6 @@ public function configure(): void
271303                    'default-styling '  => false ,
272304                    'default-colors '  => true ,
273305                ]);
274- 
275306            }
276307
277308            public  function  bulkActions (): array 
@@ -283,18 +314,26 @@ public function exportBulk($items)
283314            {
284315                return  $ items
285316            }
286-         })->assertSee ('Bulk Actions ' )
287-             ->assertSeeHtmlInOrder ([
288-                 'scope="col" ' ,
289-                 'class="bg-gray-50 dark:bg-gray-800 text-lg" ' ,
290-                 'wire:key="table-thead-bulk-actions" ' ,
291-             ]);
317+         };
318+         $ fingerprint$ classgetDataTableFingerprint ();
319+ 
320+         Livewire::test ($ classassertSee ('Bulk Actions ' )
321+         ->assertSeeHtmlInOrder ([
322+             'scope="col" ' ,
323+             'class="bg-gray-50 dark:bg-gray-800 text-lg" ' ,
324+             'wire:key=" ' .$ fingerprint'-thead-bulk-actions" ' ,
325+         ]);
292326    }
293327
294328    public  function  test_bulk_dropdown_can_have_customised_classes_with_defaults (): void 
295329    {
296-         Livewire:: test ( new  class  extends  PetsTable
330+         $ class  =  new  class  extends  PetsTable
297331        {
332+             public  function  getFingerprint (): void 
333+             {
334+                 $ this setDataTableFingerprint ('tabletest123 ' );
335+             }
336+ 
298337            public  function  configure (): void 
299338            {
300339                $ this setPrimaryKey ('id ' );
@@ -316,11 +355,15 @@ public function exportBulk($items)
316355            {
317356                return  $ items
318357            }
319-         })->assertSee ('Bulk Actions ' )
320-             ->assertSeeHtmlInOrder ([
358+         };
359+ 
360+         $ fingerprint$ classgetDataTableFingerprint ();
361+         
362+         Livewire::test ($ classassertSee ('Bulk Actions ' )
363+         ->assertSeeHtmlInOrder ([
321364                'scope="col" ' ,
322365                'class="table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left laravel-livewire-tables-reorderingMinimised bg-gray-50 dark:bg-gray-800 text-lg" ' ,
323-                 'wire:key="table -thead-bulk-actions" ' ,
324-              ]);
366+                 'wire:key=" '  . $ fingerprint . ' -thead-bulk-actions" '
367+         ]);
325368    }
326369}
0 commit comments