R
R
Rishat Sultanov2018-04-14 12:07:24
Laravel
Rishat Sultanov, 2018-04-14 12:07:24

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

1 answer(s)
R
Rishat Sultanov, 2018-04-19
@rishatss

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 question

Ask a Question

731 491 924 answers to any question