diff --git a/question/tests/behat/behat_question.php b/question/tests/behat/behat_question.php index 35b2da43fe1..5b2a7f55916 100644 --- a/question/tests/behat/behat_question.php +++ b/question/tests/behat/behat_question.php @@ -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"') ); } diff --git a/question/tests/behat/copy_questions.feature b/question/tests/behat/copy_questions.feature index 658396f4f2f..8dd7d10c3a0 100644 --- a/question/tests/behat/copy_questions.feature +++ b/question/tests/behat/copy_questions.feature @@ -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" diff --git a/question/tests/behat/edit_questions.feature b/question/tests/behat/edit_questions.feature index 1e4c0fb57d7..e9f3987be59 100644 --- a/question/tests/behat/edit_questions.feature +++ b/question/tests/behat/edit_questions.feature @@ -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" diff --git a/question/tests/behat/question_categories.feature b/question/tests/behat/question_categories.feature index 816bd5b1488..4249723efc0 100644 --- a/question/tests/behat/question_categories.feature +++ b/question/tests/behat/question_categories.feature @@ -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)"