2 Feature: Test editing an Essay question
4 In order to be able to update my Essay question
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher1 | T1 | Teacher1 | teacher1@example.com |
11 And the following "courses" exist:
12 | fullname | shortname | category |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher1 | C1 | editingteacher |
17 And the following "question categories" exist:
18 | contextlevel | reference | name |
19 | Course | C1 | Test questions |
20 And the following "questions" exist:
21 | questioncategory | qtype | name | template |
22 | Test questions | essay | essay-001 | editor |
23 | Test questions | essay | essay-002 | editorfilepicker |
24 | Test questions | essay | essay-003 | plain |
25 And I log in as "teacher1"
26 And I follow "Course 1"
27 And I navigate to "Question bank" node in "Course administration"
30 Scenario: Edit an Essay question
31 When I click on "Edit" "link" in the "essay-001" "table_row"
32 And I set the following fields to these values:
34 And I press "id_submitbutton"
35 Then I should see "You must supply a value here."
36 When I set the following fields to these values:
37 | Question name | Edited essay-001 name |
38 | Response format | No inline text |
39 And I press "id_submitbutton"
40 Then I should see "When \"no inline text\" is selected, or responses are optional, you must allow at least one attachment."
41 When I set the following fields to these values:
42 | Response format | Plain text |
43 And I press "id_submitbutton"
44 Then I should see "Edited essay-001 name"