Commit 05970a94 authored by Jinelle Foley-Barnes's avatar Jinelle Foley-Barnes Committed by Robert Lyon
Browse files

Behat Testsuite: Tidying up the User features (Bug #1446395)

/test/behat/features/user

I have tidyed up and deleted duplicates of the tests.

Change-Id: I2274505be97c7a29c603c826b83cfb471ebb9bd7
parent 5cdd1f45
@javascript @core @admin @user
Feature: Mahara admins can add users via CSV files
As a site or institution admin
I can add users via CSV files
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 |
| userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | admin |
| userB | Password1 | test02@example.com | Son | Nguyen | instone | internal | admin |
| userC | Password1 | test03@example.com | Jack | Smith | insttwo | internal | admin |
Scenario: As a site admin, add users via CSV file
Given I log in as "userA" with password "Password1"
When I go to "admin/users/uploadcsv.php"
Then I should see "Add users by CSV"
When I attach the file "users.csv" to "uploadcsv_file"
And I uncheck "uploadcsv_forcepasswordchange"
And I uncheck "uploadcsv_emailusers"
And I press "uploadcsv_submit"
Then I should see "Your CSV file was processed successfully."
Then I should see "New users added: 5."
\ No newline at end of file
Feature: Login
@javascript
Scenario: Login
Given I am on homepage
When I fill in "login_username" with "admin"
And I fill in "login_password" with "Password1"
And I press "Login"
Then I should see "Dashboard"
\ No newline at end of file
@javascript @core @admin @user @navigation
Feature: Mahara users can navigate their portfolio
As a mahara user
I can navigate my portfolio
Scenario: Navigate portfolio
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 |
| userA | Password1 | test01@example.com | Pete | Mc | mahara | internal | admin |
| userB | Password1 | test02@example.com | Son | Nguyen | instone | internal | admin |
| userC | Password1 | test03@example.com | Jack | Smith | insttwo | internal | admin |
Given I am on homepage
When I fill in "login_username" with "userA"
And I fill in "login_password" with "Password1"
And I press "Login"
Then I should see "Dashboard"
And I choose "Content"
And I should see "Profile"
And I choose "Collections" in "Portfolio"
And I should see "Collections"
@javascript @core_portfolio
@javascript @core_user @core_portfolio
Feature: Searching by user in Shared Pages
In order to search by name on the shared with me page
As an admin I need to create users
......@@ -10,6 +10,8 @@ Background:
| bob | mahara1 | bob@example.com | Bob | Bobby | mahara | internal | member |
| jen | mahara1 | jen@example.com | Jen | Jenny | mahara | internal | member |
Scenario: Create users and search for them (Bug 897586)
# Log in as the student user
Given I log in as "bob" with password "mahara1"
......
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