Files
monica/tests/Browser/Pages/DashboardValidate2fa.php
T
Alexis SaettlerandGitHub 83fbc5fc48 Improve tests support (#984)
* Use WithFaker trait
* Add a scrollTo macro
* Use specific chromedriver
2018-03-08 21:36:18 +01:00

43 lines
737 B
PHP

<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
class DashboardValidate2fa extends Page
{
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/dashboard';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'verify' => "button[name='verify']",
'otp' => '#one_time_password',
];
}
}