diff --git a/question/type/ordering/tests/behat/backup_and_restore.feature b/question/type/ordering/tests/behat/backup_and_restore.feature index d97a5c3e87e..3094b660ed4 100644 --- a/question/type/ordering/tests/behat/backup_and_restore.feature +++ b/question/type/ordering/tests/behat/backup_and_restore.feature @@ -29,7 +29,7 @@ Feature: Test duplicating a quiz containing a Ordering question And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | And I navigate to "Question bank" in current page administration - And I click on "Edit" "link" in the "Moodle" "table_row" + And I choose "Edit question" action for "Moodle" in the question bank Then the following fields match these values: | Question name | Moodle | | Question text | Put these words in order. | diff --git a/question/type/ordering/tests/behat/behat_qtype_ordering.php b/question/type/ordering/tests/behat/behat_qtype_ordering.php index d1deda37293..54ed18f0dcd 100644 --- a/question/type/ordering/tests/behat/behat_qtype_ordering.php +++ b/question/type/ordering/tests/behat/behat_qtype_ordering.php @@ -41,7 +41,7 @@ class behat_qtype_ordering extends behat_base { * @return string the xpath expression. */ protected function item_xpath_by_lable($label) { - return '//li[contains(@class, "sortableitem ") and contains(normalize-space(.), "' . $this->escape($label) . '")]'; + return '//li[@class = "sortableitem" and contains(normalize-space(.), "' . $this->escape($label) . '")]'; } /** @@ -50,7 +50,7 @@ class behat_qtype_ordering extends behat_base { * @return string the xpath expression. */ protected function item_xpath_by_position($position) { - return '//li[contains(@class, "sortableitem ")][' . $position . ']'; + return '//li[@class = "sortableitem"][' . $position . ']'; } /** diff --git a/question/type/ordering/tests/behat/edit.feature b/question/type/ordering/tests/behat/edit.feature index 2a133b5415c..c6d5308f726 100644 --- a/question/type/ordering/tests/behat/edit.feature +++ b/question/type/ordering/tests/behat/edit.feature @@ -26,7 +26,7 @@ Feature: Test editing an Ordering question @javascript @_switch_window Scenario: Edit an Ordering question - When I click on "Edit" "link" in the "Ordering for editing" "table_row" + When I choose "Edit question" action for "Ordering for editing" in the question bank And I set the following fields to these values: | Question name || And I press "id_submitbutton" @@ -38,7 +38,7 @@ Feature: Test editing an Ordering question @javascript @_switch_window Scenario: Editing an ordering question and making sure the form does not allow duplication of draggables - When I click on "Edit" "link" in the "Ordering for editing" "table_row" + When I choose "Edit question" action for "Ordering for editing" in the question bank And I set the following fields to these values: | Draggable item 4 | Object | And I press "id_submitbutton" diff --git a/question/type/ordering/tests/behat/preview.feature b/question/type/ordering/tests/behat/preview.feature index f04b99d500a..cabbc799f28 100644 --- a/question/type/ordering/tests/behat/preview.feature +++ b/question/type/ordering/tests/behat/preview.feature @@ -26,11 +26,11 @@ Feature: Preview an Ordering question @javascript @_switch_window Scenario: Preview an Ordering question and submit a correct response. - When I click on "Preview" "link" in the "ordering-001" "table_row" + When I choose "Preview" action for "ordering-001" in the question bank And I switch to "questionpreview" window And I set the field "How questions behave" to "Immediate feedback" And I press "Start again with these options" - # The test was unreliable unless if an item rendomly stared in the right place. + # The test was unreliable unless if an item randomly started in the right place. # So we first moved each item to the last place, before putting it into the right place. And I drag "Modular" to space "6" in the ordering question And I drag "Modular" to space "1" in the ordering question