|
| 1 | +@addon_mod_assign @app @mod @mod_assign @javascript @lms_from5.1 |
| 2 | +Feature: Activities overview for assign activity |
| 3 | + |
| 4 | + Background: |
| 5 | + Given the Moodle site is compatible with this feature |
| 6 | + And the following "users" exist: |
| 7 | + | username | firstname | lastname | |
| 8 | + | student1 | Username | 1 | |
| 9 | + | student2 | Username | 2 | |
| 10 | + | student3 | Username | 3 | |
| 11 | + | student4 | Username | 4 | |
| 12 | + | student5 | Username | 5 | |
| 13 | + | student6 | Username | 6 | |
| 14 | + | student7 | Username | 7 | |
| 15 | + | student8 | Username | 8 | |
| 16 | + | teacher1 | Teacher | T | |
| 17 | + And the following "courses" exist: |
| 18 | + | fullname | shortname | groupmode | |
| 19 | + | Course 1 | C1 | 1 | |
| 20 | + And the following "course enrolments" exist: |
| 21 | + | user | course | role | |
| 22 | + | student1 | C1 | student | |
| 23 | + | student2 | C1 | student | |
| 24 | + | student3 | C1 | student | |
| 25 | + | student4 | C1 | student | |
| 26 | + | student5 | C1 | student | |
| 27 | + | student6 | C1 | student | |
| 28 | + | student7 | C1 | student | |
| 29 | + | student8 | C1 | student | |
| 30 | + | teacher1 | C1 | editingteacher | |
| 31 | + And the following "activities" exist: |
| 32 | + | activity | name | course | idnumber | duedate | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | submissiondrafts | |
| 33 | + | assign | Date assign | C1 | assign1 | ##1 Jan 2040 08:00## | 1 | 0 | 0 | |
| 34 | + | assign | No submissions | C1 | assign2 | ##tomorrow noon## | 1 | 0 | 0 | |
| 35 | + | assign | Pending grades | C1 | assign3 | | 1 | 0 | 0 | |
| 36 | + And the following "mod_assign > submissions" exist: |
| 37 | + | assign | user | onlinetext | |
| 38 | + | Date assign | student1 | This is a submission for assignment | |
| 39 | + | Pending grades | student1 | This is a submission for assignment | |
| 40 | + | Pending grades | student2 | This is a submission for assignment | |
| 41 | + And the following "grade grades" exist: |
| 42 | + | gradeitem | user | grade | |
| 43 | + | Pending grades | student1 | 50 | |
| 44 | + |
| 45 | + Scenario: Teachers can see relevant columns in the assign overview |
| 46 | + Given I entered the course "Course 1" as "teacher1" in the app |
| 47 | + When I press "Activities" in the app |
| 48 | + And I press "Assignments" in the app |
| 49 | + And I press "Date assign" "ion-item" in the app |
| 50 | + Then I should find "1 January 2040" within "Due date" "ion-item" in the app |
| 51 | + And I should find "1 of 8" within "Submissions" "ion-item" in the app |
| 52 | + |
| 53 | + When I press "Grade" within "Actions" "ion-item" in the app |
| 54 | + Then the header should be "Date assign" in the app |
| 55 | + |
| 56 | + When I go back in the app |
| 57 | + And I press "No submissions" "ion-item" in the app |
| 58 | + Then I should find "Tomorrow" within "Due date" "ion-item" in the app |
| 59 | + And I should find "0 of 8" within "Submissions" "ion-item" in the app |
| 60 | + And I should be able to press "View" within "Actions" "ion-item" in the app |
| 61 | + |
| 62 | + When I press "Pending grades" "ion-item" in the app |
| 63 | + Then I should find "-" within "Due date" "ion-item" in the app |
| 64 | + And I should find "2 of 8" within "Submissions" "ion-item" in the app |
| 65 | + And I should be able to press "Grade" within "Actions" "ion-item" in the app |
| 66 | + |
| 67 | + Scenario: The assign overview actions has information about the number of pending elements to grade |
| 68 | + Given I entered the course "Course 1" as "teacher1" in the app |
| 69 | + When I press "Activities" in the app |
| 70 | + And I press "Assignments" in the app |
| 71 | + And I press "Date assign" "ion-item" in the app |
| 72 | + Then I should find "Grade" within "Actions" "ion-item" in the app |
| 73 | + And I should find "1" within "Grade" "ion-button" in the app |
| 74 | + |
| 75 | + When I press "Pending grades" "ion-item" in the app |
| 76 | + Then I should find "Grade" within "Actions" "ion-item" in the app |
| 77 | + And I should find "2" within "Grade" "ion-button" in the app |
| 78 | + |
| 79 | + # Validate alert badge updates. |
| 80 | + When the following "grade grades" exist: |
| 81 | + | gradeitem | user | grade | |
| 82 | + | Date assign | student1 | 50 | |
| 83 | + | Pending grades | student1 | 50 | |
| 84 | + And I pull to refresh in the app |
| 85 | + And I press "Assignments" in the app |
| 86 | + And I press "Date assign" "ion-item" in the app |
| 87 | + Then I should find "View" within "Actions" "ion-item" in the app |
| 88 | + And I should not find "Grade" within "Actions" "ion-item" in the app |
| 89 | + And I should not find "1" within "Actions" "ion-item" in the app |
| 90 | + |
| 91 | + When I press "Pending grades" "ion-item" in the app |
| 92 | + Then I should find "Grade" within "Actions" "ion-item" in the app |
| 93 | + And I should find "1" within "Grade" "ion-button" in the app |
| 94 | + |
| 95 | + Scenario: The assign overview actions has different label action based on assignment configuration |
| 96 | + Given the following "activity" exists: |
| 97 | + | course | C1 | |
| 98 | + | activity | assign | |
| 99 | + | name | Feedback only | |
| 100 | + | idnumber | assign4 | |
| 101 | + | submissiondrafts | 0 | |
| 102 | + | assignsubmission_onlinetext_enabled | 1 | |
| 103 | + | assignfeedback_comments_enabled | 1 | |
| 104 | + | assignfeedback_editpdf_enabled | 1 | |
| 105 | + And the following "activity" exists: |
| 106 | + | course | C1 | |
| 107 | + | activity | assign | |
| 108 | + | name | Neither grading nor feedback | |
| 109 | + | idnumber | assign5 | |
| 110 | + | submissiondrafts | 0 | |
| 111 | + | assignsubmission_onlinetext_enabled | 1 | |
| 112 | + | assignfeedback_comments_enabled | 0 | |
| 113 | + | assignfeedback_editpdf_enabled | 0 | |
| 114 | + And the following "mod_assign > submissions" exist: |
| 115 | + | assign | user | onlinetext | |
| 116 | + | Feedback only | student1 | Feedback only assignment | |
| 117 | + | Neither grading nor feedback | student1 | Neither grading nor feedback submission | |
| 118 | + And I am on the "Feedback only" "assign activity editing" page logged in as "teacher1" |
| 119 | + And I expand all fieldsets |
| 120 | + And I set the field "grade[modgrade_type]" to "None" |
| 121 | + And I press "Save and return to course" |
| 122 | + And I am on the "Neither grading nor feedback" "assign activity editing" page |
| 123 | + And I expand all fieldsets |
| 124 | + And I set the field "grade[modgrade_type]" to "None" |
| 125 | + And I press "Save and return to course" |
| 126 | + And I entered the course "Course 1" as "teacher1" in the app |
| 127 | + |
| 128 | + When I press "Activities" in the app |
| 129 | + And I press "Assignments" in the app |
| 130 | + And I press "Date assign" "ion-item" in the app |
| 131 | + Then I should find "Grade" within "Actions" "ion-item" in the app |
| 132 | + |
| 133 | + When I press "Feedback only" "ion-item" in the app |
| 134 | + Then I should find "View" within "Actions" "ion-item" in the app |
| 135 | + And I should find "1 of 8" within "Submissions" "ion-item" in the app |
| 136 | + |
| 137 | + When I press "Neither grading nor feedback" "ion-item" in the app |
| 138 | + Then I should find "View" within "Actions" "ion-item" in the app |
| 139 | + And I should find "1 of 8" within "Submissions" "ion-item" in the app |
| 140 | + |
| 141 | + Scenario: Students can see relevant columns in the assign overview |
| 142 | + Given I entered the course "Course 1" as "student1" in the app |
| 143 | + When I press "Activities" in the app |
| 144 | + And I press "Assignments" in the app |
| 145 | + And I press "Date assign" "ion-item" in the app |
| 146 | + Then I should find "1 January 2040" within "Due date" "ion-item" in the app |
| 147 | + And I should find "Submitted for grading" within "Submission status" "ion-item" in the app |
| 148 | + And I should find "-" within "Grade" "ion-item" in the app |
| 149 | + |
| 150 | + When I press "No submissions" "ion-item" in the app |
| 151 | + Then I should find "Tomorrow" within "Due date" "ion-item" in the app |
| 152 | + And I should find "No submission" within "Submission status" "ion-item" in the app |
| 153 | + And I should find "-" within "Grade" "ion-item" in the app |
| 154 | + |
| 155 | + When I press "Pending grades" "ion-item" in the app |
| 156 | + Then I should find "-" within "Due date" "ion-item" in the app |
| 157 | + And I should find "Submitted for grading" within "Submission status" "ion-item" in the app |
| 158 | + And I should find "50.00" within "Grade" "ion-item" in the app |
0 commit comments