institution_statistics.feature 4.13 KB
Newer Older
1
@javascript @core @core_administration
2
3
4
Feature: Institution statistics are displayed correctly
In order to view information about an institution
As an admin
5
So I can benefit from seeing the current user detail state of an institution
6

7
Background:
8
9
10
11
12
    Given the following "institutions" exist:
    | name | displayname | registerallowed | registerconfirm |defaultquota|
    | instone | Institution One | ON | ON | 20MB |
    | insttwo | Institution Two | ON | ON | 30MB |
    | instthree | Institution Three | ON | ON | 50MB |
13

14
15
16
17
18
    And the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | UserA | Kupuh1pa! | UserA@example.org | Angela | User | instone | internal | member |
    | UserB | Kupuh1pa! | UserB@example.org | Bob | User | insttwo | internal | member |
    | UserC | Kupuh1pa! | UserC@example.org | Cecilia | User | instthree | internal | member |
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    Given I log in as "UserA" 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 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
45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    Given I log in as "UserC" 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 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"