init
This commit is contained in:
21
tests/acceptance/LoginCest.php
Normal file
21
tests/acceptance/LoginCest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user