MDL-57137 quiz: Create question category with specified parent category

Fix question category generator bug. Now it is possible to specify parent category of subcategory, supply only name of parent category
This commit is contained in:
Alexander Melihov
2016-12-06 15:34:13 +08:00
committed by Andrew Nicols
parent cede73411f
commit 1fac7b914b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ class behat_data_generators extends behat_base {
'question categories' => array(
'datagenerator' => 'question_category',
'required' => array('name', 'contextlevel', 'reference'),
'switchids' => array('questioncategory' => 'category')
'switchids' => array('questioncategory' => 'parent')
),
'questions' => array(
'datagenerator' => 'question',
@@ -40,6 +40,7 @@ Feature: A teacher can put questions in categories in the question bank
Scenario: A question category can be edited
When I navigate to "Categories" node in "Course administration > Question bank"
And I click on "Edit" "link" in the "Subcategory" "list_item"
And the field "parent" matches value "   Default for C1"
And I set the following fields to these values:
| Name | New name |
| Category info | I was edited |