yii2-netdisk/tests/codeception/acceptance/LoginCest.php
2016-07-14 18:20:28 +02:00

20 lines
536 B
PHP

<?php
class LoginCest
{
public function ensureThatLoginWorks(AcceptanceTester $I)
{
//$I->amOnPage(['site/login']);
$I->amOnPage('index.php?r=site%2Flogin');
$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->expectTo('see user info');
$I->see('Logout (admin)');
}
}