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

Merge "Behat Bug 1829431 Allow quota details in 'User details' report"

parents 4c30fab0 a5a8424f
...@@ -5,33 +5,87 @@ As an admin ...@@ -5,33 +5,87 @@ As an admin
So I can benefit from seeing the current user detail state of an institution So I can benefit from seeing the current user detail state of an institution
Background: Background:
Given the following "institutions" exist: Given the following "institutions" exist:
| name | displayname | registerallowed | registerconfirm | | name | displayname | registerallowed | registerconfirm |defaultquota|
| instone | Institution One | ON | ON | | instone | Institution One | ON | ON | 20MB |
| insttwo | Institution Two | ON | ON | 30MB |
| instthree | Institution Three | ON | ON | 50MB |
And the following "users" exist: And the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role | | username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | instone | internal | member | | UserA | Kupuh1pa! | UserA@example.org | Angela | User | instone | internal | member |
| UserB | Kupuh1pa! | UserB@example.org | Bob | User | instone | internal | member | | UserB | Kupuh1pa! | UserB@example.org | Bob | User | insttwo | internal | member |
| UserC | Kupuh1pa! | UserC@example.org | Cecilia | User | instone | internal | member | | UserC | Kupuh1pa! | UserC@example.org | Cecilia | User | instthree | internal | member |
Scenario: Viewing user details statistics Given I log in as "UserA" with password "Kupuh1pa!"
Given I log in as "UserA" with password "Kupuh1pa!" And I choose "Files" in "Create" from main menu
And I choose "Files" in "Create" from main menu And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File" And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File" And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File" And I attach the file "Image1.jpg" to "File"
And I log out And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I log out
Given I log in as "UserB" with password "Kupuh1pa!"
And I choose "Files" in "Create" from main menu
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I log out
Given I log in as "admin" with password "Kupuh1pa!" Given I log in as "UserC" with password "Kupuh1pa!"
# Users without an institution And I choose "Files" in "Create" from main menu
When I choose "Reports" from administration menu And I attach the file "Image1.jpg" to "File"
And I press "Configure report" And I attach the file "Image1.jpg" to "File"
And I set the select2 value "Institution One" for "reportconfigform_institution" And I attach the file "Image1.jpg" to "File"
And I set the select2 value "User details" for "reportconfigform_typesubtype" And I attach the file "Image1.jpg" to "File"
And I fill in "To:" with "+1 day" date in the format "Y/m/d" And I attach the file "Image1.jpg" to "File"
And I expand the section "Columns" And I attach the file "Image1.jpg" to "File"
And I check "Quota used" And I attach the file "Image1.jpg" to "File"
And I press "Submit" And I attach the file "Image1.jpg" to "File"
Then I should see "User details | Institution One" And I attach the file "Image1.jpg" to "File"
And I should see "8%" in the "Angela" row And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I attach the file "Image1.jpg" to "File"
And I log out
Scenario: Viewing user details statistics
Given I log in as "admin" with password "Kupuh1pa!"
# Users without an institution
When I choose "Reports" from administration menu
And I press "Configure report"
And I set the select2 value "All institutions" for "reportconfigform_institution"
And I wait "1" seconds
And I set the select2 value "User details" for "reportconfigform_typesubtype"
And I fill in "To:" with "tomorrow" date in the format "Y/m/d"
And I expand the section "Columns"
And I check "Quota used"
And I press "Submit"
Then I should see "User details | All institutions"
And I should see "42%" in the "Angela" row
And I should see "57%" in the "Bob" row
And I should see "68%" in the "Cecilia" row
When I click on "Quota used"
Then I should see "68%" in the "tr.r0" "css_element"
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