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

Merge "Behat Test (Selenium): Changing users Password"

parents 2cd4ec57 89efd1e2
@javascript @core @core_administration
Feature: Creating users and an institution enrolling users and changing their passwords
In order to change user passwords successfully
As an admin create users and create an institution
So I can log in as those users and change the password successfully
Scenario: Creating an Institution assigning users and changing their passwords
# Log in as Admin
Given I log in as "admin" with password "Password1"
# Verifying log in was successful
And I should see "Admin User"
# Creating an Institution
When I follow "Administration"
And I follow "Institution"
And I press "Add institution"
And I fill in the following:
| Institution name | institutionone |
| Institution display name | institution One |
And I press "Submit"
# Creating user 1
And I follow "Users"
And I choose "Add user" in "Users"
And I fill in the following:
| firstname | bob |
| lastname | bobby |
| email | bob@example.com |
| username | bob |
| password | mahara1 |
And I select "institution One" from "Institution"
And I check "Institution administrator"
And I press "Create user"
# Creating user 2
And I follow "Users"
And I choose "Add user" in "Users"
And I fill in the following:
| firstname | Jen |
| lastname | Jenny |
| email | jen@example.com |
| username | jen |
| password | mahara1 |
And I select "institution One" from "Institution"
And I press "Create user"
# Log out as user admin
And I follow "Logout"
# Log in as user 1
Then I log in as "bob" with password "mahara1"
And I fill in the following:
| New password: | mahara2 |
| Confirm password: | mahara2 |
And I press "Submit"
# Verifying password was changed successfully
And I should see "Your new password has been saved"
# Changing password
And I follow "Settings"
And I fill in the following:
| Current password | mahara2 |
| New password | mahara3 |
| Confirm password | mahara3 |
And I press "Save"
And I wait "3" seconds
# Verifying password was changed
And I should see "Preferences saved"
# Log out as user 1
And I follow "Logout"
# Log in as user 2
And I log in as "jen" with password "mahara1"
And I fill in the following:
| New password: | mahara2 |
| Confirm password: | mahara2 |
And I press "Submit"
# Verifying password was changed
And I should see "Your new password has been saved"
# Changing password
And I follow "Settings"
And I fill in the following:
| Current password | mahara2 |
| New password | mahara3 |
| Confirm password | mahara3 |
And I press "Save"
And I wait until the page is ready
# Verifying password was changed
And I should see "Preferences saved"
Supports Markdown
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