Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Pages/UserList.php
Show All 21 Lines | class UserList extends Page | ||||
* @param \Laravel\Dusk\Browser $browser The browser object | * @param \Laravel\Dusk\Browser $browser The browser object | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function assert($browser) | public function assert($browser) | ||||
{ | { | ||||
$browser->assertPathIs($this->url()) | $browser->assertPathIs($this->url()) | ||||
->waitUntilMissing('@app .app-loader') | ->waitUntilMissing('@app .app-loader') | ||||
->assertSeeIn('#user-list .card-title', 'User Accounts'); | ->assertSeeIn('#user-list .card-title', 'User accounts'); | ||||
} | } | ||||
/** | /** | ||||
* Get the element shortcuts for the page. | * Get the element shortcuts for the page. | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
public function elements(): array | public function elements(): array | ||||
{ | { | ||||
return [ | return [ | ||||
'@app' => '#app', | '@app' => '#app', | ||||
'@table' => '#user-list table', | '@table' => '#user-list table', | ||||
]; | ]; | ||||
} | } | ||||
} | } |