@newbie360 If I understand correctly, (although) it's a CSS behavior, it depends on JS (alternatively JS behavior).
I think it's not possible to test in PHPUnit.
i have write some code to enable Tailwind Dark Mode
https://i.ibb.co/y5XwTWh/firefox-QEGbgv-ZLI2.gif
playground: https://laravelplayground.com/#/snippets/d1f6debb-bd78-440a-b4a0-42683d861c2a
when i click on the button:
<html> attributesbut how to write a Test for 1~3 without install Dusk?
It means we need install Google Chrome and add the laravel/dusk Composer dependency to the project ? and run another command php artisan dusk for the test ?
YES
we will Test a model can create, edit, delete
NO. It depends what exactly you want to test! If you want to test the CRUD operation in Laravel code, simply you can use PHP Unit test, because it's testing your code whether it's working as expected or not, nothing else.
Now, if you want to test the CRUD feature whether it's working perfectly in the browser surely you need to use front-end testing, e.g. dusk.
Please or to participate in this conversation.