And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create a Description question with Correct answer as False
When I add a "Description" question filling the form with:
| Question name | description-001 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Edit a Description question
When I click on "Edit" "link" in the "description-001" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export a Description question
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
- Scenario: Preview a question and submit a correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Description question and submit a correct response.
When I click on "Preview" "link" in the "description-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create an Essay question with Response format set to 'HTML editor'
When I add a "Essay" question filling the form with:
| Question name | essay-001 |
| Response format | HTML editor |
Then I should see "essay-001"
- @javascript
Scenario: Create an Essay question with Response format set to 'HTML editor with the file picker'
When I add a "Essay" question filling the form with:
| Question name | essay-002 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Edit an Essay question
When I click on "Edit" "link" in the "essay-001" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export 3 Essay questions
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
- Scenario: Preview a question and submit a partially correct response.
+ @javascript @_switch_window
+ Scenario: Preview an Essay question and submit a partially correct response.
When I click on "Preview" "link" in the "essay-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "Please write a story about a frog."
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit a partially correct response.
+ @javascript @_switch_window
+ Scenario: Preview an Essay question and submit a partially correct response.
When I click on "Preview" "link" in the "essay-002" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "Please write a story about a frog."
And I should see "You can drag and drop files here to add them."
And I switch to the main window
-
- @javascript
- Scenario: Preview a question and submit a partially correct response.
+
+ @javascript @_switch_window
+ Scenario: Preview an Essay question and submit a partially correct response.
When I click on "Preview" "link" in the "essay-003" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create a Matching question with 3 subquestions
When I add a "Matching" question filling the form with:
| Question name | match-001 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
+ @javascript @_switch_window
Scenario: Edit a Matching question
When I click on "Edit" "link" in the "Matching for editing" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export a Matching question
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
- Scenario: Preview a question and submit a correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Matching question and submit a correct response.
When I click on "Edit" "link" in the "matching-001" "table_row"
And I set the following fields to these values:
| Shuffle | 0 |
And I should see "General feedback."
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit a partially correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Matching question and submit a partially correct response.
When I click on "Edit" "link" in the "matching-001" "table_row"
And I set the following fields to these values:
| Shuffle | 0 |
And I should see "General feedback."
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit an incorrect response.
+ @javascript @_switch_window
+ Scenario: Preview a Matching question and submit an incorrect response.
When I click on "Edit" "link" in the "matching-001" "table_row"
And I set the following fields to these values:
| Shuffle | 0 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create a Multiple choice question with multiple response
When I add a "Multiple choice" question filling the form with:
| Question name | Multi-choice-001 |
| Hint 2 | Second hint |
Then I should see "Multi-choice-001"
- @javascript
Scenario: Create a Multiple choice question with single response
When I add a "Multiple choice" question filling the form with:
| Question name | Multi-choice-002 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Edit a Multiple choice question with multiple response (checkboxes)
When I click on "Edit" "link" in the "Multiple choice for editing" "table_row"
And I set the following fields to these values:
And I press "id_submitbutton"
Then I should see "Edited Multiple choice name"
- @javascript
Scenario: Edit a Multiple choice question with single response (radio buttons)
When I click on "Edit" "link" in the "Single choice for editing" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export a Multiple choice question
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
- Scenario: Preview a question and submit a partially correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Multiple choice question and submit a partially correct response.
When I click on "Preview" "link" in the "Multi-choice-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "Parts, but only parts, of your response are correct."
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit a correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Multiple choice question and submit a correct response.
When I click on "Preview" "link" in the "Multi-choice-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "The correct answer is: One, Three"
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit a correct response.
+ @javascript @_switch_window
+ Scenario: Preview a Multiple choice question and submit a correct response.
When I click on "Preview" "link" in the "Multi-choice-002" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "Mark 1.00 out of 1.00"
And I should see "Well done!"
And I should see "The correct answer is: One"
- And I switch to the main window
\ No newline at end of file
+ And I switch to the main window
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create a Short answer question
When I add a "Short answer" question filling the form with:
| Question name | shortanswer-001 |
-@qtype @qtype_short asnswer
+@qtype @qtype_shortanswer
Feature: Test duplicating a quiz containing a Short answer question
As a teacher
In order re-use my courses containing Short answer questions
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
+ @javascript @_switch_window
Scenario: Edit a Short answer question
When I click on "Edit" "link" in the "shortanswer-001 for editing" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export a Short answer question
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
+ @javascript @_switch_window
Scenario: Preview a Short answer question with correct answer
When I click on "Preview" "link" in the "shortanswer-001" "table_row"
And I switch to "questionpreview" window
And I should see "Generalfeedback: frog or toad would have been OK."
And I should see "The correct answer is: frog"
- @javascript
+ @javascript @_switch_window
Scenario: Preview a Short answer question with almost correct answer
When I click on "Preview" "link" in the "shortanswer-001" "table_row"
And I switch to "questionpreview" window
And I should see "Generalfeedback: frog or toad would have been OK."
And I should see "The correct answer is: frog"
- @javascript
+ @javascript @_switch_window
Scenario: Preview a Short answer question with incorrect answer
When I click on "Preview" "link" in the "shortanswer-001" "table_row"
And I switch to "questionpreview" window
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Create a True/False question with Correct answer as False
When I add a "True/False" question filling the form with:
| Question name | true-false-001 |
| Feedback for the response 'True'. | Well done! |
| Feedback for the response 'False'. | Read more about England. |
Then I should see "true-false-001"
-
- @javascript
+
Scenario: Create a True/False question with Correct answer as True
When I add a "True/False" question filling the form with:
| Question name | true-false-002 |
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
Scenario: Edit a True/False question
When I click on "Edit" "link" in the "true-false-001" "table_row"
And I set the following fields to these values:
And I log in as "teacher1"
And I follow "Course 1"
- @javascript
Scenario: Export a True/False question
When I navigate to "Export" node in "Course administration > Question bank"
And I set the field "id_format_xml" to "1"
And I follow "Course 1"
And I navigate to "Question bank" node in "Course administration"
- @javascript
- Scenario: Preview a question and submit a correct response.
+ @javascript @_switch_window
+ Scenario: Preview a True/False question and submit a correct response.
When I click on "Preview" "link" in the "true-false-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"
And I should see "The correct answer is 'True'."
And I switch to the main window
- @javascript
- Scenario: Preview a question and submit an incorrect response.
+ @javascript @_switch_window
+ Scenario: Preview a True/False question and submit an incorrect response.
When I click on "Preview" "link" in the "true-false-001" "table_row"
And I switch to "questionpreview" window
And I set the field "How questions behave" to "Immediate feedback"