From 07dd7fcc119abdef1c3bbb42377c49c269266ba1 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 4 Jul 2013 09:22:54 +1200 Subject: [PATCH] MDL-39813 behat: fixed up behat expectations --- auth/tests/behat/behat_auth.php | 6 +++--- auth/tests/behat/login.feature | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/auth/tests/behat/behat_auth.php b/auth/tests/behat/behat_auth.php index c6d47aa4958..6ce3a340b5e 100644 --- a/auth/tests/behat/behat_auth.php +++ b/auth/tests/behat/behat_auth.php @@ -49,10 +49,10 @@ class behat_auth extends behat_base { public function i_log_in_as($username) { return array(new Given('I am on homepage'), - new Given('I follow "Login"'), + new Given('I follow "Log in"'), new Given('I fill in "Username" with "'.$username.'"'), new Given('I fill in "Password" with "'.$username.'"'), - new Given('I press "Login"') + new Given('I press "Log in"') ); } @@ -62,7 +62,7 @@ class behat_auth extends behat_base { * @Given /^I log out$/ */ public function i_log_out() { - return new When('I follow "Logout"'); + return new When('I follow "Log out"'); } } diff --git a/auth/tests/behat/login.feature b/auth/tests/behat/login.feature index 72e449217a5..f4c4e40222d 100644 --- a/auth/tests/behat/login.feature +++ b/auth/tests/behat/login.feature @@ -4,32 +4,32 @@ Feature: Authentication As a user I need to log into the system - Scenario: Login with the predefined admin user + Scenario: Log in with the predefined admin user Given I log in as "admin" - Scenario: Login as an existing admin user filling the form + Scenario: Log in as an existing admin user filling the form Given the following "users" exists: | username | password | firstname | lastname | email | | testuser | testuser | Test | User | moodle@moodlemoodle.com | And I am on homepage - When I follow "Login" + When I follow "Log in" And I fill in "Username" with "testuser" And I fill in "Password" with "testuser" - And I press "Login" + And I press "Log in" Then I should see "You are logged in as" - Scenario: Login as an unexisting user filling the form + Scenario: Log in as an unexisting user filling the form Given the following "users" exists: | username | password | firstname | lastname | email | | testuser | testuser | Test | User | moodle@moodlemoodle.com | And I am on homepage - When I follow "Login" + When I follow "Log in" And I fill in "Username" with "testuser" And I fill in "Password" with "unexisting" - And I press "Login" + And I press "Log in" Then I should see "Invalid login, please try again" - Scenario: Logout + Scenario: Log out Given I log in as "admin" When I log out Then I should see "You are not logged in"