mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-46975 auth_email: Behat test for email validation on signup
This commit is contained in:
parent
0920f35ed9
commit
7eb5148264
@ -63,3 +63,36 @@ Feature: User must accept policy when logging in and signing up
|
||||
And I log in as "user1"
|
||||
And I open my profile in edit mode
|
||||
And the field "First name" matches value "User1"
|
||||
|
||||
Scenario Outline: Email validation during email registration
|
||||
Given the following config values are set as admin:
|
||||
| allowaccountssameemail | <allowsameemail> |
|
||||
| registerauth | email |
|
||||
| passwordpolicy | 0 |
|
||||
And the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| s1 | John | Doe | s1@example.com |
|
||||
And I am on site homepage
|
||||
And I follow "Log in"
|
||||
When I press "Create new account"
|
||||
And I set the following fields to these values:
|
||||
| Username | s2 |
|
||||
| Password | test |
|
||||
| Email address | <email1> |
|
||||
| Email (again) | <email2> |
|
||||
| First name | Jane |
|
||||
| Surname | Doe |
|
||||
And I press "Create my new account"
|
||||
Then I should <expect> "This email address is already registered. Perhaps you created an account in the past?"
|
||||
And I should <expect2> "Invalid email address"
|
||||
|
||||
Examples:
|
||||
| allowsameemail | email1 | email2 | expect | expect2 |
|
||||
| 0 | s1@example.com | s1@example.com | see | not see |
|
||||
| 0 | S1@EXAMPLE.COM | S1@EXAMPLE.COM | see | not see |
|
||||
| 0 | s1@example.com | S1@EXAMPLE.COM | see | not see |
|
||||
| 0 | s2@example.com | s1@example.com | not see | see |
|
||||
| 1 | s1@example.com | s1@example.com | not see | not see |
|
||||
| 1 | S1@EXAMPLE.COM | S1@EXAMPLE.COM | not see | not see |
|
||||
| 1 | s1@example.com | S1@EXAMPLE.COM | not see | not see |
|
||||
| 1 | s1@example.com | s2@example.com | not see | see |
|
||||
|
Loading…
x
Reference in New Issue
Block a user