Commit df92a1ff authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug #1703721 - combine add user tests and make more comprehensive"

parents f8bfe2e3 5dd3b1ae
@javascript @core @core_administration
Feature: Configuration changes on add users page
In order to change configuration settings on the add users page
As an admin
So I can benefit from the use of different configuration changes
Scenario: Turning switches on and off on the Add user page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Add user" in "Users" from administration menu
And I set the following fields to these values:
| Site staff | 1 |
| Site administrator | 1 |
| Institution administrator | 1 |
And I press "Create user"
# Checking that the page will require you to fill more fields in before you hit save
And I should see "There was an error with submitting this form. Please check the marked fields and try again."
@javascript @core @core_administration
Feature: Allow user csv upload to ignore non-essential mandatory fields
In order to add users by csv
As an admin follow through add users by csv
So I can change the mandatory fields
Scenario: Create users by csv (Bug 1426983)
# Log in as "Admin" user
Given I log in as "admin" with password "Kupuhipa1"
# Verifying log in was successful
And I should see "Admin User"
# Adding Users by CVS
And I choose "Add users by CSV" in "Users" from administration menu
And I attach the file "UserCSV.csv" to "CSV file"
And I disable the switch "Force password change"
And I disable the switch "Email users about their account"
And I press "Add users by CSV"
Then I should see "Your CSV file was processed successfully"
And I should see "New users added: 4."
# Check that we can delete a user after upload (Bug #1558864)
And I choose "User search" in "Users" from administration menu
And I follow "kevin01"
And I follow "Suspend or delete this user"
And I scroll to the id "delete"
And I press and confirm "Delete user"
And I should see "User deleted successfully"
@javascript @core @core_administration
Feature: Configuration changes on add users page
In order to change configuration settings on the add users page
As an admin
So I can benefit from the use of different configuration changes
Background:
Given the following "institutions" exist:
| name | displayname | registerallowed | registerconfirm |
| instone | Institution One | ON | OFF |
| insttwo | Institution Two | ON | OFF |
And the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| StaffA | Kupuhipa1 | StaffA@example.com | Alexei | Staff | instone | internal | staff |
Scenario: Admin to add an user (Bug 1703721)
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Add user" in "Users" from administration menu
And I set the following fields to these values:
| First name | Bob |
| Last name | One |
| Email | UserB@example.com |
| Username | instadmin |
| password | Kupuhipa1 |
| Institution administrator | 1 |
And I select "Institution One" from "adduser_authinstance"
And I press "General account options"
And I set the following fields to these values:
| Multiple journals | 1 |
And I press "×" in the "div.modal-header" "css_element"
And I press "Create user"
Then I should see "New user account created successfully"
And I expand "Institution settings - Institution One" node
And the field "Institution administrator" matches value "1"
#Login as Institution admin
And I should see "Log in as this user"
And I scroll to the top
And I follow "Log in as this user"
And I should see "You are required to change your password before you can proceed."
And I follow "log in anyway"
And I choose "Users" from administration menu
And I follow "Bob"
And I wait "1" seconds
And I should see "Administrator of Institution One"
And I click on "Show administration menu"
And I should see "Groups" in the "#main-nav-admin" "css_element"
And I should not see "Extensions" in the "#main-nav-admin" "css_element"
#Checking multiple journals
And I choose "Journals" in "Content" from main menu
And I should see "Create journal"
And I log out
#login as staff user
Given I log in as "StaffA" with password "Kupuhipa1"
And I click on "Show administration menu"
And I should see "Reports" in the "#main-nav-admin" "css_element"
And I should not see "Groups" in the "#main-nav-admin" "css_element"
#Site admin role already tested in menu_navigation.feature file
Scenario: Create users by csv (Bug 1426983)
Given I log in as "admin" with password "Kupuhipa1"
#Verifying log in was successful
And I should see "Admin User"
#Adding 50 Users by csv
And I choose "Add users by CSV" in "Users" from administration menu
And I attach the file "50users_new.csv" to "CSV file"
And I select "Institution One" from "uploadcsv_authinstance"
And I press "Add users by CSV"
Then I should see "Your CSV file was processed successfully"
And I should see "New users added: 50."
#Upload 20 users by csv by choosing the switch update users
And I choose "Add users by CSV" in "Users" from administration menu
And I attach the file "20users_update.csv" to "CSV file"
And I select "Institution One" from "uploadcsv_authinstance"
And I enable the switch "Update users"
And I press "Add users by CSV"
Then I should see "Your CSV file was processed successfully"
And I should see "Users updated: 20."
And I log out
#Check that we update the fields, password change and email recieved
Given I log in as "user0005" with password "changeme3"
And I should see "You are required to change your password before you can proceed."
And I fill in "New password" with "dragon123"
And I fill in "Confirm password" with "dragon123"
And I press "Submit"
And I should see "Your new password has been saved"
And I should see "Institution membership confirmation"
And I choose "Profile" in "Content" from main menu
And the "Student ID" field should contain "64000005"
And I follow "Contact information"
And the "Town" field should contain "Stewarts River"
And the "Mobile phone" field should contain "0491 570 110"
And I follow "General"
And the "Occupation" field should contain "Hairdresser"
And I log out
#login back as admin
Given I log in as "admin" with password "Kupuhipa1"
And I choose "User search" in "Users" from administration menu
# Check that we can delete a user after upload (Bug #1558864)
And I follow "user0005"
And I follow "Suspend or delete this user"
And I scroll to the id "delete"
And I press and confirm "Delete user"
And I should see "User deleted successfully"
@javascript @core @core_administration
Feature: Switches on general accounts
In order to change settings
As an admin
I need to be able to switch switches back and forth
Scenario: Turning switchboxes on and off in diff areas (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
# In the adding users area
When I choose "Add user" in "Users" from administration menu
And I press "General account options"
# Changing the switches to their opposite setting
And I set the following fields to these values:
| HTML editor | 0 |
| Disable email | 1 |
| Show controls to add and remove columns when editing a page | 1 |
| Multiple journals | 1 |
| Dashboard information | 0 |
And I press "×" in the "div.modal-header" "css_element"
And I fill in the following:
| firstname | white |
| lastname | valiant |
| email | wv@example.org |
| username | wval |
| password | mahara1 |
And I press "Create user"
# In the Admin block adding users by CSV area
And I choose "Add users by CSV" in "Users" from administration menu
And I follow "General account options"
# Changing the switches to the opposite setting
And I set the following fields to these values:
| HTML editor | 0 |
| Disable email | 1 |
| Show controls to add and remove columns when editing a page | 1 |
| Multiple journals | 1 |
| Dashboard information | 0 |
And I attach the file "UserCSV.csv" to "CSV file"
And I disable the switch "Force password change"
And I disable the switch "Email users about their account"
And I press "Add users by CSV"
# Navigating to the account index
And I log out
Then I log in as "bob01" with password "Mahara1"
And I go to "account/index.php"
And I should not see "Undefined index:"
# Changing the switches to their opposite setting
And I set the following fields to these values:
| HTML editor | 1 |
| Disable email | 0 |
| Show controls to add and remove columns when editing a page | 0 |
| Multiple journals | 0 |
| Maximum tags in cloud | 15 |
| Dashboard information | 1 |
And I press "Save"
username,email,firstname,lastname,mobilenumber,town,studentid,occupation
user0001,user1@example.org,User0001,User0001,0491 570 156,Weethalle,64000001,Referee
user0002,user2@example.org,User0002,User0002,0491 570 157,Waratah,64000002,Chemist
user0003,user3@example.org,User0003,User0003,0491 570 158,Morrison,64000003,Paralegal
user0004,user4@example.org,User0004,User0004,0491 570 159,Oakwood,64000004,Insurance Agent
user0005,user5@example.net,User0005,User0005,0491 570 110,Stewarts River,64000005,Hairdresser
user0006,user6@example.org,User0006,User0006,0491 570 156,Benloch,64000006,High School Teacher
user0007,user7@example.org,User0007,User0007,0491 570 157,Jimna,64000007,Radiologic Technologist
user0008,user8@example.org,User0008,User0008,0491 570 158,Elizabeth,64000008,Automotive mechanic
user0009,user9@example.org,User0009,User0009,0491 570 159,Kingsvale,64000009,Urban Planner
user0010,user10@example.org,User0010,User0010,0491 570 110,Upper Tallebudgera,64000010,College Professor
user0011,user11@example.org,User0011,User0011,0491 570 156,Oruanui,64000011,Interpreter & Translator
user0012,user12@example.org,User0012,User0012,0491 570 157,Tokatoka,64000012,Landscape Architect
user0013,user13@example.org,User0013,User0013,0491 570 158,Mangaroa,64000013,Loan Officer
user0014,user14@example.org,User0014,User0014,0491 570 159,Waikakaho,64000014,Construction Manager
user0015,user15@example.org,User0015,User0015,0491 570 110,Foxhill,64000015,Systems Analyst
user0016,user16@example.org,User0016,User0016,0491 570 156,Tiroroa,64000016,Elementary School Teacher
user0017,user17@example.org,User0017,User0017,0491 570 157,Overdale,64000017,Zoologist
user0018,user18@example.org,User0018,User0018,0491 570 158,Ngapuna,64000018,Zoologist
user0019,user19@example.org,User0019,User0019,0491 570 159,Kohekohe,64000019,Radiologic Technologist
user0020,user20@example.org,User0020,User0020,0491 570 110,Rangiuru,64000020,Teacher
username,password,email,firstname,lastname
user0001,changeme1,user1@example.org,User0001,User0001
user0002,changeme1,user2@example.org,User0002,User0002
user0003,changeme2,user3@example.org,User0003,User0003
user0004,changeme2,user4@example.org,User0004,User0004
user0005,changeme3,user5@example.org,User0005,User0005
user0006,changeme3,user6@example.org,User0006,User0006
user0007,changeme4,user7@example.org,User0007,User0007
user0008,changeme4,user8@example.org,User0008,User0008
user0009,changeme5,user9@example.org,User0009,User0009
user0010,changeme5,user10@example.org,User0010,User0010
user0011,changeme6,user11@example.org,User0011,User0011
user0012,changeme6,user12@example.org,User0012,User0012
user0013,changeme7,user13@example.org,User0013,User0013
user0014,changeme7,user14@example.org,User0014,User0014
user0015,changeme8,user15@example.org,User0015,User0015
user0016,changeme8,user16@example.org,User0016,User0016
user0017,changeme9,user17@example.org,User0017,User0017
user0018,changeme9,user18@example.org,User0018,User0018
user0019,changeme10,user19@example.org,User0019,User0019
user0020,changeme10,user20@example.org,User0020,User0020
user0021,changeme11,user21@example.org,User0021,User0021
user0022,changeme11,user22@example.org,User0022,User0022
user0023,changeme12,user23@example.org,User0023,User0023
user0024,changeme12,user24@example.org,User0024,User0024
user0025,changeme13,user25@example.org,User0025,User0025
user0026,changeme13,user26@example.org,User0026,User0026
user0027,changeme14,user27@example.org,User0027,User0027
user0028,changeme14,user28@example.org,User0028,User0028
user0029,changeme15,user29@example.org,User0029,User0029
user0030,changeme15,user30@example.org,User0030,User0030
user0031,changeme16,user31@example.org,User0031,User0031
user0032,changeme16,user32@example.org,User0032,User0032
user0033,changeme17,user33@example.org,User0033,User0033
user0034,changeme17,user34@example.org,User0034,User0034
user0035,changeme18,user35@example.org,User0035,User0035
user0036,changeme18,user36@example.org,User0036,User0036
user0037,changeme19,user37@example.org,User0037,User0037
user0038,changeme19,user38@example.org,User0038,User0038
user0039,changeme20,user39@example.org,User0039,User0039
user0040,changeme20,user40@example.org,User0040,User0040
user0041,changeme21,user41@example.org,User0041,User0041
user0042,changeme21,user42@example.org,User0042,User0042
user0043,changeme22,user43@example.org,User0043,User0043
user0044,changeme22,user44@example.org,User0044,User0044
user0045,changeme23,user45@example.org,User0045,User0045
user0046,changeme23,user46@example.org,User0046,User0046
user0047,changeme2,user47@example.org,User0047,User0047
user0048,changeme2,user48@example.org,User0048,User0048
user0049,changeme3,user49@example.org,User0049,User0049
user0050,changeme3,user50@example.org,User0050,User0050
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment