You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
565 B
21 lines
565 B
<?php
|
|
|
|
use yii\helpers\Url;
|
|
|
|
class LoginCest
|
|
{
|
|
public function ensureThatLoginWorks(AcceptanceTester $I)
|
|
{
|
|
$I->amOnPage(Url::toRoute('/site/login'));
|
|
$I->see('Login', 'h1');
|
|
|
|
$I->amGoingTo('try to login with correct credentials');
|
|
$I->fillField('input[name="LoginForm[username]"]', 'admin');
|
|
$I->fillField('input[name="LoginForm[password]"]', 'admin');
|
|
$I->click('login-button');
|
|
$I->wait(2); // wait for button to be clicked
|
|
|
|
$I->expectTo('see user info');
|
|
$I->see('Logout');
|
|
}
|
|
}
|