2 Feature: Test editing a Matching question
4 In order to be able to update my Matching 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 | match | Matching for editing | foursubq |
23 And I log in as "teacher1"
24 And I follow "Course 1"
25 And I navigate to "Question bank" node in "Course administration"
28 Scenario: Edit a Matching question
29 When I click on "Edit" "link" in the "Matching for editing" "table_row"
30 And I set the following fields to these values:
32 And I press "id_submitbutton"
33 Then I should see "You must supply a value here."
34 When I set the following fields to these values:
35 | Question name | Edited Matching name |
36 And I press "id_submitbutton"
37 Then I should see "Edited Matching name"
38 When I click on "Edit" "link" in the "Edited Matching name" "table_row"
39 And I set the following fields to these values:
43 And I press "id_submitbutton"
44 Then I should see "Edited Matching name"
45 When I click on "Preview" "link" in the "Edited Matching name" "table_row"
46 And I switch to "questionpreview" window
47 Then I should see "frog"
48 And I should see "dog"
49 And I should see "newt"
50 And I should see "fly"