Answer the question
In order to leave comments, you need to log in
How does assertSee('Laravel') work in Dusk?
Good afternoon.
I'm trying to understand how assertSee works if you search on the Laravel page
The test is successful, but the problem is that this text is not there. I changed APP_NAME in .env.
Or does he look at the default value in the configs?
<?php
namespace Tests\Browser;
use Tests\DuskTestCase;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
class LoginTest extends DuskTestCase
{
/**
* A Dusk test example.
*
* @return void
*/
public function testExample()
{
$this->browse(function (Browser $browser) {
$browser->visit('/login')
->assertSee('Laravel');
});
}
}
Answer the question
In order to leave comments, you need to log in
Dusk screenshots helped to find the problem. The url was not the one in env.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question