1 @ou @ou_vle @qtype @qtype_ddimageortext
2 Feature: Preview a drag-drop onto image question
4 In order to check my drag-drop onto image questions will work for students
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher1 | T1 | Teacher1 | teacher1@moodle.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 | ddimageortext | Drag onto image | xsection |
23 Given I log in as "teacher1"
24 And I follow "Course 1"
25 And I navigate to "Question bank" node in "Course administration"
28 Scenario: Preview a question using the mouse.
29 When I click on "Preview" "link" in the "Drag onto image" "table_row"
30 And I switch to "questionpreview" window
31 # Odd, but the <br>s go to nothing, not a space.
32 And I drag "mountainbelt" to place "1" in the drag and drop onto image question
33 And I drag "continentalshelf" to place "2" in the drag and drop onto image question
34 And I drag "oceantrench" to place "3" in the drag and drop onto image question
35 And I drag "abyssalplain" to place "4" in the drag and drop onto image question
36 And I drag "continentalslope" to place "5" in the drag and drop onto image question
37 And I drag "continentalrise" to place "6" in the drag and drop onto image question
38 And I drag "islandarc" to place "7" in the drag and drop onto image question
39 And I drag "mid-oceanridge" to place "8" in the drag and drop onto image question
40 And I press "Submit and finish"
41 Then the state of "Identify the features" question is shown as "Correct"
42 And I should see "Mark 1.00 out of 1.00"
45 Scenario: Preview a question using the keyboard.
46 When I click on "Preview" "link" in the "Drag onto image" "table_row"
47 And I switch to "questionpreview" window
48 And I type " " on place "1" in the drag and drop onto image question
49 And I type " " on place "2" in the drag and drop onto image question
50 And I type " " on place "3" in the drag and drop onto image question
51 And I type " " on place "4" in the drag and drop onto image question
52 And I type " " on place "5" in the drag and drop onto image question
53 And I type " " on place "6" in the drag and drop onto image question
54 And I type " " on place "7" in the drag and drop onto image question
55 And I type " " on place "8" in the drag and drop onto image question
56 And I press "Submit and finish"
57 Then the state of "Identify the features" question is shown as "Correct"
58 And I should see "Mark 1.00 out of 1.00"