mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 05:54:19 +02:00
MDL-32523 question behat tests: distinctive question names
This means that, if you are watching the tests run, it is easier to see which test is currently being executed.
This commit is contained in:
parent
e0c41591e1
commit
d7ddbc8297
@ -17,16 +17,16 @@ Feature: A teacher can delete questions in the question bank
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I add a "Essay" question filling the form with:
|
||||
| Question name | Test question name |
|
||||
| Question name | Test question to be deleted |
|
||||
| Question text | Write about whatever you want |
|
||||
And I follow "Course 1"
|
||||
|
||||
@javascript
|
||||
Scenario: Delete a question not used in a quiz
|
||||
Given I follow "Question bank"
|
||||
And I click on "Delete" "link" in the "Test question name" "table_row"
|
||||
And I click on "Delete" "link" in the "Test question to be deleted" "table_row"
|
||||
When I press "Continue"
|
||||
Then I should not see "Test question name"
|
||||
Then I should not see "Test question to be deleted"
|
||||
|
||||
@javascript
|
||||
Scenario: Delete a question used in a quiz
|
||||
@ -36,14 +36,14 @@ Feature: A teacher can delete questions in the question bank
|
||||
And I follow "Test quiz"
|
||||
And I follow "Edit quiz"
|
||||
And I follow "Show"
|
||||
And I click on "Add to quiz" "link" in the "Test question name" "table_row"
|
||||
And I click on "Add to quiz" "link" in the "Test question to be deleted" "table_row"
|
||||
And I follow "Course 1"
|
||||
And I follow "Question bank"
|
||||
And I click on "Delete" "link" in the "Test question name" "table_row"
|
||||
And I click on "Delete" "link" in the "Test question to be deleted" "table_row"
|
||||
When I press "Continue"
|
||||
Then I should not see "Test question name"
|
||||
Then I should not see "Test question to be deleted"
|
||||
And I click on "Also show old questions" "checkbox"
|
||||
And I should see "Test question name"
|
||||
And I should see "Test question to be deleted"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test quiz"
|
||||
And I click on "Preview quiz now" "button"
|
||||
|
@ -18,19 +18,19 @@ Feature: A teacher can edit questions in the question bank
|
||||
And I log in as "admin"
|
||||
And I follow "Course 1"
|
||||
And I add a "Essay" question filling the form with:
|
||||
| Question name | Test question name |
|
||||
| Question name | Test question to be edited |
|
||||
| Question text | Write about whatever you want |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Question bank"
|
||||
When I click on "Edit" "link" in the "Test question name" "table_row"
|
||||
When I click on "Edit" "link" in the "Test question to be edited" "table_row"
|
||||
And I fill the moodle form with:
|
||||
| Question name | Edited question name |
|
||||
| Question text | Write a lot about what you want |
|
||||
And I press "Save changes"
|
||||
Then I should see "Edited question name"
|
||||
And I should not see "Test question name"
|
||||
And I should not see "Test question to be edited"
|
||||
And I should see "Admin User" in the ".categoryquestionscontainer tbody .creatorname" "css_element"
|
||||
And I should see "Teacher 1" in the ".categoryquestionscontainer tbody .modifiername" "css_element"
|
||||
And I click on "Edit" "link" in the "Edited question name" "table_row"
|
||||
|
@ -18,13 +18,13 @@ Feature: A teacher can preview questions in the question bank
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I add a "Numerical" question filling the form with:
|
||||
| Question name | Test question name |
|
||||
| Question name | Test question to be previewed |
|
||||
| Question text | How much is 1 + 1 |
|
||||
| answer[0] | 2 |
|
||||
| fraction[0] | 100% |
|
||||
| answer[1] | * |
|
||||
| fraction[1] | None |
|
||||
When I click on "Preview" "link" in the "Test question name" "table_row"
|
||||
When I click on "Preview" "link" in the "Test question to be previewed" "table_row"
|
||||
And I switch to "questionpreview" window
|
||||
And I fill the moodle form with:
|
||||
| Whether correct | Shown |
|
||||
|
Loading…
x
Reference in New Issue
Block a user