MDL-79863 qtype_ordering: Ordering qtype: write some Behat tests
[moodle.git] / question / type / ordering / tests / behat / import.feature
blob15fcb594bcfee892bc8d462237ca03958010420e
1 @qtype @qtype_ordering
2 Feature: Test importing Ordering questions
3   As a teacher
4   In order to reuse Ordering questions
5   I need to import them
7   Background:
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 |
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"
18     And I am on "Course 1" course homepage
20   @javascript @_file_upload
21   Scenario: import Matching question.
22     When I navigate to "Question bank > Import" in current page administration
23     And I set the field "id_format_xml" to "1"
24     And I upload "question/type/ordering/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager
25     And I press "id_submitbutton"
26     And I press "Continue"
27     Then I should see "dd-ordering 1"