forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-69371-master-4' of git://github.com/bmbrands/moodle
- Loading branch information
Showing
31 changed files
with
805 additions
and
515 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| sitepolicyhandler | tool_policy | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should not see "I understand and agree" | ||
And I set the following fields to these values: | ||
| Username | user1 | | ||
|
@@ -45,7 +45,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| P1 | This privacy policy | | full text2 | short text2 | draft | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should not see "I understand and agree" | ||
And I set the following fields to these values: | ||
| Username | user1 | | ||
|
@@ -80,7 +80,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| P1 | This site policy | | full text3 | short text3 | draft | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should see "This site policy" in the "region-main" "region" | ||
And I should see "short text2" | ||
And I should see "full text2" | ||
|
@@ -128,7 +128,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| This guests policy | 0 | | full text4 | short text4 | active | guest | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should see "This site policy" in the "region-main" "region" | ||
And I should see "short text2" | ||
And I should see "full text2" | ||
|
@@ -188,7 +188,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| This site policy | | full text2 | short text2 | active | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should see "Age and location verification" | ||
And I set the field "What is your age?" to "16" | ||
And I set the field "In which country do you live?" to "DZ" | ||
|
@@ -239,7 +239,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| This privacy policy | 1 | | full text3 | short text3 | active | loggedin | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
And I press "Create new account" | ||
And I click on "Create new account" "link" | ||
And I should see "This site policy" | ||
And I press "Next" | ||
And I should see "This privacy policy" | ||
|
@@ -494,7 +494,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| This guests policy | 0 | | full text4 | short text4 | active | guest | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should see "This site policy" in the "region-main" "region" | ||
And I should see "short text2" | ||
And I should see "full text2" | ||
|
@@ -526,7 +526,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
Then I should see "Confirm your account" | ||
And I should see "An email should have been sent to your address at [email protected]" | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
# Confirm that the user can view and accept policies when attempting to create another account. | ||
Then I should see "This site policy" in the "region-main" "region" | ||
And I should see "short text2" | ||
|
@@ -628,7 +628,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
And I press "Log in as a guest" | ||
# Now sign up | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
Then I should see "This site policy" | ||
And I should see "short text2" | ||
And I should see "full text2" | ||
|
@@ -677,7 +677,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| Terms of Service | We teach, you learn | Here goes content. | 1 | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
# The first policy with the agreement style "on its own page" must be accepted first. | ||
Then I should see "Digital maturity declaration" in the "region-main" "region" | ||
And I should see "You declare be old enough" | ||
|
@@ -841,7 +841,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign | |
| Terms of Service | We teach, you learn | Here goes content. | 1 | guest | | ||
And I am on site homepage | ||
And I follow "Log in" | ||
When I press "Create new account" | ||
When I click on "Create new account" "link" | ||
# All the policies to be displayed one by one with a button to accept each of them prior seeing the next. | ||
Then I should see "Digital maturity declaration" in the "region-main" "region" | ||
And I should see "You declare be old enough" | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
@auth @core_auth @javascript | ||
Feature: Test if the login form provides the correct feedback | ||
In order to check if the login form provides correct feedback | ||
As a user | ||
I need to go on login page and see feedback on incorrect username or password. | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | | ||
| teacher1 | | ||
|
||
Scenario: Check invalid login message | ||
Given I follow "Log in" | ||
And I set the field "Username" to "teacher1" | ||
And I set the field "Password" to "incorrect" | ||
When I press "Log in" | ||
Then I should see "Invalid login, please try again" | ||
|
||
Scenario: Test login language selector | ||
Given I log in as "admin" | ||
And I navigate to "Language > Language packs" in site administration | ||
And I set the field "Available language packs" to "nl,es" | ||
And I press "Install selected language pack(s)" | ||
And I trigger cron | ||
And I am on homepage | ||
And I log out | ||
And I follow "Log in" | ||
And I open the action menu in "region-main" "region" | ||
# The line below contains the unicode character U+200E before and after the brackets, please be very careful editing this line. | ||
And I choose "Nederlands (nl)" in the open action menu | ||
Then I should see "Gebruikersnaam" | ||
|
||
@_file_upload | ||
Scenario: Set logo for loginpage | ||
Given I log in as "admin" | ||
And I navigate to "Appearance > Logos" in site administration | ||
And I upload "course/tests/fixtures/image.jpg" file to "Logo" filemanager | ||
And I press "Save changes" | ||
And I log out | ||
And I follow "Log in" | ||
Then "//img[@id='logoimage']" "xpath_element" should exist | ||
|
||
Scenario: Add a custom welcome message | ||
Given the following config values are set as admin: | ||
| auth_instructions | Lorem ipsum dolor sit amet | | ||
And I follow "Log in" | ||
Then I should see "Lorem ipsum dolor sit amet" | ||
|
||
Scenario: Show the maintenance mode message | ||
Given the following config values are set as admin: | ||
| maintenance_enabled | Disabled | | ||
| maintenance_message | Back online tomorrow | | ||
And I follow "Log in" | ||
Then I should see "Back online tomorrow" | ||
|
||
Scenario: User self registration | ||
Given the following config values are set as admin: | ||
| registerauth | Email-based self-registration | | ||
And I follow "Log in" | ||
Then I should see "Create new account" | ||
|
||
Scenario: Set OAuth providers | ||
Given I log in as "admin" | ||
And I navigate to "Plugins > Authentication > Manage authentication" in site administration | ||
And I click on "Enable" "link" in the "OAuth 2" "table_row" | ||
And I navigate to "Server > OAuth 2 services" in site administration | ||
And I press "Google" | ||
And I set the field "Client ID" to "1234" | ||
And I set the field "Client secret" to "1234" | ||
And I press "Save changes" | ||
And I press "Facebook" | ||
And I set the field "Client ID" to "1234" | ||
And I set the field "Client secret" to "1234" | ||
And I press "Save changes" | ||
And I press "Microsoft" | ||
And I set the field "Client ID" to "1234" | ||
And I set the field "Client secret" to "1234" | ||
And I press "Save changes" | ||
And I log out | ||
And I follow "Log in" | ||
Then I should see "Google" | ||
And I should see "Facebook" | ||
And I should see "Microsoft" | ||
|
||
Scenario: Test the login page auto focus feature | ||
Given the following config values are set as admin: | ||
| loginpageautofocus | Enabled | | ||
And I follow "Log in" | ||
Then the focused element is "Username" "field" | ||
And I set the field "Username" to "admin" | ||
And I set the field "Password" to "admin" | ||
And I set the field "Remember username" to "1" | ||
And I press "Log in" | ||
And I log out | ||
And I follow "Log in" | ||
Then the focused element is "Password" "field" | ||
|
||
Scenario: Test the login page focus after error feature | ||
Given I follow "Log in" | ||
And I set the field "Username" to "admin" | ||
And I set the field "Password" to "wrongpassword" | ||
And I press "Log in" | ||
And I press the tab key | ||
Then the focused element is "Username" "field" |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.