MDL-53601 mod_assign: Feedback files are sent to all group members.
[moodle.git] / mod / assign / feedback / editpdf / tests / behat / group_annotations.feature
CommitLineData
9b65a080
AN
1@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
2Feature: In a group assignment, teacher can annotate PDF files for all users
3 In order to provide visual report on a graded PDF for all users
4 As a teacher
5 I need to use the PDF editor for a group assignment
6
7 @javascript
8 Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
9 Given ghostscript is installed
10 And the following "courses" exist:
11 | fullname | shortname | category | groupmode |
12 | Course 1 | C1 | 0 | 1 |
13 And the following "users" exist:
14 | username | firstname | lastname | email |
15 | teacher1 | Teacher | 1 | teacher1@example.com |
16 | student1 | Student | 1 | student1@example.com |
17 | student2 | Student | 2 | student2@example.com |
18 And the following "course enrolments" exist:
19 | user | course | role |
20 | teacher1 | C1 | editingteacher |
21 | student1 | C1 | student |
22 | student2 | C1 | student |
23 And the following "groups" exist:
24 | name | course | idnumber |
25 | G1 | C1 | G1 |
26 And the following "group members" exist:
27 | user | group |
28 | student1 | G1 |
29 | student2 | G1 |
30 And I log in as "teacher1"
31 And I follow "Course 1"
32 And I turn editing mode on
33 And I add a "Assignment" to section "1" and I fill the form with:
34 | Assignment name | Test assignment name |
35 | Description | Submit your PDF file |
36 | assignsubmission_file_enabled | 1 |
37 | Maximum number of uploaded files | 1 |
38 | Students submit in groups | Yes |
39 And I log out
40 And I log in as "student1"
41 And I follow "Course 1"
42 And I follow "Test assignment name"
43 And I press "Add submission"
44 And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager
45 And I press "Save changes"
46 And I should see "Submitted for grading"
47 And I should see "submission.pdf"
48 And I should see "Not graded"
49 And I log out
50 And I log in as "teacher1"
51 And I follow "Course 1"
52 And I follow "Test assignment name"
bb690849 53 And I follow "View all submissions"
9b65a080 54 And I click on "Grade" "link" in the "Submitted for grading" "table_row"
9b65a080
AN
55 And I click on ".navigate-next-button" "css_element"
56 And I click on ".stampbutton" "css_element"
bb690849 57 And I draw on the pdf
bf382261 58 And I wait until the page is ready
9b65a080 59 And I press "Save changes"
bb690849
DW
60 And I should see "The changes to the grade and feedback were saved"
61 And I press "Ok"
62 And I click on "Edit settings" "link"
9b65a080
AN
63 And I log out
64 And I log in as "student1"
65 And I follow "Course 1"
66 And I follow "Test assignment name"
67 When I follow "View annotated PDF..."
68 Then I should see "Annotate PDF"
f84a0d49 69 And I wait until the page is ready
9b65a080
AN
70 And I click on "Close" "button"
71 And I log out
72 And I log in as "student2"
73 And I follow "Course 1"
74 And I follow "Test assignment name"
b97356f2 75 And I should not see "View annotated PDF..."