Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Pages/Dashboard.php
<?php | <?php | ||||
namespace Tests\Browser\Pages; | namespace Tests\Browser\Pages; | ||||
use Laravel\Dusk\Browser; | |||||
use Laravel\Dusk\Page; | use Laravel\Dusk\Page; | ||||
class Dashboard extends Page | class Dashboard extends Page | ||||
{ | { | ||||
/** | /** | ||||
* Get the URL for the page. | * Get the URL for the page. | ||||
* | * | ||||
* @return string | * @return string | ||||
*/ | */ | ||||
public function url() | public function url() | ||||
{ | { | ||||
return '/dashboard'; | return '/dashboard'; | ||||
} | } | ||||
/** | /** | ||||
* Assert that the browser is on the page. | * Assert that the browser is on the page. | ||||
* | * | ||||
* @param \Laravel\Dusk\Browser $browser | * @param \Laravel\Dusk\Browser $browser The browser object | ||||
* | |||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function assert(Browser $browser) | public function assert($browser) | ||||
{ | { | ||||
$browser->assertPathIs('/dashboard') | $browser->assertPathIs('/dashboard') | ||||
->waitUntilMissing('@app .app-loader') | ->waitUntilMissing('@app .app-loader') | ||||
->assertSee('Dashboard'); | ->assertSee('Dashboard'); | ||||
} | } | ||||
/** | /** | ||||
* Get the element shortcuts for the page. | * Get the element shortcuts for the page. | ||||
Show All 11 Lines |