Created
February 4, 2014 19:52
-
-
Save yupe/8811036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace tests\_pages\user; | |
use yii\codeception\BasePage; | |
class LoginPage extends BasePage | |
{ | |
public $route = 'account/login'; | |
public $loginField = 'LoginForm[username]'; | |
/** | |
* @param string $username | |
* @param string $password | |
*/ | |
public function login($username, $password) | |
{ | |
$I = $this->guy; | |
$I->see('Login', 'h1'); | |
$I->see('Login', '.btn-primary'); | |
$I->amGoingTo('try to login with empty credentials'); | |
$I->fillField('#loginform-username', '[email protected]'); | |
$I->fillField('#loginform-password', 'testpassword'); | |
$I->uncheckOption('#loginform-rememberme'); | |
$I->click('#login-btn'); | |
$I->wait(2); | |
$I->see('You have successfully created your Yii-powered application.'); | |
$I->see('Logout (xoma)'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment