1441 |
ariadna |
1 |
@mod @mod_assign
|
|
|
2 |
Feature: Testing overview integration in mod_assign
|
|
|
3 |
In order to summarize the assignments
|
|
|
4 |
As a user
|
|
|
5 |
I need to be able to see the assignment overview
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| student1 | Username | 1 |
|
|
|
11 |
| student2 | Username | 2 |
|
|
|
12 |
| student3 | Username | 3 |
|
|
|
13 |
| student4 | Username | 4 |
|
|
|
14 |
| student5 | Username | 5 |
|
|
|
15 |
| student6 | Username | 6 |
|
|
|
16 |
| student7 | Username | 7 |
|
|
|
17 |
| student8 | Username | 8 |
|
|
|
18 |
| teacher1 | Teacher | T |
|
|
|
19 |
And the following "courses" exist:
|
|
|
20 |
| fullname | shortname | groupmode |
|
|
|
21 |
| Course 1 | C1 | 1 |
|
|
|
22 |
And the following "course enrolments" exist:
|
|
|
23 |
| user | course | role |
|
|
|
24 |
| student1 | C1 | student |
|
|
|
25 |
| student2 | C1 | student |
|
|
|
26 |
| student3 | C1 | student |
|
|
|
27 |
| student4 | C1 | student |
|
|
|
28 |
| student5 | C1 | student |
|
|
|
29 |
| student6 | C1 | student |
|
|
|
30 |
| student7 | C1 | student |
|
|
|
31 |
| student8 | C1 | student |
|
|
|
32 |
| teacher1 | C1 | editingteacher |
|
|
|
33 |
And the following "activities" exist:
|
|
|
34 |
| activity | name | course | idnumber | duedate | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | submissiondrafts |
|
|
|
35 |
| assign | Date assign | C1 | assign1 | ##1 Jan 2040 08:00## | 1 | 0 | 0 |
|
|
|
36 |
| assign | No submissions | C1 | assign2 | ##1 Jan 2040 08:00## | 1 | 0 | 0 |
|
|
|
37 |
| assign | Pending grades | C1 | assign3 | | 1 | 0 | 0 |
|
|
|
38 |
And the following "mod_assign > submissions" exist:
|
|
|
39 |
| assign | user | onlinetext |
|
|
|
40 |
| Date assign | student1 | This is a submission for assignment |
|
|
|
41 |
| Pending grades | student1 | This is a submission for assignment |
|
|
|
42 |
| Pending grades | student2 | This is a submission for assignment |
|
|
|
43 |
And the following "grade grades" exist:
|
|
|
44 |
| gradeitem | user | grade |
|
|
|
45 |
| Pending grades | student1 | 50 |
|
|
|
46 |
|
|
|
47 |
@javascript
|
|
|
48 |
Scenario: The assign overview report should generate log events
|
|
|
49 |
Given I am on the "Course 1" "course > activities > assign" page logged in as "teacher1"
|
|
|
50 |
When I am on the "Course 1" "course" page logged in as "teacher1"
|
|
|
51 |
And I navigate to "Reports" in current page administration
|
|
|
52 |
And I click on "Logs" "link"
|
|
|
53 |
And I click on "Get these logs" "button"
|
|
|
54 |
Then I should see "Course activities overview page viewed"
|
|
|
55 |
And I should see "viewed the instance list for the module 'assign'"
|
|
|
56 |
|
|
|
57 |
@javascript
|
|
|
58 |
Scenario: Teachers can see relevant columns in the assign overview
|
|
|
59 |
When I am on the "Course 1" "course > activities > assign" page logged in as "teacher1"
|
|
|
60 |
# Check columns.
|
|
|
61 |
Then I should see "Name" in the "assign_overview_collapsible" "region"
|
|
|
62 |
And I should see "Due date" in the "assign_overview_collapsible" "region"
|
|
|
63 |
And I should see "Submissions" in the "assign_overview_collapsible" "region"
|
|
|
64 |
And I should see "Actions" in the "assign_overview_collapsible" "region"
|
|
|
65 |
# Check Due dates.
|
|
|
66 |
And I should see "1 January 2040" in the "Date assign" "table_row"
|
|
|
67 |
And I should see "1 January 2040" in the "No submissions" "table_row"
|
|
|
68 |
And I should see "-" in the "Pending grades" "table_row"
|
|
|
69 |
# Check Submissions.
|
|
|
70 |
And I should see "1 of 8" in the "Date assign" "table_row"
|
|
|
71 |
And I should see "0 of 8" in the "No submissions" "table_row"
|
|
|
72 |
And I should see "2 of 8" in the "Pending grades" "table_row"
|
|
|
73 |
# Check main actions.
|
|
|
74 |
And I should see "Grade" in the "Date assign" "table_row"
|
|
|
75 |
And I should see "Grade" in the "No submissions" "table_row"
|
|
|
76 |
And I should see "Grade" in the "Pending grades" "table_row"
|
|
|
77 |
And I should see "(2)" in the "Pending grades" "table_row"
|
|
|
78 |
# Check submission link.
|
|
|
79 |
And I click on "2 of 8" "link" in the "Pending grades" "table_row"
|
|
|
80 |
And I should see "50.00" in the "Username 1" "table_row"
|
|
|
81 |
And I should see "-" in the "Username 2" "table_row"
|
|
|
82 |
# Check grade link.
|
|
|
83 |
And I am on the "Course 1" "course > activities > assign" page logged in as "teacher1"
|
|
|
84 |
And I click on "Grade" "link" in the "Date assign" "table_row"
|
|
|
85 |
And I should see "Submitted for grading" in the "Username 1" "table_row"
|
|
|
86 |
And I should see "No submission" in the "Username 2" "table_row"
|
|
|
87 |
|
|
|
88 |
@javascript
|
|
|
89 |
Scenario: The assign overview actions has information about the number of pending elements to grade
|
|
|
90 |
When I am on the "Course 1" "course > activities > assign" page logged in as "teacher1"
|
|
|
91 |
# Check main actions.
|
|
|
92 |
And I should see "Grade" in the "Date assign" "table_row"
|
|
|
93 |
And I should see "(1)" in the "Date assign" "table_row"
|
|
|
94 |
And I should see "Grade" in the "No submissions" "table_row"
|
|
|
95 |
And I should see "Grade" in the "Pending grades" "table_row"
|
|
|
96 |
And I should see "(2)" in the "Pending grades" "table_row"
|
|
|
97 |
# Validate the grade alert count data attribute.
|
|
|
98 |
And "[data-mdl-overview-alertcount='1']" "css_element" should exist in the "Date assign" "table_row"
|
|
|
99 |
And "[data-mdl-overview-alertlabel='Needs grading']" "css_element" should exist in the "Date assign" "table_row"
|
|
|
100 |
And "[data-mdl-overview-alertcount]" "css_element" should not exist in the "No submissions" "table_row"
|
|
|
101 |
And "[data-mdl-overview-alertlabel]" "css_element" should not exist in the "No submissions" "table_row"
|
|
|
102 |
And "[data-mdl-overview-alertcount='2']" "css_element" should exist in the "Pending grades" "table_row"
|
|
|
103 |
And "[data-mdl-overview-alertlabel='Needs grading']" "css_element" should exist in the "Pending grades" "table_row"
|
|
|
104 |
# Validate alert badge updates.
|
|
|
105 |
And the following "grade grades" exist:
|
|
|
106 |
| gradeitem | user | grade |
|
|
|
107 |
| Date assign | student1 | 50 |
|
|
|
108 |
| Pending grades | student1 | 50 |
|
|
|
109 |
And I am on the "Course 1" "course > activities > assign" page logged in as "teacher1"
|
|
|
110 |
And I should see "Grade" in the "Date assign" "table_row"
|
|
|
111 |
And I should not see "(1)" in the "Date assign" "table_row"
|
|
|
112 |
And I should see "Grade" in the "No submissions" "table_row"
|
|
|
113 |
And I should see "Grade" in the "Pending grades" "table_row"
|
|
|
114 |
And I should see "(1)" in the "Pending grades" "table_row"
|
|
|
115 |
# Validate the grade alert count data attribute update.
|
|
|
116 |
And "[data-mdl-overview-alertcount]" "css_element" should not exist in the "Date assign" "table_row"
|
|
|
117 |
And "[data-mdl-overview-alertlabel]" "css_element" should not exist in the "Date assign" "table_row"
|
|
|
118 |
And "[data-mdl-overview-alertcount]" "css_element" should not exist in the "No submissions" "table_row"
|
|
|
119 |
And "[data-mdl-overview-alertlabel]" "css_element" should not exist in the "No submissions" "table_row"
|
|
|
120 |
And "[data-mdl-overview-alertcount='1']" "css_element" should exist in the "Pending grades" "table_row"
|
|
|
121 |
And "[data-mdl-overview-alertlabel='Needs grading']" "css_element" should exist in the "Pending grades" "table_row"
|
|
|
122 |
|
|
|
123 |
@javascript
|
|
|
124 |
Scenario: Students can see relevant columns in the assign overview
|
|
|
125 |
When I am on the "Course 1" "course > activities > assign" page logged in as "student1"
|
|
|
126 |
# Check columns.
|
|
|
127 |
Then I should see "Name" in the "assign_overview_collapsible" "region"
|
|
|
128 |
And I should see "Due date" in the "assign_overview_collapsible" "region"
|
|
|
129 |
And I should see "Submission status" in the "assign_overview_collapsible" "region"
|
|
|
130 |
And I should see "Grade" in the "assign_overview_collapsible" "region"
|
|
|
131 |
# Check Due dates.
|
|
|
132 |
And I should see "1 January 2040" in the "Date assign" "table_row"
|
|
|
133 |
And I should see "1 January 2040" in the "No submissions" "table_row"
|
|
|
134 |
And I should see "-" in the "Pending grades" "table_row"
|
|
|
135 |
# Check Submission status.
|
|
|
136 |
And I should see "Submitted for grading" in the "Date assign" "table_row"
|
|
|
137 |
And I should see "No submission" in the "No submissions" "table_row"
|
|
|
138 |
And I should see "-" in the "Submitted for grading" "table_row"
|
|
|
139 |
# Check Grade.
|
|
|
140 |
And I should see "-" in the "Date assign" "table_row"
|
|
|
141 |
And I should see "-" in the "No submissions" "table_row"
|
|
|
142 |
And I should see "50.00" in the "Pending grades" "table_row"
|
|
|
143 |
|
|
|
144 |
Scenario: The assign index redirect to the activities overview
|
|
|
145 |
When I log in as "admin"
|
|
|
146 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
147 |
And I add the "Activities" block
|
|
|
148 |
And I click on "Assignments" "link" in the "Activities" "block"
|
|
|
149 |
Then I should see "An overview of all activities in the course"
|
|
|
150 |
And I should see "Name" in the "assign_overview_collapsible" "region"
|
|
|
151 |
And I should see "Due date" in the "assign_overview_collapsible" "region"
|
|
|
152 |
And I should see "Submissions" in the "assign_overview_collapsible" "region"
|
|
|
153 |
And I should see "Actions" in the "assign_overview_collapsible" "region"
|