/** * @Given I log in as :email with :password password */ public function iLogInAsWithPassword($email, $password) { $this->loginPage->open(); $this->loginPage->specifyUsername($email); $this->loginPage->specifyPassword($password); $this->loginPage->logIn(); }
/** * @Then I should be able to log in as :email with :password password */ public function iShouldBeAbleToLogInAsWithPassword($email, $password) { $this->loginPage->open(); $this->loginPage->specifyUsername($email); $this->loginPage->specifyPassword($password); $this->loginPage->logIn(); $this->iShouldBeLoggedIn(); }
/** * @Then I should be notified about bad credentials */ public function iShouldBeNotifiedAboutBadCredentials() { Assert::true($this->loginPage->hasValidationErrorWith('Error Invalid credentials.'), 'I should see validation error.'); }