MDL-55071 mod_quiz: Fix behat selector for question chooser
The chooser template now re-uses a core one which caused the IDs of the fields to be changed. The behat tests have been changed to target the new IDs. Note: using the label values did not work because more than one matched due to loose checking.
This commit is contained in:
@@ -27,7 +27,7 @@ Feature: Edit quiz page - adding things
|
||||
Scenario: Add some new question to the quiz using '+ a new question' options of the 'Add' menu.
|
||||
And I open the "last" add to quiz menu
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 01 new"
|
||||
@@ -38,7 +38,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
And I open the "Page 1" add to quiz menu
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 02 new"
|
||||
@@ -50,7 +50,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
And I open the "Page 1" add to quiz menu
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 03 new"
|
||||
@@ -63,7 +63,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
And I open the "Page 1" add to quiz menu
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 04 new"
|
||||
@@ -89,7 +89,7 @@ Feature: Edit quiz page - adding things
|
||||
# Add a question to page 2.
|
||||
When I open the "Page 2" add to quiz menu
|
||||
And I choose "a new question" in the open action menu
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
When I set the field "Question name" to "Essay for page 2"
|
||||
@@ -129,7 +129,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
# Create the Essay 01 question.
|
||||
When I press "Create a new question ..."
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "Add"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 01"
|
||||
@@ -142,7 +142,7 @@ Feature: Edit quiz page - adding things
|
||||
And I should see "Select a category"
|
||||
And I set the field "Select a category:" to "Subcat 1"
|
||||
When I press "Create a new question ..."
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "Add"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 02"
|
||||
@@ -155,7 +155,7 @@ Feature: Edit quiz page - adding things
|
||||
And I set the field "Select a category" to "Default for C1"
|
||||
And I wait until the page is ready
|
||||
When I press "Create a new question ..."
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "Add"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 03"
|
||||
@@ -166,7 +166,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
# Create the TF 01 question.
|
||||
When I press "Create a new question ..."
|
||||
And I set the field "qtype_qtype_truefalse" to "1"
|
||||
And I set the field "item_qtype_truefalse" to "1"
|
||||
And I press "Add"
|
||||
Then I should see "Adding a True/False question"
|
||||
And I set the field "Question name" to "TF 01"
|
||||
@@ -178,7 +178,7 @@ Feature: Edit quiz page - adding things
|
||||
|
||||
# Create the TF 02 question.
|
||||
When I press "Create a new question ..."
|
||||
And I set the field "qtype_qtype_truefalse" to "1"
|
||||
And I set the field "item_qtype_truefalse" to "1"
|
||||
And I press "Add"
|
||||
Then I should see "Adding a True/False question"
|
||||
And I set the field "Question name" to "TF 02"
|
||||
@@ -242,7 +242,7 @@ Feature: Edit quiz page - adding things
|
||||
# Add a random question to page 4.
|
||||
And I open the "Page 4" add to quiz menu
|
||||
And I choose "a new question" in the open action menu
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay for page 4"
|
||||
|
||||
@@ -70,7 +70,7 @@ Feature: Edit quiz page - drag-and-drop
|
||||
When I click on the "Add" page break icon after question "Question A"
|
||||
When I open the "Page 2" add to quiz menu
|
||||
And I choose "a new question" in the open action menu
|
||||
And I set the field "qtype_qtype_description" to "1"
|
||||
And I set the field "item_qtype_description" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding a description"
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: Edit quiz page - pagination
|
||||
# Add the first Essay question.
|
||||
And I follow "Add"
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 01 new"
|
||||
@@ -44,7 +44,7 @@ Feature: Edit quiz page - pagination
|
||||
# Add the second Essay question.
|
||||
And I follow "Add"
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 02 new"
|
||||
@@ -69,7 +69,7 @@ Feature: Edit quiz page - pagination
|
||||
# Add the third Essay question.
|
||||
And I follow "Add"
|
||||
And I follow "a new question"
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
And I set the field "Question name" to "Essay 03 new"
|
||||
@@ -117,7 +117,7 @@ Feature: Edit quiz page - pagination
|
||||
# Add the forth Essay question in a new page (Page 4).
|
||||
When I open the "Page 3" add to quiz menu
|
||||
And I choose "a new question" in the open action menu
|
||||
And I set the field "qtype_qtype_essay" to "1"
|
||||
And I set the field "item_qtype_essay" to "1"
|
||||
And I press "submitbutton"
|
||||
Then I should see "Adding an Essay question"
|
||||
When I set the field "Question name" to "Essay 04 new"
|
||||
|
||||
Reference in New Issue
Block a user