1 |
efrain |
1 |
@core @core_grades @gradereport_user @javascript
|
|
|
2 |
Feature: User can toggle the visibility of the grade categories within the user grade report.
|
|
|
3 |
In order to focus only on the information that I am interested in
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to easily toggle the visibility of grade categories in the user grade report
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category |
|
|
|
10 |
| Course | C1 | 0 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email | idnumber |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com | s1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "grade categories" exist:
|
|
|
20 |
| fullname | course |
|
|
|
21 |
| Category 1 | C1 |
|
|
|
22 |
And the following "activities" exist:
|
|
|
23 |
| activity | course | idnumber | name | intro | grade |
|
|
|
24 |
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
|
|
|
25 |
And the following "activities" exist:
|
|
|
26 |
| activity | course | idnumber | name | gradecategory | grade | gradepass |
|
|
|
27 |
| assign | C1 | a2 | Test assignment two | Category 1 | 100 | 50 |
|
|
|
28 |
|
|
|
29 |
Scenario: A teacher can search for and find a user to view
|
|
|
30 |
Given I am on the "Course" "grades > User report > View" page logged in as "teacher1"
|
|
|
31 |
And I click on "Student 1" in the "user" search widget
|
|
|
32 |
And I should see "Test assignment one" in the "user-grade" "table"
|
|
|
33 |
And I should see "Test assignment two" in the "user-grade" "table"
|
|
|
34 |
And I should see "Category 1 total" in the "user-grade" "table"
|
|
|
35 |
And I should see "Course total" in the "user-grade" "table"
|
|
|
36 |
# Hide the grade category 'Category 1'.
|
|
|
37 |
When I click on ".toggle-category" "css_element" in the "Category 1" "table_row"
|
|
|
38 |
Then I should not see "Test assignment two" in the "user-grade" "table"
|
|
|
39 |
And I should not see "Category 1 total" in the "user-grade" "table"
|
|
|
40 |
And I should see "Test assignment one" in the "user-grade" "table"
|
|
|
41 |
And I should see "Course total" in the "user-grade" "table"
|
|
|
42 |
# Show the grade category 'Category 1'.
|
|
|
43 |
And I click on ".toggle-category" "css_element" in the "Category 1" "table_row"
|
|
|
44 |
And I should see "Test assignment two" in the "user-grade" "table"
|
|
|
45 |
And I should see "Category 1 total" in the "user-grade" "table"
|
|
|
46 |
And I should see "Test assignment one" in the "user-grade" "table"
|
|
|
47 |
And I should see "Course total" in the "user-grade" "table"
|
|
|
48 |
# Hide the grade category 'Course'.
|
|
|
49 |
And I click on ".toggle-category" "css_element" in the "Course" "table_row"
|
|
|
50 |
And I should not see "Test assignment two" in the "user-grade" "table"
|
|
|
51 |
And I should not see "Category 1 total" in the "user-grade" "table"
|
|
|
52 |
And I should not see "Test assignment one" in the "user-grade" "table"
|
|
|
53 |
And I should not see "Course total" in the "user-grade" "table"
|