MDL-43838 behat: Clean theme compatibility with small and medium screen sizes
[moodle.git] / auth / tests / behat / login.feature
CommitLineData
550d842e 1@core @core_auth
0a56fc69
DM
2Feature: Authentication
3 In order to validate my credentials in the system
5d7b6307 4 As a user
0a56fc69
DM
5 I need to log into the system
6
3688bd47 7 Scenario: Log in with the predefined admin user with Javascript disabled
0a56fc69 8 Given I log in as "admin"
3688bd47
DM
9 Then I should see "You are logged in as Admin User"
10
11 @javascript
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"
0a56fc69 15
07dd7fcc 16 Scenario: Log in as an existing admin user filling the form
bedc20aa
DM
17 Given the following "users" exists:
18 | username | password | firstname | lastname | email |
19 | testuser | testuser | Test | User | moodle@moodlemoodle.com |
20 And I am on homepage
07dd7fcc 21 When I follow "Log in"
bedc20aa
DM
22 And I fill in "Username" with "testuser"
23 And I fill in "Password" with "testuser"
07dd7fcc 24 And I press "Log in"
bedc20aa
DM
25 Then I should see "You are logged in as"
26
07dd7fcc 27 Scenario: Log in as an unexisting user filling the form
bedc20aa
DM
28 Given the following "users" exists:
29 | username | password | firstname | lastname | email |
30 | testuser | testuser | Test | User | moodle@moodlemoodle.com |
31 And I am on homepage
07dd7fcc 32 When I follow "Log in"
bedc20aa
DM
33 And I fill in "Username" with "testuser"
34 And I fill in "Password" with "unexisting"
07dd7fcc 35 And I press "Log in"
bedc20aa
DM
36 Then I should see "Invalid login, please try again"
37
07dd7fcc 38 Scenario: Log out
0a56fc69
DM
39 Given I log in as "admin"
40 When I log out
41 Then I should see "You are not logged in"