2 Feature: Authentication
3 In order to validate my credentials in the system
5 I need to log into the system
7 Scenario: Log in with the predefined admin user with Javascript disabled
8 Given I log in as "admin"
9 Then I should see "You are logged in as Admin User" in the "page-footer" "region"
12 Scenario: Log in with the predefined admin user with Javascript enabled
13 Given I log in as "admin"
14 Then I should see "You are logged in as Admin User" in the "page-footer" "region"
16 Scenario: Log in as an existing admin user filling the form
17 Given the following "users" exist:
18 | username | password | firstname | lastname | email |
19 | testuser | testuser | Test | User | moodle@example.com |
20 And I am on site homepage
21 When I follow "Log in"
22 And I set the field "Username" to "testuser"
23 And I set the field "Password" to "testuser"
25 Then I should see "You are logged in as" in the "page-footer" "region"
27 Scenario: Log in as an unexisting user filling the form
28 Given the following "users" exist:
29 | username | password | firstname | lastname | email |
30 | testuser | testuser | Test | User | moodle@example.com |
31 And I am on site homepage
32 When I follow "Log in"
33 And I set the field "Username" to "testuser"
34 And I set the field "Password" to "unexisting"
36 Then I should see "Invalid login, please try again"
39 Given I log in as "admin"
41 Then I should see "You are not logged in" in the "page-footer" "region"