Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Pages/Home.php
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | class Home extends Page | ||||
*/ | */ | ||||
public function submitLogon( | public function submitLogon( | ||||
$browser, | $browser, | ||||
$username, | $username, | ||||
$password, | $password, | ||||
$wait_for_dashboard = false, | $wait_for_dashboard = false, | ||||
$config = [] | $config = [] | ||||
) { | ) { | ||||
$browser->type('@email-input', $username) | $browser->clearToasts() | ||||
->type('@email-input', $username) | |||||
->type('@password-input', $password); | ->type('@password-input', $password); | ||||
if ($username == 'ned@kolab.org') { | if ($username == 'ned@kolab.org') { | ||||
$code = \App\Auth\SecondFactor::code('ned@kolab.org'); | $code = \App\Auth\SecondFactor::code('ned@kolab.org'); | ||||
$browser->type('@second-factor-input', $code); | $browser->type('@second-factor-input', $code); | ||||
} | } | ||||
if (!empty($config)) { | if (!empty($config)) { | ||||
Show All 12 Lines |