code please? you could also manually LOGOUT after each test (create a teardown() function that runs after each test to make sure you log out)
Jul 11, 2018
5
Level 3
Dusk test not working as expected
I am using dusk for testing and have encountered a problem.
I have 2 test functions in ExampleTest file.
In the first test, I am creating a factory user and logging him through login form and asserting that user should see home. This works.
But the second test, where I again visit login page and enter wrong credentials, fails as I guess it somehow maintains the session for the user and thus going to /login redirects back to /home.
What is the problem? How can I remove the logged in user after method gets over ?
Please or to participate in this conversation.