There should be a screenshot in the Tests/Browser/screenshots directory
source: https://laravel-news.com/testing-vue-components-with-laravel-dusk
Hi I'm getting started with Laravel Dusk (v2) with a Laravel 5.5 app
I'm starting small and want to test that a user can log in so have created this test:
public function test_user_can_browse_to_login_page_and_log_in()
{
// $this->logout();
$this->browse(function (Browser $browser) {
$browser->visit('/')
->assertSee('You have arrived')
->click('@dashboard-link')
->assertSee('login')
->type('email', '[email protected]')
->type('password', 'password')
->click('@login-button')
->assertPathIs('/dashboard')
->assertSee('seven days');
});
}
It all works fine until the last assertion - it doesn't see seven days which should be on the dashboard page.
So, to debug how can I see what the test is seeing? Is there a method to view the results?
Also, I don't see a browser opening (which I understand is correct) - I've followed another post and removed --headless from the DustTestCase.php but that then hangs completely. So I'm unable to watch the tests. (I have replaced the --headless option)
New to this so be kind!!
Resolved - I hadn't appreciated the assertSee is case sensitive. All working now - thank you - on to my next problem!!!
Please or to participate in this conversation.