...
$this->browse(function (Browser $browser) {
$browser->visit(url()->route('login'))
->type('email', 'user.one@email.com')
->type('password', 'something')
->press('Login')
->pause(60*60*1000)
->assertRouteIs('dashboard')
...
It works on local which is use APP_URL something like 'https://project.dev' but not work for remote 'https://project.com' and 'http://123.123.12.12'.
Errors or Problems
- login test on remote site not work
Different between local and remote
- dusk installed in local
- dusk not installed in remote
What i did to try solve it
- I read that Chrome need HTTPS. I given https to it. Still not work.
Without exact errors, it is difficult, to answer your question, but from what you described I can provide some hints:
Considering above, some of your tests could pass, if you make sure the following requirements are satisfied:
.env
APP_URL matches in both locationsDuskTestCase.php
to add--no-sandbox
option. This speeds tests up - so you shouldn't need to use pauseFinal thoughts.
A good workflow for this would be: