MDL-52964 Qtype: Small fixes to behat tests

This applies some small changes to proposed behat tests:

- Geting rid of the @javascript tag when it's not needed.
- Adding some missing @_switch_window tags.
- Fixing some scenario names, previously duplicated.
- Fixing some typos and whitespace.
parent cad67991
......@@ -18,7 +18,6 @@ Feature: Test creating a Description question
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 |
......
......@@ -24,7 +24,6 @@ Feature: Test editing a Description question
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:
......
......@@ -23,7 +23,6 @@ Feature: Test exporting Description questions
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"
......
......@@ -24,8 +24,8 @@ Feature: Preview a Description question
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"
......
......@@ -18,7 +18,6 @@ Feature: Test creating an Essay question
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 |
......@@ -27,7 +26,6 @@ Feature: Test creating an Essay question
| 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 |
......
......@@ -26,7 +26,6 @@ Feature: Test editing an Essay question
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:
......
......@@ -25,7 +25,6 @@ Feature: Test exporting Essay questions
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"
......
......@@ -26,8 +26,8 @@ Feature: Preview Essay questions
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"
......@@ -35,8 +35,8 @@ Feature: Preview Essay questions
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"
......@@ -44,9 +44,9 @@ Feature: Preview Essay questions
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"
......
......@@ -18,7 +18,6 @@ Feature: Test creating a Matching question
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 |
......
......@@ -24,7 +24,7 @@ Feature: Test editing a Matching question
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:
......
......@@ -23,7 +23,6 @@ Feature: Test exporting Matching questions
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"
......
......@@ -24,8 +24,8 @@ Feature: Preview a Matching question
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 |
......@@ -42,8 +42,8 @@ Feature: Preview a Matching question
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 |
......@@ -60,8 +60,8 @@ Feature: Preview a Matching question
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 |
......
......@@ -18,7 +18,6 @@ Feature: Test creating a Multiple choice question
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 |
......@@ -39,7 +38,6 @@ Feature: Test creating a Multiple choice question
| 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 |
......
......@@ -25,7 +25,6 @@ Feature: Test editing a Multiple choice question
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:
......@@ -37,7 +36,6 @@ Feature: Test editing a Multiple choice question
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:
......
......@@ -24,7 +24,6 @@ Feature: Test exporting Multiple choice questions
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"
......
......@@ -25,8 +25,8 @@ Feature: Preview a Multiple choice question
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"
......@@ -40,8 +40,8 @@ Feature: Preview a Multiple choice question
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"
......@@ -57,8 +57,8 @@ Feature: Preview a Multiple choice question
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"
......@@ -69,4 +69,4 @@ Feature: Preview a Multiple choice question
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
......@@ -18,7 +18,6 @@ Feature: Test creating a Short answer question
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
......
......@@ -24,7 +24,7 @@ Feature: Test editing a Short answer question
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:
......
......@@ -23,7 +23,6 @@ Feature: Test exporting Short answer questions
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"
......
......@@ -25,7 +25,7 @@ Feature: Preview a Short answer question
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
......@@ -40,7 +40,7 @@ Feature: Preview a Short answer question
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
......@@ -55,7 +55,7 @@ Feature: Preview a Short answer question
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
......
......@@ -18,7 +18,6 @@ Feature: Test creating a True/False question
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 |
......@@ -29,8 +28,7 @@ Feature: Test creating a True/False question
| 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 |
......
......@@ -24,7 +24,6 @@ Feature: Test editing a True/False question
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:
......
......@@ -23,7 +23,6 @@ Feature: Test exporting True/False questions
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"
......
......@@ -24,8 +24,8 @@ Feature: Preview a Trtue/False question
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"
......@@ -36,8 +36,8 @@ Feature: Preview a Trtue/False question
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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment