Merge branch 'MDL-44534' of git://github.com/timhunt/moodle
Conflicts: question/tests/behat/copy_questions.feature
This commit is contained in:
@@ -62,7 +62,7 @@ class behat_question extends behat_base {
|
||||
new Given('I click on "' . $this->escape($questiontypexpath) . '" "xpath_element"'),
|
||||
new Given('I click on "#chooseqtype_submit" "css_element"'),
|
||||
new Given('I set the following fields to these values:', $questiondata),
|
||||
new Given('I press "' . get_string('savechanges') . '"')
|
||||
new Given('I press "id_submitbutton"')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ Feature: A teacher can duplicate questions in the question bank
|
||||
@javascript
|
||||
Scenario: copy a previously created question
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@asd.com |
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@asd.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | format |
|
||||
| Course 1 | C1 | weeks |
|
||||
| Course 1 | C1 | weeks |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
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 to be copied |
|
||||
| Question name | Test question to be copied |
|
||||
| Question text | Write about whatever you want |
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
@@ -26,9 +26,9 @@ Feature: A teacher can duplicate questions in the question bank
|
||||
And I follow "Question bank"
|
||||
When I click on "Duplicate" "link" in the "Test question to be copied" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Question name | Duplicated question name |
|
||||
| Question name | Duplicated question name |
|
||||
| Question text | Write a lot about duplicating questions |
|
||||
And I press "Save changes"
|
||||
And I press "id_submitbutton"
|
||||
Then I should see "Duplicated question name"
|
||||
And I should see "Test question to be copied"
|
||||
And I should see "Teacher 1" in the ".categoryquestionscontainer tbody tr.r0 .creatorname" "css_element"
|
||||
|
||||
@@ -28,7 +28,7 @@ Feature: A teacher can edit questions in the question bank
|
||||
And I set the following fields to these values:
|
||||
| Question name | Edited question name |
|
||||
| Question text | Write a lot about what you want |
|
||||
And I press "Save changes"
|
||||
And I press "id_submitbutton"
|
||||
Then I should see "Edited 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"
|
||||
|
||||
@@ -49,7 +49,7 @@ Feature: A teacher can put questions in categories in the question bank
|
||||
When I click on "Edit" "link" in the "my test question" "table_row"
|
||||
And I click on "Use this category" "checkbox"
|
||||
And I set the field "Save in category" to "New Category 2"
|
||||
And I press "Save changes"
|
||||
And I press "id_submitbutton"
|
||||
Then I should see "my test question"
|
||||
And the "category" select box should contain "New Category 2 (1)"
|
||||
And the "category" select box should not contain "New Category 1 (1)"
|
||||
|
||||
Reference in New Issue
Block a user