Commit 3fb0deed authored by Jinelle Foley-Barnes's avatar Jinelle Foley-Barnes Committed by Robert Lyon

Behat Testsuite: Tidying up account features (Bug #1446395)

I've cleaned up the tests in the test/behat/features/account area

That inc, tags at the top to run the tests and duplicate tests

Change-Id: I8891fb65e33826b26955bc47ef9ff97141fed558
parent 1db65c3f
@javascript @core @account @javascript @core @core_account
Feature: Mahara users can change their account settings Feature: Mahara users can change their account settings
As a mahara user As a mahara user
I need to change my account settings I need to change my account settings
Background: Background:
Given the following "users" exist: Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role | | username | password | email | firstname | lastname | institution | authname | role |
| userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | member | | userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | member |
Scenario: Change password
Given I log in as "userA" with password "Password1"
And I follow "Settings"
And I fill in "oldpassword" with "Password1"
And I fill in "password1" with "Passwordnew"
And I fill in "password2" with "Passwordnew"
And I press "Save"
Then I should see "Preferences saved"
Scenario: Change notifications Scenario: Change notifications
Given I log in as "userA" with password "Password1" Given I log in as "userA" with password "Password1"
......
@javascript @core @core_administration
Feature: Changing password through settings
In order to change the admin password
As an admin I log in and go to settings
So I can set up the admin's new password
Scenario: Changing admin password through settings option (Selenium)
# Log in as admin
Given I log in as "admin" with password "Password1"
# Verifying log in was successful
And I should see "Admin User"
# Navigating to settings
And I follow "Settings"
And I fill in the following:
| Current password | Password1 |
| New password | mahara2 |
| Confirm password | mahara2 |
And I press "Save"
# Verifying the preferences saved
And I should see "Preferences saved"
And I follow "Logout"
# Logging in with the new password
When I log in as "admin" with password "mahara2"
# Verifying that the log in was a success
And I should see "Welcome"
# Navigating to the settings
And I follow "Settings"
And I fill in the following:
| Current password | mahara2 |
| New password | Password1 |
| Confirm password | Password1 |
And I press "Save"
And I follow "Logout"
# Logging in as admin with the new passsword
Then I log in as "admin" with password "Password1"
# Verifying it worked
And I should see "Welcome"
@javascript @core @core_content @javascript @core @core_account @core_content
Feature: Editing a profile page Feature: Editing a profile page
In order to edit a profile page In order to edit a profile page
As an admin I need to go to Content As an admin I need to go to Content
...@@ -68,6 +68,6 @@ Scenario: Editing admin profile page (Bug: 1426983) ...@@ -68,6 +68,6 @@ Scenario: Editing admin profile page (Bug: 1426983)
| Fax number || | Fax number ||
And I press "Save profile" And I press "Save profile"
And I should see "Profile saved successfully" And I should see "Profile saved successfully"
# Verifying changes has been made navigating to dashboard page to checkcd .. # Verifying changes has been made navigating to dashboard page to checked
Then I follow "Dashboard" Then I follow "Dashboard"
And I should see "Admin User" And I should see "Admin User"
@javascript @core @profile
Feature: Mahara users can have their profile
As a mahara user
I can manage my profile
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | member |
| userB | Password1 | test02@example.com | Son | Nguyen | mahara | internal | member |
| userC | Password1 | test03@example.com | Jack | Smith | mahara | internal | member |
| userD | Password1 | test04@example.com | Eden | Wilson | mahara | internal | member |
| userE | Password1 | test05@example.com | Emily | Pham | mahara | internal | member |
And the following "institutions" exist:
| name | displayname | registerallowed | registerconfirm | members | staff | admins |
| instone | Institution One | ON | OFF | userB | | userA |
| insttwo | Institution Two | ON | ON | userB,userC | userD | userA |
And the following "groups" exist:
| name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
| group 01 | userA | This is group 01 | standard | ON | ON | all | ON | ON | userB, userC | userD |
@javascript
Scenario: Edit Profile
Given I log in as "userE" with password "Password1"
When I click on "Content"
Then I should see "Profile"
And the "firstname" field should contain "Emily"
And I set the following fields to these values:
| First name | Tiger |
| Last name | Wood |
| Student ID | 1234 |
| Display name | Golf Legend |
| Introduction | <p>This is my introduction.</p><p>My name is Wood</p> |
And I click on "Contact information"
And I should see "Email address"
And I should see "Official website address"
And I set the following fields to these values:
| Official website address | www.catalyst.net.nz |
| Personal website address | www.stuff.co.nz |
| Blog address | www.blog.com |
| Postal address | 150 Willis Street, Te Aro |
| City/region | Wellington |
| Country | New Zealand |
| Home phone | +64-4-928375 |
| Business phone | +64-4-0298375 |
| Mobile phone | 0272093875482 |
| Fax number | 09237842 |
And I click on "Social media"
And I should see "New social media account"
And I click on "General"
And I should see "Occupation"
When I fill in "occupation" with "Software Engineer"
When I fill in "industry" with "IT"
When I press "Save profile"
Then I should see "Profile saved successfully"
@javascript @core @core_administration @javascript @core @core_account
Feature: Creating users and an institution enrolling users and changing their passwords Feature: Creating users and an institution enrolling users and changing their passwords
In order to change user passwords successfully In order to change user passwords successfully
As an admin create users and create an institution As an admin create users and create an institution
......
@javascript @core @core_messages @core_accessibility
Feature: Visible required fields astrix in Messaging
In order to see astrix for required fields when sending a message
As an admin
So I can know I am required to fill those fields in so I can send the message
Scenario: Sending a message in order to see astrix for required fields
Given I log in as "admin" with password "Password1"
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | member |
And I follow "Administration"
And I follow "Users"
And I follow "Pete"
And I follow "Send message"
And I should see "Recipients *"
And I should see "Subject *"
And I should see "Message *"
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