diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 0fb2c5344bd..134a2415131 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -61,7 +61,7 @@ Feature: Set up contextual data for tests And I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I should see "Grouping 1" And I should see "Grouping 2" diff --git a/admin/tool/behat/tests/behat/edit_permissions.feature b/admin/tool/behat/tests/behat/edit_permissions.feature index d54a19513ea..2e755b68c79 100644 --- a/admin/tool/behat/tests/behat/edit_permissions.feature +++ b/admin/tool/behat/tests/behat/edit_permissions.feature @@ -42,7 +42,7 @@ Feature: Edit capabilities | mod/forum:editanypost | Prevent | | mod/forum:addquestion | Allow | When I set the field "Advanced role override" to "Student (3)" - And I press "Go" + And I click on "Go" "button" in the "div.advancedoverride" "css_element" Then "mod/forum:deleteanypost" capability has "Prohibit" permission And "mod/forum:editanypost" capability has "Prevent" permission And "mod/forum:addquestion" capability has "Allow" permission diff --git a/admin/tool/recyclebin/tests/behat/basic_functionality.feature b/admin/tool/recyclebin/tests/behat/basic_functionality.feature index 09c921f580f..8acb7cd3ccf 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -79,7 +79,7 @@ Feature: Basic recycle bin functionality And I should see "Course 2" in the "#course-listing" "css_element" And I am on "Course 2" course homepage And I navigate to "Users > Groups" in current page administration - And I follow "Overview" + And I select "Overview" from the "jump" singleselect And "Student 1" "text" should exist in the "Group A" "table_row" And "Student 2" "text" should exist in the "Group A" "table_row" And "Student 2" "text" should exist in the "Group B" "table_row" diff --git a/backup/util/ui/tests/behat/import_course.feature b/backup/util/ui/tests/behat/import_course.feature index 833f34be381..76e1d0c195a 100644 --- a/backup/util/ui/tests/behat/import_course.feature +++ b/backup/util/ui/tests/behat/import_course.feature @@ -43,7 +43,7 @@ Feature: Import course's contents into another course And I navigate to "Users > Permissions" in current page administration Then I should see "Non-editing teacher (1)" And I set the field "Advanced role override" to "Non-editing teacher (1)" - And I press "Go" + And I click on "Go" "button" in the "div.advancedoverride" "css_element" And "enrol/manual:enrol" capability has "Allow" permission Scenario: Import process without permission option diff --git a/backup/util/ui/tests/behat/import_groups.feature b/backup/util/ui/tests/behat/import_groups.feature index 3330fca8ae3..f14e300e4e0 100644 --- a/backup/util/ui/tests/behat/import_groups.feature +++ b/backup/util/ui/tests/behat/import_groups.feature @@ -33,7 +33,7 @@ Feature: Option to include groups and groupings when importing a course to anoth When I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I should see "Grouping 1" And I should see "Grouping 2" @@ -43,6 +43,6 @@ Feature: Option to include groups and groupings when importing a course to anoth When I navigate to "Users > Groups" in current page administration Then I should not see "Group 1" And I should not see "Group 2" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I should not see "Grouping 1" And I should not see "Grouping 2" diff --git a/course/tests/behat/category_management.feature b/course/tests/behat/category_management.feature index 9b1c9f163eb..94772c03b23 100644 --- a/course/tests/behat/category_management.feature +++ b/course/tests/behat/category_management.feature @@ -250,7 +250,7 @@ Feature: Test category management actions # Redirect And I should see "Assign roles in Category: Cat 1" And I should see "Please choose a role to assign" - And I click on "Back to Category: Cat 1" "link" + And I click on "Back" "button" # Redirect And I should see the "Course categories and courses" management page And "Cat 1" "link" should exist in the "#category-listing" "css_element" diff --git a/group/tests/behat/auto_creation.feature b/group/tests/behat/auto_creation.feature index 9d8c4deeb49..4add86d6c83 100644 --- a/group/tests/behat/auto_creation.feature +++ b/group/tests/behat/auto_creation.feature @@ -67,7 +67,7 @@ Feature: Automatic creation of groups And I should see "No" in the "Group messaging" "select" And I press "Cancel" # Check groupings. - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I should see "Grouping name" And I click on "Show groups in grouping" "link" in the "Grouping name" "table_row" And the "removeselect" select box should contain "Group A" diff --git a/group/tests/behat/create_groups.feature b/group/tests/behat/create_groups.feature index 2b4a65a271c..19d12b7ec2a 100644 --- a/group/tests/behat/create_groups.feature +++ b/group/tests/behat/create_groups.feature @@ -114,7 +114,7 @@ Feature: Organize students into groups | Group name | The greatest group that never existed | And I press "Save changes" And I should see "The greatest group that never existed" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I press "Create grouping" And the "idnumber" "field" should be readonly And I set the following fields to these values: diff --git a/group/tests/behat/custom_fields.feature b/group/tests/behat/custom_fields.feature index 9a41bad18a6..04770b4ef79 100644 --- a/group/tests/behat/custom_fields.feature +++ b/group/tests/behat/custom_fields.feature @@ -34,12 +34,12 @@ Feature: Custom profile fields in groups And I navigate to "Users > Groups" in current page administration # Check the Overview page. - And I follow "Overview" + And I select "Overview" from the "jump" singleselect And "Robin Hood (user1, fox)" "text" should exist in the "Canines" "table_row" And "Little John (user2, bear)" "text" should exist in the "No group" "table_row" # Check the groups page. - And I follow "Groups" + And I select "Groups" from the "jump" singleselect And I set the field "groups" to "Canines" And I should see "Robin Hood (user1, fox)" And I should not see "Little John (user2, bear)" diff --git a/group/tests/behat/delete_groups.feature b/group/tests/behat/delete_groups.feature index 380b7f4b648..5ea03280e5b 100644 --- a/group/tests/behat/delete_groups.feature +++ b/group/tests/behat/delete_groups.feature @@ -26,7 +26,7 @@ Feature: Automatic deletion of groups and groupings | Group name | Group (with ID) | | Group ID number | An ID | And I press "Save changes" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I press "Create grouping" And I set the following fields to these values: | Grouping name | Grouping (without ID) | @@ -36,7 +36,7 @@ Feature: Automatic deletion of groups and groupings | Grouping name | Grouping (with ID) | | Grouping ID number | An ID | And I press "Save changes" - And I follow "Groups" + And I select "Groups" from the "jump" singleselect @javascript Scenario: Delete groups and groupings with and without ID numbers @@ -48,7 +48,7 @@ Feature: Automatic deletion of groups and groupings And I press "Delete selected group" And I press "Yes" And the "groups" select box should not contain "Group (with ID) (0)" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" And I press "Yes" And I should not see "Grouping (without ID)" @@ -72,7 +72,7 @@ Feature: Automatic deletion of groups and groupings And I press "Delete selected group" And I press "Yes" And I should not see "Group (without ID)" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row" And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" And I press "Yes" diff --git a/group/tests/behat/groups_import.feature b/group/tests/behat/groups_import.feature index 12ad5011664..a9567da2c05 100644 --- a/group/tests/behat/groups_import.feature +++ b/group/tests/behat/groups_import.feature @@ -42,7 +42,7 @@ Feature: Importing of groups and groupings And I should see "No" in the "Group messaging" "select" And I press "Cancel" # Check groupings - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I should see "Grouping-1" And I should see "Grouping-2" And I should see "Grouping-3" diff --git a/group/tests/behat/id_uniqueness.feature b/group/tests/behat/id_uniqueness.feature index 779b1da8eaf..f203f269c2d 100644 --- a/group/tests/behat/id_uniqueness.feature +++ b/group/tests/behat/id_uniqueness.feature @@ -42,7 +42,7 @@ Feature: Uniqueness of Group ID number And I press "Cancel" Scenario: Grouping ID number uniqueness - Given I follow "Groupings" + Given I select "Groupings" from the "jump" singleselect And I press "Create grouping" And I set the following fields to these values: | Grouping name | Grouping 1 | diff --git a/group/tests/behat/overview.feature b/group/tests/behat/overview.feature index 5eb8d74d156..53bbc17de49 100644 --- a/group/tests/behat/overview.feature +++ b/group/tests/behat/overview.feature @@ -59,7 +59,7 @@ Feature: Group overview Given I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "Users > Groups" in current page administration - And I follow "Overview" + And I select "Overview" from the "jump" singleselect # Grouping All and Group All filter When I select "All" from the "Grouping" singleselect diff --git a/group/tests/behat/update_groups.feature b/group/tests/behat/update_groups.feature index 51ffb45c6cb..92440ef1219 100644 --- a/group/tests/behat/update_groups.feature +++ b/group/tests/behat/update_groups.feature @@ -26,7 +26,7 @@ Feature: Automatic updating of groups and groupings | Group name | Group (with ID) | | Group ID number | An ID | And I press "Save changes" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I press "Create grouping" And I set the following fields to these values: | Grouping name | Grouping (without ID) | @@ -36,7 +36,7 @@ Feature: Automatic updating of groups and groupings | Grouping name | Grouping (with ID) | | Grouping ID number | An ID | And I press "Save changes" - And I follow "Groups" + And I select "Groups" from the "jump" singleselect @javascript Scenario: Update groups and groupings with ID numbers @@ -52,7 +52,7 @@ Feature: Automatic updating of groups and groupings And I press "Edit group settings" And the field "idnumber" matches value "An ID (updated)" And I press "Save changes" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I click on "Edit" "link" in the "Grouping (with ID)" "table_row" And the field "idnumber" matches value "An ID" And I set the following fields to these values: @@ -86,7 +86,7 @@ Feature: Automatic updating of groups and groupings And the "idnumber" "field" should be readonly And the field "idnumber" matches value "An ID" And I press "Save changes" - And I follow "Groupings" + And I select "Groupings" from the "jump" singleselect And I click on "Edit" "link" in the "Grouping (with ID)" "table_row" And the "idnumber" "field" should be readonly And the field "idnumber" matches value "An ID" diff --git a/lib/tests/behat/behat_permissions.php b/lib/tests/behat/behat_permissions.php index 155ad85d001..6dc2e873e1a 100644 --- a/lib/tests/behat/behat_permissions.php +++ b/lib/tests/behat/behat_permissions.php @@ -81,7 +81,7 @@ class behat_permissions extends behat_base { ); if (!$this->running_javascript()) { - $this->execute("behat_general::i_click_on_in_the", [get_string('go'), 'button', 'region-main', 'region']); + $this->execute("behat_general::i_click_on_in_the", [get_string('go'), 'button', "div.advancedoverride", 'css_element']); } $this->execute("behat_permissions::i_fill_the_capabilities_form_with_the_following_permissions", $table);