@@ -296,6 +296,42 @@ public function exportBulk($items)
296296
297297    }
298298
299+     public  function  test_can_set_icon_to_right_default (): void 
300+     {
301+         $ action  = Action::make ('Update Summaries ' )
302+             ->setActionAttributes (['class '  => 'dark:bg-green-500 dark:text-white dark:border-green-600 dark:hover:border-green-900 dark:hover:bg-green-800 ' , 'default-styling '  => true , 'default-colors '  => true ])
303+             ->setIcon ('fas fa-minus ' )
304+             ->setIconAttributes (['class '  => 'font-sm text-sm ' ])
305+             ->setWireAction ('wire:click ' )
306+             ->setWireActionParams ('testactionparams ' );
307+         $ this  ->assertTrue ($ action ->getIconRight ());
308+     }
309+ 
310+     public  function  test_can_set_icon_to_left (): void 
311+     {
312+         $ action  = Action::make ('Update Summaries ' )
313+             ->setActionAttributes (['class '  => 'dark:bg-green-500 dark:text-white dark:border-green-600 dark:hover:border-green-900 dark:hover:bg-green-800 ' , 'default-styling '  => true , 'default-colors '  => true ])
314+             ->setIcon ('fas fa-minus ' )
315+             ->setIconAttributes (['class '  => 'font-sm text-sm ' ])
316+             ->setIconLeft ()
317+             ->setWireAction ('wire:click ' )
318+             ->setWireActionParams ('testactionparams ' );
319+         $ this  ->assertFalse ($ action ->getIconRight ());
320+     }
321+ 
322+     public  function  test_can_set_icon_to_right (): void 
323+     {
324+         $ action  = Action::make ('Update Summaries ' )
325+             ->setActionAttributes (['class '  => 'dark:bg-green-500 dark:text-white dark:border-green-600 dark:hover:border-green-900 dark:hover:bg-green-800 ' , 'default-styling '  => true , 'default-colors '  => true ])
326+             ->setIcon ('fas fa-minus ' )
327+             ->setIconAttributes (['class '  => 'font-sm text-sm ' ])
328+             ->setWireAction ('wire:click ' )
329+             ->setWireActionParams ('testactionparams ' )
330+             ->setIconLeft ()
331+             ->setIconRight ();
332+         $ this  ->assertTrue ($ action ->getIconRight ());
333+     }
334+ 
299335    public  function  test_action_renders_correctly (): void 
300336    {
301337        $ action  = Action::make ('Update Summaries ' )
@@ -305,6 +341,6 @@ public function test_action_renders_correctly(): void
305341            )
306342            ->route ('dashboard22 ' );
307343
308-         $ this  ->assertStringContainsString ('<a class="focus:border-indigo-300 focus:ring-indigo-200 justify-center text-center items-center inline-flex rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50 dark:bg-green-500 dark:text-white dark:border-green-600 dark:hover:border-green-900 dark:hover:bg-green-800" href="dashboard22" ' , $ action ->render ());
344+         $ this  ->assertStringContainsString ('<a class="focus:border-indigo-300 focus:ring-indigo-200 justify-center text-center items-center inline-flex space-x-2  rounded-md border shadow-sm px-4 py-2 text-sm font-medium focus:ring focus:ring-opacity-50 dark:bg-green-500 dark:text-white dark:border-green-600 dark:hover:border-green-900 dark:hover:bg-green-800" href="dashboard22" ' , $ action ->render ());
309345    }
310346}
0 commit comments