MDL-47494 ddimageortext: Adding a behat feature to ddimageotext qtype, #12175
[moodle.git] / question / type / ddimageortext / tests / behat / import_test.feature
CommitLineData
3b504829
K
1@ou @ou_vle @qtype @qtype_ddimageortext
2Feature: Test all the basic functionality of this question type
3 As a manager/teacher i should be able to import questions from other courses to this course
4
5 Background:
6 Given the following "users" exist:
7 | username | firstname | lastname | email |
8 | teacher1 | T1 | Teacher1 | teacher1@moodle.com |
9 | manager1 | M1 | Manager1 | manager11@moodle.com |
10 And the following "courses" exist:
11 | fullname | shortname | category |
12 | Course 1 | C1 | 0 |
13 And the following "course enrolments" exist:
14 | user | course | role |
15 | teacher1 | C1 | editingteacher |
16 | manager1 | C1 | manager |
17 And I log in as "teacher1"
18 And I follow "Course 1"
19
20 @javascript
21 Scenario: import a variable numeric sets question.
22 When I navigate to "Import" node in "Course administration > Question bank"
23 And I set the field "id_format_xml" to "1"
24 And I upload "question/type/ddimageortext/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager
25 And I press "id_submitbutton"
26 Then I should see "Parsing questions from import file."
27 And I should see "Importing 1 questions from file"
28 And I should see "Identify the features in this cross-section by dragging the labels into the boxes."
29 And I press "Continue"
30 And I should see "Imported Drag and drop onto image 001"