Laravel dusk can't run two tests referring to one page

Posted 2 months ago by mohammadkaab

Hi I'm writing a couple of tests with LARAVEL dusk and I've recently dumped to a new problem. well, the problem is very famous and everyone has seen it for once at least Actually I have two tests which they are calling the same page and also posting the same page. (I mean submitting the same page). The first test works as expected and the response is exactly as I want. but the second test is giving a bit different response. The response

The Page has expired due to inactivity.
Please refresh and try again.

I don't want to disable CSRF-TOKEN I've also used javascript to fill the _token field with a new token but still the same response I'm trying refresh method still the same response

More info: When I just commented the first test the second test works as expected. so maybe the reason of the problem Is the first test. But I don't know really what should I do to make this works. Any clue guys? Thanks for any help.

Please sign in or create an account to participate in this conversation.