AutorÃa | Ultima modificación | Ver Log |
@qtype @qtype_orderingFeature: Test editing an Ordering questionAs a teacherIn order to be able to update my Ordering questionI need to edit themBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | T1 | Teacher1 | teacher1@example.com |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher |And the following "question categories" exist:| contextlevel | reference | name || Course | C1 | Test questions |And the following "questions" exist:| questioncategory | qtype | name | template || Test questions | ordering | Ordering for editing | moodle |@javascriptScenario: Edit an Ordering questionWhen I am on the "Ordering for editing" "core_question > edit" page logged in as teacher1And I set the following fields to these values:| Question name | |And I press "id_submitbutton"Then I should see "You must supply a value here."When I set the following fields to these values:| Question name | Edited Ordering || hintoptions[0] | 1 || hintoptions[1] | 0 || hintshownumcorrect[0] | 0 || hintshownumcorrect[1] | 1 || shownumcorrect | 1 |And I press "id_submitbutton"Then I should see "Edited Ordering"And I choose "Edit question" action for "Edited Ordering" in the question bankAnd the following fields match these values:| id_shownumcorrect | 1 || id_hintshownumcorrect_0 | 0 || id_hintoptions_0 | 1 || id_hintshownumcorrect_1 | 1 || id_hintoptions_1 | 0 |@javascriptScenario: Editing an ordering question and making sure the form does not allow duplication of draggablesWhen I am on the "Ordering for editing" "core_question > edit" page logged in as teacher1And I set the following fields to these values:| Draggable item 4 | Object |And I press "id_submitbutton"Then I should see "Duplication of draggable items is not allowed. The string \"Object\" is already used in Draggable item 2."Given I set the following fields to these values:| Draggable item 4 | Dynamic |And I press "id_submitbutton"Then I should see "Ordering for editing"