MDL-70153 qtype_essay: Add behat test for attachments max size
[moodle.git] / question / type / ddimageortext / tests / behat / add.feature
CommitLineData
096b0405 1@qtype @qtype_ddimageortext
42865c84
TH
2Feature: Test creating a drag and drop onto image question
3 As a teacher
4 In order to test my students
5 I need to be able to create drag and drop onto image questions
6
7 Background:
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 |
13 | Course 1 | C1 | 0 |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher1 | C1 | editingteacher |
17 And I log in as "teacher1"
fdeeaff9 18 And I am on "Course 1" course homepage
02fda279 19 And I navigate to "Question bank" in current page administration
42865c84 20
38831914 21 @javascript @_file_upload
42865c84
TH
22 Scenario: Create a drag and drop onto image question
23 When I press "Create a new question ..."
24 And I set the field "Drag and drop onto image" to "1"
6905c1c3 25 And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
42865c84
TH
26 And I set the field "Question name" to "Drag and drop onto image 001"
27 And I set the field "Question text" to "Identify the features in this cross-section."
28 And I set the field "General feedback" to "The locations are now labelled on the diagram below."
29 And I upload "question/type/ddimageortext/tests/fixtures/oceanfloorbase.jpg" file to "Background image" filemanager
30
31 # Draggable items
32 And I follow "Draggable items"
33 And I press "Blanks for 3 more draggable items"
34
35 And I set the field "id_drags_0_dragitemtype" to "Draggable text"
36 And I set the field "id_draglabel_0" to "island<br/>arc"
37
38 And I set the field "id_drags_1_dragitemtype" to "Draggable text"
39 And I set the field "id_draglabel_1" to "mid-ocean<br/>ridge"
40
41 And I set the field "id_drags_2_dragitemtype" to "Draggable text"
42 And I set the field "id_draglabel_2" to "abyssal<br/>plain"
43
44 And I set the field "id_drags_3_dragitemtype" to "Draggable text"
45 And I set the field "id_draglabel_3" to "continental<br/>rise"
46
47 And I set the field "id_drags_4_dragitemtype" to "Draggable text"
48 And I set the field "id_draglabel_4" to "ocean<br/>trench"
49
50 And I set the field "id_drags_5_dragitemtype" to "Draggable text"
51 And I set the field "id_draglabel_5" to "continental<br/>slope"
52
53 And I set the field "id_drags_6_dragitemtype" to "Draggable text"
54 And I set the field "id_draglabel_6" to "mountain<br/>belt"
55
56 And I set the field "id_drags_7_dragitemtype" to "Draggable text"
57 And I set the field "id_draglabel_7" to "continental<br/>shelf"
58
59 # Drop zones
60 And I follow "Drop zones"
61 And I press "Blanks for 3 more drop zones"
62
63 And I set the field "id_drops_0_xleft" to "53"
64 And I set the field "id_drops_0_ytop" to "17"
65 And I set the field "id_drops_0_choice" to "7"
66
67 And I set the field "id_drops_1_xleft" to "172"
68 And I set the field "id_drops_1_ytop" to "2"
69 And I set the field "id_drops_1_choice" to "8"
70
71 And I set the field "id_drops_2_xleft" to "363"
72 And I set the field "id_drops_2_ytop" to "31"
73 And I set the field "id_drops_2_choice" to "5"
74
75 And I set the field "id_drops_3_xleft" to "440"
76 And I set the field "id_drops_3_ytop" to "13"
77 And I set the field "id_drops_3_choice" to "3"
78
79 And I set the field "id_drops_4_xleft" to "115"
80 And I set the field "id_drops_4_ytop" to "74"
81 And I set the field "id_drops_4_choice" to "6"
82
83 And I set the field "id_drops_5_xleft" to "210"
84 And I set the field "id_drops_5_ytop" to "94"
85 And I set the field "id_drops_5_choice" to "4"
86
87 And I set the field "id_drops_6_xleft" to "310"
88 And I set the field "id_drops_6_ytop" to "87"
89 And I set the field "id_drops_6_choice" to "1"
90
91 And I set the field "id_drops_7_xleft" to "479"
92 And I set the field "id_drops_7_ytop" to "84"
93 And I set the field "id_drops_7_choice" to "2"
94
95 And I press "id_submitbutton"
96 Then I should see "Drag and drop onto image 001"