mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-52708 core_admin: Added Behat test to automate MDLQA-8190
This commit is contained in:
parent
b611ade3ab
commit
4d08decb77
1 changed files with 57 additions and 0 deletions
|
@ -0,0 +1,57 @@
|
||||||
|
@core @core_admin
|
||||||
|
Feature: Enable multiple accounts to have the same email address
|
||||||
|
In order to have multiple accounts registerd on the system with the same email address
|
||||||
|
As an admin
|
||||||
|
I need to enable multiple accounts to be registered with the same email address and verify it is applied
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given I log in as "admin"
|
||||||
|
|
||||||
|
Scenario: Enable registration of multiple accounts with the same email address
|
||||||
|
Given the following config values are set as admin:
|
||||||
|
| allowaccountssameemail | 1 |
|
||||||
|
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
|
||||||
|
And I set the following fields to these values:
|
||||||
|
| Username | testmultiemailuser1 |
|
||||||
|
| Choose an authentication method | Manual accounts |
|
||||||
|
| New password | test@User1 |
|
||||||
|
| First name | Test |
|
||||||
|
| Surname | Multi1 |
|
||||||
|
| Email address | testmultiemailuser@example.com |
|
||||||
|
And I press "Create user"
|
||||||
|
And I should see "Test Multi1"
|
||||||
|
And I press "Add a new user"
|
||||||
|
And I set the following fields to these values:
|
||||||
|
| Username | testmultiemailuser2 |
|
||||||
|
| Choose an authentication method | Manual accounts |
|
||||||
|
| New password | test@User2 |
|
||||||
|
| First name | Test |
|
||||||
|
| Surname | Multi2 |
|
||||||
|
| Email address | testmultiemailuser@example.com |
|
||||||
|
And I press "Create user"
|
||||||
|
Then I should see "Test Multi2"
|
||||||
|
And I should not see "This email address is already registered"
|
||||||
|
|
||||||
|
Scenario: Disable registration of multiple accounts with the same email address
|
||||||
|
Given the following config values are set as admin:
|
||||||
|
| allowaccountssameemail | 0 |
|
||||||
|
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
|
||||||
|
And I set the following fields to these values:
|
||||||
|
| Username | testmultiemailuser1 |
|
||||||
|
| Choose an authentication method | Manual accounts |
|
||||||
|
| New password | test@User1 |
|
||||||
|
| First name | Test |
|
||||||
|
| Surname | Multi1 |
|
||||||
|
| Email address | testmultiemailuser@example.com |
|
||||||
|
And I press "Create user"
|
||||||
|
And I should see "Test Multi1"
|
||||||
|
And I press "Add a new user"
|
||||||
|
And I set the following fields to these values:
|
||||||
|
| Username | testmultiemailuser2 |
|
||||||
|
| Choose an authentication method | Manual accounts |
|
||||||
|
| New password | test@User2 |
|
||||||
|
| First name | Test |
|
||||||
|
| Surname | Multi2 |
|
||||||
|
| Email address | testmultiemailuser@example.com |
|
||||||
|
And I press "Create user"
|
||||||
|
Then I should see "This email address is already registered"
|
Loading…
Add table
Add a link
Reference in a new issue