MDL-64377 assign: Behat test fix
[moodle.git] / mod / assign / tests / behat / edit_student_submission.feature
CommitLineData
867b4131
CB
1@mod @mod_assign @javascript
2Feature: In an assignment, the administrator can edit students' submissions
3 In order to edit a student's submissions
4 As an administrator
5 I need to grade multiple students on one page
6
7 Scenario: Editing a student's submission
8 Given the following "courses" exist:
9 | fullname | shortname | category | groupmode |
10 | Course 1 | C1 | 0 | 1 |
11 And the following "users" exist:
12 | username | firstname | lastname | email |
13 | student1 | Student | 1 | student1@example.com |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | student1 | C1 | student |
17 When I log in as "admin"
fdeeaff9 18 And I am on "Course 1" course homepage with editing mode on
867b4131
CB
19 And I add a "Assignment" to section "1" and I fill the form with:
20 | Assignment name | Test assignment name |
21 | Description | Submit your online text |
22 | assignsubmission_onlinetext_enabled | 1 |
23 | groupmode | No groups |
24 And I log out
25 And I log in as "student1"
fdeeaff9 26 And I am on "Course 1" course homepage
867b4131
CB
27 And I follow "Test assignment name"
28 And I press "Add submission"
29 And I set the following fields to these values:
30 | Online text | I'm the student1 submission |
31 And I press "Save changes"
32 And I log out
33 And I log in as "admin"
fdeeaff9 34 And I am on "Course 1" course homepage
867b4131 35 And I follow "Test assignment name"
e5287f9b 36 And I navigate to "View all submissions" in current page administration
cfd390ee 37 And I open the action menu in "Student 1" "table_row"
ba5c5083 38 And I choose "Edit submission" in the open action menu
867b4131
CB
39 And I set the following fields to these values:
40 | Online text | Have you seen the movie Chef? |
41 And I press "Save changes"
867b4131 42 Then I should see "Have you seen the movie Chef?"
cfd390ee 43 And I open the action menu in "Student 1" "table_row"
ba5c5083 44 And I choose "Edit submission" in the open action menu
867b4131 45 And I set the following fields to these values:
4638a26e 46 | Online text | I have seen the movie chef. |
867b4131 47 And I press "Save changes"
867b4131 48 Then I should see "I have seen the movie chef."