MDL-74211 behat: replace steps to use new categories page type
This commit is contained in:
@@ -99,8 +99,7 @@ Feature: Edit quiz page - adding things
|
||||
in various categories and add them to the question bank.
|
||||
|
||||
# Create a couple of sub categories.
|
||||
When I am on the "Course 1" "core_question > course question bank" page
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
Then I should see "Add category"
|
||||
And I follow "Add category"
|
||||
Then I set the field "Parent category" to "Default for C1"
|
||||
|
||||
@@ -22,8 +22,7 @@ Feature: A teacher can move question categories in the question bank
|
||||
|
||||
Scenario: A question category can be moved to another context
|
||||
When I follow "Test quiz"
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I am on the "Course 1" "core_question > course question categories" page
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Name | Test category |
|
||||
@@ -34,8 +33,7 @@ Feature: A teacher can move question categories in the question bank
|
||||
|
||||
Scenario: A question category can be moved to top level
|
||||
When I follow "Test quiz"
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I am on the "Course 1" "core_question > course question categories" page
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Name | Test category |
|
||||
|
||||
@@ -27,8 +27,7 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
And I am on "Course 1" course homepage
|
||||
|
||||
Scenario: A new question category can be created
|
||||
When I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Name | New Category 1 |
|
||||
@@ -45,8 +44,7 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
And "New Category 1 [newcatidnumber]" "option" should exist in the "Parent category" "select"
|
||||
|
||||
Scenario: A question category can be edited
|
||||
When I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
And I click on "Edit this category" "link" in the "Subcategory" "list_item"
|
||||
And the field "parent" matches value " Default for C1"
|
||||
And I set the following fields to these values:
|
||||
@@ -57,14 +55,12 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
And I should see "I was edited" in the "New name" "list_item"
|
||||
|
||||
Scenario: An empty question category can be deleted
|
||||
When I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
And I click on "Delete" "link" in the "Subcategory" "list_item"
|
||||
Then I should not see "Subcategory"
|
||||
|
||||
Scenario: An non-empty question category can be deleted if you move the contents elsewhere
|
||||
When I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
And I click on "Delete" "link" in the "Used category" "list_item"
|
||||
And I should see "The category 'Used category' contains 1 questions"
|
||||
And I press "Save in category"
|
||||
@@ -74,13 +70,12 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
|
||||
@_file_upload
|
||||
Scenario: Multi answer questions with their child questions can be moved to another category when the current category is deleted
|
||||
When I navigate to "Question bank" in current page administration
|
||||
And I select "Import" from the "Question bank tertiary navigation" singleselect
|
||||
When I am on the "Course 1" "core_question > course question categories" page
|
||||
And I set the field "id_format_xml" to "1"
|
||||
And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager
|
||||
And I press "id_submitbutton"
|
||||
And I press "Continue"
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I am on the "Course 1" "core_question > course question categories" page
|
||||
And I click on "Delete" "link" in the "Default for Test images in backup" "list_item"
|
||||
And I should see "The category 'Default for Test images in backup' contains 1 questions"
|
||||
And I select "Used category" from the "Category" singleselect
|
||||
|
||||
@@ -23,8 +23,7 @@ Feature: A teacher can put questions with idnumbers in categories with idnumbers
|
||||
| contextlevel | reference | questioncategory | name | idnumber |
|
||||
| Course | C1 | Top | top | |
|
||||
| Course | C1 | top | Used category | c1used |
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I am on the "Course 1" "core_question > course question categories" page
|
||||
And I follow "Add category"
|
||||
And I set the following fields to these values:
|
||||
| Name | Sub used category |
|
||||
@@ -48,8 +47,7 @@ Feature: A teacher can put questions with idnumbers in categories with idnumbers
|
||||
| contextlevel | reference | questioncategory | name | idnumber |
|
||||
| Course | C1 | Top | top | |
|
||||
| Course | C1 | top | Used category | c1used |
|
||||
And I navigate to "Question bank" in current page administration
|
||||
And I select "Categories" from the "Question bank tertiary navigation" singleselect
|
||||
And I am on the "Course 1" "core_question > course question categories" page
|
||||
And I click on "Edit this category" "link" in the "Used category" "list_item"
|
||||
And I press "Save changes"
|
||||
Then I should not see "This ID number is already in use"
|
||||
|
||||
Reference in New Issue
Block a user