diff --git a/admin/tool/dataprivacy/tests/behat/datadelete.feature b/admin/tool/dataprivacy/tests/behat/datadelete.feature index c6454bd5504..f16a00608f6 100644 --- a/admin/tool/dataprivacy/tests/behat/datadelete.feature +++ b/admin/tool/dataprivacy/tests/behat/datadelete.feature @@ -38,7 +38,7 @@ Feature: Data delete from the privacy API And I run all adhoc tasks And I reload the page And I should see "Awaiting approval" in the "Victim User 1" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" And I should see "Approved" in the "Victim User 1" "table_row" @@ -67,7 +67,7 @@ Feature: Data delete from the privacy API And I log out And I log in as "admin" And I navigate to "Users > Privacy and policies > Data requests" in site administration - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" @@ -105,7 +105,7 @@ Feature: Data delete from the privacy API And I log out And I log in as "admin" And I navigate to "Users > Privacy and policies > Data requests" in site administration - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" diff --git a/admin/tool/dataprivacy/tests/behat/dataexport.feature b/admin/tool/dataprivacy/tests/behat/dataexport.feature index 50c58bc2373..7f87c10aefe 100644 --- a/admin/tool/dataprivacy/tests/behat/dataexport.feature +++ b/admin/tool/dataprivacy/tests/behat/dataexport.feature @@ -34,21 +34,21 @@ Feature: Data export from the privacy API And I run all adhoc tasks And I reload the page And I should see "Awaiting approval" in the "Victim User 1" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" And I should see "Approved" in the "Victim User 1" "table_row" And I run all adhoc tasks And I reload the page And I should see "Download ready" in the "Victim User 1" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And following "Download" should download between "1" and "100000" bytes And the following config values are set as admin: | privacyrequestexpiry | 1 | tool_dataprivacy | And I wait "1" seconds And I navigate to "Users > Privacy and policies > Data requests" in site administration And I should see "Expired" in the "Victim User 1" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I should not see "Download" @javascript @@ -67,7 +67,7 @@ Feature: Data export from the privacy API And I log out And I log in as "admin" And I navigate to "Users > Privacy and policies > Data requests" in site administration - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" @@ -79,7 +79,7 @@ Feature: Data export from the privacy API And I run all adhoc tasks And I reload the page And I should see "Download ready" in the "Export all of my personal data" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And following "Download" should download between "1" and "100000" bytes And the following config values are set as admin: @@ -107,7 +107,7 @@ Feature: Data export from the privacy API And I log out And I log in as "admin" And I navigate to "Users > Privacy and policies > Data requests" in site administration - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And I follow "Approve request" And I press "Approve request" @@ -119,7 +119,7 @@ Feature: Data export from the privacy API And I run all adhoc tasks And I reload the page And I should see "Download ready" in the "Victim User 1" "table_row" - And I follow "Actions" + And I open the action menu in "Victim User 1" "table_row" And following "Download" should download between "1" and "100000" bytes And the following config values are set as admin: diff --git a/admin/tool/dataprivacy/tests/behat/manage_categories.feature b/admin/tool/dataprivacy/tests/behat/manage_categories.feature index 9952bbb7201..fb230d7a859 100644 --- a/admin/tool/dataprivacy/tests/behat/manage_categories.feature +++ b/admin/tool/dataprivacy/tests/behat/manage_categories.feature @@ -7,7 +7,7 @@ Feature: Manage data categories Background: Given I log in as "admin" And I navigate to "Users > Privacy and policies > Data registry" in site administration - And I click on "Edit" "link" + And I open the action menu in "region-main" "region" And I choose "Categories" in the open action menu And I press "Add category" And I set the field "Name" to "Category 1" @@ -17,7 +17,7 @@ Feature: Manage data categories And I should see "Category 1 description" in the "Category 1" "table_row" Scenario: Update a data category - Given I click on "Actions" "link" in the "Category 1" "table_row" + Given I open the action menu in "Category 1" "table_row" And I choose "Edit" in the open action menu And I set the field "Name" to "Category 1 edited" And I set the field "Description" to "Category 1 description edited" @@ -26,7 +26,7 @@ Feature: Manage data categories And I should see "Category 1 description edited" in the "List of data categories" "table" Scenario: Delete a data category - Given I click on "Actions" "link" in the "Category 1" "table_row" + Given I open the action menu in "Category 1" "table_row" And I choose "Delete" in the open action menu And I should see "Delete category" And I should see "Are you sure you want to delete the category 'Category 1'?" diff --git a/admin/tool/dataprivacy/tests/behat/manage_data_requests.feature b/admin/tool/dataprivacy/tests/behat/manage_data_requests.feature index 9eb2a8a75cd..cd1bc2a4b0a 100644 --- a/admin/tool/dataprivacy/tests/behat/manage_data_requests.feature +++ b/admin/tool/dataprivacy/tests/behat/manage_data_requests.feature @@ -35,7 +35,7 @@ Feature: Manage data requests And I navigate to "Users > Privacy and policies > Data requests" in site administration Then I should see "Hi PO!" in the "John Doe" "table_row" And I should see "Dear Mr. Privacy Officer" in the "Jane Doe" "table_row" - And I click on "Actions" "link" in the "John Doe" "table_row" + And I open the action menu in "John Doe" "table_row" And I should see "View the request" And I should see "Mark as complete" And I choose "View the request" in the open action menu @@ -43,17 +43,17 @@ Feature: Manage data requests And I press "Mark as complete" And I wait until the page is ready And I should see "Complete" in the "John Doe" "table_row" - And I click on "Actions" "link" in the "John Doe" "table_row" + And I open the action menu in "John Doe" "table_row" And I should see "View the request" But I should not see "Mark as complete" And I press key "27" in ".moodle-actionmenu" "css_element" - And I click on "Actions" "link" in the "Jane Doe" "table_row" + And I open the action menu in "Jane Doe" "table_row" And I choose "Mark as complete" in the open action menu And I should see "Do you really want to mark this user enquiry as complete?" And I press "Mark as complete" And I wait until the page is ready And I should see "Complete" in the "Jane Doe" "table_row" - And I click on "Actions" "link" in the "Jane Doe" "table_row" + And I open the action menu in "Jane Doe" "table_row" And I should see "View the request" But I should not see "Mark as complete" diff --git a/admin/tool/dataprivacy/tests/behat/manage_purposes.feature b/admin/tool/dataprivacy/tests/behat/manage_purposes.feature index c6c59080eba..ff029252f83 100644 --- a/admin/tool/dataprivacy/tests/behat/manage_purposes.feature +++ b/admin/tool/dataprivacy/tests/behat/manage_purposes.feature @@ -7,7 +7,7 @@ Feature: Manage data storage purposes Background: Given I log in as "admin" And I navigate to "Users > Privacy and policies > Data registry" in site administration - And I click on "Edit" "link" + And I open the action menu in "region-main" "region" And I choose "Purposes" in the open action menu And I press "Add purpose" And I set the field "Name" to "Purpose 1" @@ -29,7 +29,7 @@ Feature: Manage data storage purposes And "Purpose 1 Purpose 1 description" row "5" column of "List of data purposes" table should contain "No" Scenario: Update a data storage purpose - Given I click on "Actions" "link" in the "Purpose 1" "table_row" + Given I open the action menu in "Purpose 1" "table_row" And I choose "Edit" in the open action menu And I set the field "Name" to "Purpose 1 edited" And I set the field "Description" to "Purpose 1 description edited" @@ -48,7 +48,7 @@ Feature: Manage data storage purposes And "Purpose 1 edited Purpose 1 description edited" row "5" column of "List of data purposes" table should not contain "No" Scenario: Delete a data storage purpose - Given I click on "Actions" "link" in the "Purpose 1" "table_row" + Given I open the action menu in "Purpose 1" "table_row" And I choose "Delete" in the open action menu And I should see "Delete purpose" And I should see "Are you sure you want to delete the purpose 'Purpose 1'?" diff --git a/admin/tool/policy/tests/behat/acceptances.feature b/admin/tool/policy/tests/behat/acceptances.feature index 23198daf919..077477cdf63 100644 --- a/admin/tool/policy/tests/behat/acceptances.feature +++ b/admin/tool/policy/tests/behat/acceptances.feature @@ -98,7 +98,6 @@ Feature: Viewing acceptances reports and accepting on behalf of other users Scenario: View acceptances made by users on their own, multiple policies Given I log in as "admin" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "This privacy policy" "table_row" And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row" And I press "Continue" And I log out @@ -136,7 +135,6 @@ Feature: Viewing acceptances reports and accepting on behalf of other users Scenario: Agree on behalf of another user as a manager, multiple policies, javascript off Given I log in as "admin" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "This privacy policy" "table_row" And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row" And I press "Continue" And I set the following system permissions of "Manager" role: @@ -169,7 +167,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users Scenario: Agree on behalf of another user as a manager, multiple policies, javascript on Given I log in as "admin" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "This privacy policy" "table_row" + And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row" And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row" And I press "Activate" And I set the following system permissions of "Manager" role: @@ -265,7 +263,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users Scenario: Bulk agree on behalf of another users as a manager, multiple policies, javascript on Given I log in as "admin" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "This privacy policy" "table_row" + And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row" And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row" And I press "Activate" And I set the following system permissions of "Manager" role: diff --git a/admin/tool/policy/tests/behat/managepolicies.feature b/admin/tool/policy/tests/behat/managepolicies.feature index 4db68e33663..5ad80f72cd4 100644 --- a/admin/tool/policy/tests/behat/managepolicies.feature +++ b/admin/tool/policy/tests/behat/managepolicies.feature @@ -64,7 +64,6 @@ Feature: Manage policies And I set the field "I agree to the Policy1" to "1" And I press "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Edit" "link" in the "Policy1" "table_row" And "Draft" "field" should not exist And "Active" "field" should not exist @@ -87,7 +86,6 @@ Feature: Manage policies And I set the field "I agree to the Policy1" to "1" And I press "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Edit" "link" in the "Policy1" "table_row" And I set the field "Version" to "v2" And I press "Save as draft" @@ -106,7 +104,6 @@ Feature: Manage policies And I set the field "I agree to the Policy1" to "1" And I press "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Edit" "link" in the "Policy1" "table_row" And I set the field "Name" to "Policy2" And I set the field "Version" to "v2" @@ -116,7 +113,6 @@ Feature: Manage policies | Policy2 Site policy, All users | Active | v2 | 0 of 4 (0%) | And I should not see "Policy1" And I should not see "v1" - And I open the action menu in "Policy2" "table_row" And I click on "View previous versions" "link" in the "Policy2" "table_row" And I should see "Policy2 previous versions" And I should not see "v2" @@ -131,7 +127,6 @@ Feature: Manage policies | Policy1 | v1 | full text2 | short text2 | draft | And I log in as "manager" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Edit" "link" in the "Policy1" "table_row" And I set the field "Version" to "v2" And "Draft" "field" should exist @@ -144,7 +139,6 @@ Feature: Manage policies | Name | Policy status | Version | Agreements | | Policy1 Site policy, All users | Draft | v2 | N/A | And I should not see "v1" - And I open the action menu in "Policy1" "table_row" And "View previous versions" "link" should not exist And I log out @@ -154,7 +148,6 @@ Feature: Manage policies | Policy1 | v1 | full text2 | short text2 | draft | And I log in as "manager" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Edit" "link" in the "Policy1" "table_row" And I set the field "Version" to "v2" And I set the field "Active" to "1" @@ -163,7 +156,6 @@ Feature: Manage policies | Name | Policy status | Version | Agreements | | Policy1 Site policy, All users | Active | v2 | 0 of 4 (0%) | And I should not see "v1" - And I open the action menu in "Policy1" "table_row" And "View previous versions" "link" should not exist And I log out @@ -173,14 +165,12 @@ Feature: Manage policies | Policy1 | v1 | full text2 | short text2 | draft | And I log in as "manager" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Set status to \"Active\"" "link" in the "Policy1" "table_row" Then I should see "All users will be required to agree to this new policy version to be able to use the site." And I press "Continue" And the following should exist in the "tool-policy-managedocs-wrapper" table: | Name | Policy status | Version | Agreements | | Policy1 Site policy, All users | Active | v1 | 0 of 4 (0%) | - And I open the action menu in "Policy1" "table_row" And "View previous versions" "link" should not exist And I log out @@ -193,14 +183,12 @@ Feature: Manage policies And I set the field "I agree to the Policy1" to "1" And I press "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Set status to \"Inactive\"" "link" in the "Policy1" "table_row" Then I should see "You are about to inactivate policy" And I press "Continue" And the following should exist in the "tool-policy-managedocs-wrapper" table: | Name | Policy status | Version | Agreements | | Policy1 Site policy, All users | Inactive | v1 | 1 of 4 (25%) | - And I open the action menu in "Policy1" "table_row" And I click on "Create a new draft" "link" in the "Policy1" "table_row" And I set the field "Version" to "v2" And I set the field "Name" to "Policy2" @@ -216,7 +204,6 @@ Feature: Manage policies | Policy2 Site policy, All users | Draft | v2 | N/A | And I should not see "v1" And I should not see "Policy1" - And I open the action menu in "Policy2" "table_row" And I click on "View previous versions" "link" in the "Policy2" "table_row" And I should see "Policy2 previous versions" And the following should exist in the "tool-policy-managedocs-wrapper" table: @@ -234,10 +221,8 @@ Feature: Manage policies And I set the field "I agree to the Policy1" to "1" And I press "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration - And I open the action menu in "Policy1" "table_row" And I click on "Set status to \"Inactive\"" "link" in the "Policy1" "table_row" And I press "Continue" - And I open the action menu in "Policy1" "table_row" And I click on "Create a new draft" "link" in the "Policy1" "table_row" And I set the field "Version" to "v2" And I set the field "Name" to "Policy2" @@ -248,7 +233,6 @@ Feature: Manage policies | Policy2 Site policy, All users | Active | v2 | 0 of 4 (0%) | And I should not see "v1" And I should not see "Policy1" - And I open the action menu in "Policy2" "table_row" And I click on "View previous versions" "link" in the "Policy2" "table_row" And I should see "Policy2 previous versions" And the following should exist in the "tool-policy-managedocs-wrapper" table: diff --git a/admin/tool/usertours/tests/behat/tour_accessibility.feature b/admin/tool/usertours/tests/behat/tour_accessibility.feature index 4cfd3b599f4..8979ced877b 100644 --- a/admin/tool/usertours/tests/behat/tour_accessibility.feature +++ b/admin/tool/usertours/tests/behat/tour_accessibility.feature @@ -58,14 +58,14 @@ Feature: Apply accessibility to a tour When I press tab Then the focused element is ".usermenu" "css_element" When I press tab - Then the focused element is "Admin User" "link" in the ".usermenu" "css_element" + Then the focused element is "Admin User" "link_or_button" in the ".usermenu" "css_element" When I press tab And I press tab Then the focused element is ".close" "css_element" in the "User menu" "dialogue" # Press shift-tab twice should lead us back to "Admin user" link. When I press shift tab And I press shift tab - Then the focused element is "Admin User" "link" in the ".usermenu" "css_element" + Then the focused element is "Admin User" "link_or_button" in the ".usermenu" "css_element" @javascript Scenario: Aria tags should not exist diff --git a/course/tests/behat/course_category_management_listing.feature b/course/tests/behat/course_category_management_listing.feature index 26f28630b78..d9be1d173ed 100644 --- a/course/tests/behat/course_category_management_listing.feature +++ b/course/tests/behat/course_category_management_listing.feature @@ -34,7 +34,7 @@ Feature: Course category management interface performs as expected And I should not see "Course categories and courses" in the ".view-mode-selector .menu" "css_element" And I should not see "Course categories" in the ".view-mode-selector .menu" "css_element" And I should not see "Courses" in the ".view-mode-selector .menu" "css_element" - When I click on "Course categories" "link" in the ".view-mode-selector" "css_element" + And I open the action menu in ".view-mode-selector" "css_element" And I start watching to see if a new page loads Then I should see "Course categories and courses" in the ".view-mode-selector .menu" "css_element" And I should see "Course categories" in the ".view-mode-selector .menu" "css_element" @@ -55,7 +55,7 @@ Feature: Course category management interface performs as expected And I should see "Cat 1" in the "#course-listing h3" "css_element" And I should see "Cat 1" in the "#category-listing" "css_element" And I should see "Course 1" in the "#course-listing" "css_element" - When I click on "Course categories" "link" in the ".view-mode-selector" "css_element" + And I open the action menu in ".view-mode-selector" "css_element" Then I should see "Courses" in the ".view-mode-selector .menu" "css_element" And I click on "Courses" "link" in the ".view-mode-selector .menu" "css_element" And a new page should have loaded since I started watching @@ -315,7 +315,7 @@ Feature: Course category management interface performs as expected And a new page should have loaded since I started watching And I start watching to see if a new page loads And I should see the "Course categories and courses" management page - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I should see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" And I should see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" And I should see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" @@ -369,7 +369,7 @@ Feature: Course category management interface performs as expected And a new page should have loaded since I started watching And I start watching to see if a new page loads And I should see the "Course categories and courses" management page - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads @@ -386,7 +386,7 @@ Feature: Course category management interface performs as expected And I should see course listing "Course 10" before "Course 11" And I should see course listing "Course 11" before "Course 12" And "#course-listing .listing-pagination" "css_element" should not exist - And I click on "Per page: 20" "link" in the ".course-listing-actions" "css_element" + And I open the action menu in ".courses-per-page" "css_element" And I should see "5" in the ".courses-per-page" "css_element" And I should see "10" in the ".courses-per-page" "css_element" And I should see "20" in the ".courses-per-page" "css_element" @@ -558,7 +558,7 @@ Feature: Course category management interface performs as expected And I click on "Cat 1" "link" # Redirect. And I should see the "Course categories and courses" management page - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # Redirect. And I should see "Per page: 20" in the ".course-listing-actions" "css_element" @@ -625,7 +625,7 @@ Feature: Course category management interface performs as expected And a new page should have loaded since I started watching And I start watching to see if a new page loads And I should see the "Course categories and courses" management page - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads @@ -635,7 +635,7 @@ Feature: Course category management interface performs as expected And I should see course listing "Course 19" before "Course 20" And I should not see "Course 21" And I should see "Showing courses 1 to 20 of 32 courses" - And I click on "Per page: 20" "link" in the ".course-listing-actions" "css_element" + And I open the action menu in ".courses-per-page" "css_element" And I click on "100" "link" in the ".courses-per-page" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads @@ -646,7 +646,7 @@ Feature: Course category management interface performs as expected And I should see course listing "Course 21" before "Course 22" And I should see course listing "Course 31" before "Course 32" And "#course-listing .listing-pagination" "css_element" should not exist - And I click on "Per page: 100" "link" in the ".course-listing-actions" "css_element" + And I open the action menu in ".courses-per-page" "css_element" And I click on "5" "link" in the ".courses-per-page" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads diff --git a/course/tests/behat/course_change_visibility.feature b/course/tests/behat/course_change_visibility.feature index ea67b3439a1..6b5e96899f3 100644 --- a/course/tests/behat/course_change_visibility.feature +++ b/course/tests/behat/course_change_visibility.feature @@ -94,7 +94,7 @@ Feature: We can change the visibility of courses in the management interface. And course in management listing should be dimmed "C1" And I toggle visibility of category "CAT1" in management listing And I toggle visibility of course "C1" in management listing - And I click on "Course categories and courses" "link" in the ".view-mode-selector" "css_element" + And I open the action menu in ".view-mode-selector" "css_element" And I click on "Courses" "link" in the ".view-mode-selector" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads diff --git a/course/tests/behat/course_creation.feature b/course/tests/behat/course_creation.feature index 140fd3fcc18..cdf5ea81e80 100644 --- a/course/tests/behat/course_creation.feature +++ b/course/tests/behat/course_creation.feature @@ -54,7 +54,6 @@ Feature: Managers can create courses | id_enddate_year | 2016 | And I press "Save and return" Then I should see the "Course categories and courses" management page - And I click on "Sort courses" "link" And I click on "Sort by Course time created ascending" "link" in the ".course-listing-actions" "css_element" And I should see course listing "Course 1" before "Course 2" And I click on "Course 2" "link" in the "region-main" "region" diff --git a/course/tests/behat/course_resort.feature b/course/tests/behat/course_resort.feature index e8f9eb15bfd..54a52ecbc59 100644 --- a/course/tests/behat/course_resort.feature +++ b/course/tests/behat/course_resort.feature @@ -75,7 +75,7 @@ Feature: Test we can resort course in the management interface. And I should not see "Sort by Course ID number descending" in the ".course-listing-actions" "css_element" And I should not see "Sort by Course time created ascending" in the ".course-listing-actions" "css_element" And I should not see "Sort by Course time created descending" in the ".course-listing-actions" "css_element" - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I should see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" And I should see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" And I should see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" @@ -119,7 +119,7 @@ Feature: Test we can resort course in the management interface. And I should see the "Course categories and courses" management page And I should see "Course categories" in the "#category-listing h3" "css_element" And I should see "Cat 1" in the "#category-listing" "css_element" - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # Redirect. And I should see the "Course categories and courses" management page @@ -158,7 +158,7 @@ Feature: Test we can resort course in the management interface. And I should see the "Course categories and courses" management page And I should see "Course categories" in the "#category-listing h3" "css_element" And I should see "Cat 1" in the "#category-listing" "css_element" - And I click on "Sort courses" "link" + And I open the action menu in ".course-listing-actions" "css_element" And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads diff --git a/grade/tests/behat/grade_category_validation.feature b/grade/tests/behat/grade_category_validation.feature index 12f5e3f56b6..8a0d91d90ec 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -53,7 +53,6 @@ Feature: Editing a grade item And I press "Save changes" Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades - And I click on "Edit" "link" in the "EN Cat 1" "table_row" When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" Then I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" And I set the field "Grade type" to "Scale" @@ -62,7 +61,6 @@ Feature: Editing a grade item And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" And I should not see "You cannot change the type, as grades already exist for this item" - And I click on "Edit" "link" in the "EN Cat 1" "table_row" And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" And I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" And I set the field "Scale" to "EN Letter scale" @@ -75,14 +73,12 @@ Feature: Editing a grade item And I give the grade "20.00" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "EN Cat 1" "table_row" When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist Scenario: Attempting to change a category item's scale when overridden grades already exist - Given I click on "Edit" "link" in the "EN Cat 1" "table_row" - And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" + Given I click on "Edit settings" "link" in the "EN Cat 1" "table_row" And I set the field "Grade type" to "Scale" And I set the field "Scale" to "ABCDEF" And I press "Save changes" @@ -91,7 +87,6 @@ Feature: Editing a grade item And I give the grade "C" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "EN Cat 1" "table_row" When I click on "Edit settings" "link" in the "EN Cat 1" "table_row" Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type and scale cannot be changed." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist @@ -102,7 +97,6 @@ Feature: Editing a grade item And I give the grade "20.00" to the user "Student 1" for the grade item "EN Cat 1 total" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "EN Cat 1" "table_row" And I click on "Edit settings" "link" in the "EN Cat 1" "table_row" And I set the field "Maximum grade" to "50" When I press "Save changes" diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index 1ed3712b04f..874cd9b43c8 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -41,7 +41,6 @@ Feature: We can change the maximum and minimum number of points for manual items And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" And I press "Save changes" When I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "Manual item 1" "table_row" And I click on "Edit settings" "link" in the "Manual item 1" "table_row" And I set the following fields to these values: | Maximum grade | 10 | @@ -57,7 +56,6 @@ Feature: We can change the maximum and minimum number of points for manual items | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 8.00 | 80.00 % | And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "Manual item 1" "table_row" And I click on "Edit settings" "link" in the "Manual item 1" "table_row" And I set the following fields to these values: | Maximum grade | 20 | diff --git a/grade/tests/behat/grade_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index 67a63bc80b0..d2927d92b9c 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -38,16 +38,14 @@ Feature: Grade item validation And I press "Save changes" Scenario: Being able to change the grade type, scale and maximum grade for a manual grade item when there are no grades - Given I click on "Edit" "link" in the "EN MI 1" "table_row" - When I click on "Edit settings" "link" in the "EN MI 1" "table_row" - Then I should not see "Some grades have already been awarded, so the grade type" - And I set the field "Grade type" to "Scale" + Given I click on "Edit settings" "link" in the "EN MI 1" "table_row" + When I should not see "Some grades have already been awarded, so the grade type" + Then I set the field "Grade type" to "Scale" And I press "Save changes" And I should see "Scale must be selected" And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" And I should not see "You cannot change the type, as grades already exist for this item" - And I click on "Edit" "link" in the "MI 1" "table_row" And I click on "Edit settings" "link" in the "EN MI 1" "table_row" And I should not see "Some grades have already been awarded, so the grade type" And I set the field "Scale" to "EN Letter scale" @@ -60,14 +58,12 @@ Feature: Grade item validation And I give the grade "20.00" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "EN MI 1" "table_row" When I click on "Edit settings" "link" in the "EN MI 1" "table_row" Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist Scenario: Attempting to change a manual item's scale when grades already exist - Given I click on "Edit" "link" in the "EN MI 1" "table_row" - And I click on "Edit settings" "link" in the "EN MI 1" "table_row" + Given I click on "Edit settings" "link" in the "EN MI 1" "table_row" And I set the field "Grade type" to "Scale" And I set the field "Scale" to "EN ABCDEF" And I press "Save changes" @@ -76,7 +72,6 @@ Feature: Grade item validation And I give the grade "C" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "EN MI 1" "table_row" When I click on "Edit settings" "link" in the "EN MI 1" "table_row" Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed." And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist @@ -87,7 +82,6 @@ Feature: Grade item validation And I give the grade "20.00" to the user "Student 1" for the grade item "EN MI 1" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook - And I click on "Edit" "link" in the "MI 1" "table_row" And I click on "Edit settings" "link" in the "EN MI 1" "table_row" And I set the field "Maximum grade" to "50" When I press "Save changes" diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index 8a26b40519a..60cb90cbefb 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -91,7 +91,7 @@ Feature: Control the aggregation of the scales And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the field "Override weight of Grade me" to "1" Then the field "Override weight of Grade me" matches value "100.00" - And I click on "Edit" "link" in the "Scale me" "table_row" + And I open the action menu in "Scale me" "table_row" And I click on "Edit settings" "link" in the "Scale me" "table_row" And I follow "Show more..." And I should not see "Weight adjusted" @@ -104,7 +104,7 @@ Feature: Control the aggregation of the scales And the field "Override weight of Grade me" matches value "95.238" And I set the field "Override weight of Scale me" to "1" And the field "Override weight of Scale me" matches value "4.8" - And I click on "Edit" "link" in the "Scale me" "table_row" + And I open the action menu in "Scale me" "table_row" And I click on "Edit settings" "link" in the "Scale me" "table_row" And I follow "Show more..." And I should see "Weight adjusted" diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index ef863fa0ba6..b2deb53178a 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -51,7 +51,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Submitted for grading" "table_row" + And I open the action menu in "Submitted for grading" "table_row" And I click on "Grade" "link" in the "Submitted for grading" "table_row" And I should see "Page 1 of 3" And I click on ".navigate-next-button" "css_element" @@ -126,7 +126,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 2" "table_row" + And I open the action menu in "Student 2" "table_row" And I click on "Grade" "link" in the "Student 2" "table_row" And I wait for the complete PDF to load And I click on ".linebutton" "css_element" diff --git a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature index 4ad3042e454..e3a490cfdff 100644 --- a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature @@ -43,7 +43,7 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt. And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Submitted for grading" "table_row" + And I open the action menu in "Submitted for grading" "table_row" And I click on "Grade" "link" in the "Submitted for grading" "table_row" And I should see "Page 1 of 3" And I click on ".navigate-next-button" "css_element" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index 6456cddf541..b3d1615e3d5 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -34,14 +34,14 @@ Feature: In an assignment, the administrator can edit students' submissions And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | Have you seen the movie Chef? | And I press "Save changes" And I navigate to "View all submissions" in current page administration Then I should see "Have you seen the movie Chef?" - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | I have seen the movie chef. | diff --git a/mod/assign/tests/behat/grant_extension.feature b/mod/assign/tests/behat/grant_extension.feature index 90e1f0a7fca..2e8d6fc1acd 100644 --- a/mod/assign/tests/behat/grant_extension.feature +++ b/mod/assign/tests/behat/grant_extension.feature @@ -36,7 +36,7 @@ Feature: Grant an extension to an offline student And I am on "Course 1" course homepage And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Grant extension" And I should see "Student 1 (student1@example.com)" And I set the field "Enable" to "1" @@ -89,7 +89,7 @@ Feature: Grant an extension to an offline student And I am on "Course 1" course homepage And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Grant extension" And I should see "Student 1 (student1@example.com)" And I set the field "Enable" to "1" @@ -128,4 +128,4 @@ Feature: Grant an extension to an offline student And I set the following fields to these values: | extensionduedate[year] | 2013 | And I press "Save changes" - Then I should see "Extension date must be after the allow submissions from date" \ No newline at end of file + Then I should see "Extension date must be after the allow submissions from date" diff --git a/mod/assign/tests/behat/prevent_submission_changes.feature b/mod/assign/tests/behat/prevent_submission_changes.feature index 63297229269..feb4534bd4f 100644 --- a/mod/assign/tests/behat/prevent_submission_changes.feature +++ b/mod/assign/tests/behat/prevent_submission_changes.feature @@ -45,7 +45,7 @@ Feature: Prevent or allow assignment submission changes And I am on "Course 1" course homepage And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Prevent submission changes" Then I should see "Submission changes not allowed" And I log out @@ -59,7 +59,7 @@ Feature: Prevent or allow assignment submission changes And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Allow submission changes" And I should not see "Submission changes not allowed" And I log out diff --git a/mod/assign/tests/behat/reopen_locked_submission.feature b/mod/assign/tests/behat/reopen_locked_submission.feature index d84e5ee5b4b..8b75b438969 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -40,7 +40,7 @@ Feature: Submissions are unlocked when a new attempt is given And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Prevent submission changes" And I should see "Submission changes not allowed" And I click on "Quick grading" "checkbox" @@ -73,10 +73,10 @@ Feature: Submissions are unlocked when a new attempt is given And I am on "Course 1" course homepage And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Prevent submission changes" And I should see "Submission changes not allowed" - And I click on "Edit" "link" in the "Student 1" "table_row" + And I open the action menu in "Student 1" "table_row" And I follow "Allow another attempt" Then I should see "Reopened" And I should not see "Submission changes not allowed" diff --git a/mod/quiz/tests/behat/editing_repaginate.feature b/mod/quiz/tests/behat/editing_repaginate.feature index 5410cf7b29a..3fa35745c0b 100644 --- a/mod/quiz/tests/behat/editing_repaginate.feature +++ b/mod/quiz/tests/behat/editing_repaginate.feature @@ -30,7 +30,7 @@ Feature: Edit quiz page - pagination Then I should see "Editing quiz: Quiz 1" # Add the first Essay question. - And I click on "Add" "link" in the "region-main" "region" + And I open the action menu in ".page-add-actions" "css_element" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" @@ -42,7 +42,7 @@ Feature: Edit quiz page - pagination And I should see "Essay 01 new" on quiz page "1" # Add the second Essay question. - And I click on "Add" "link" in the "region-main" "region" + And I open the action menu in ".page-add-actions" "css_element" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" @@ -67,7 +67,7 @@ Feature: Edit quiz page - pagination And I should not see "Page 2" # Add the third Essay question. - And I click on "Add" "link" in the "region-main" "region" + And I open the action menu in ".page-add-actions" "css_element" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" diff --git a/mod/quiz/tests/behat/editing_section_headings.feature b/mod/quiz/tests/behat/editing_section_headings.feature index ebc7bcaebe8..a771b99eefa 100644 --- a/mod/quiz/tests/behat/editing_section_headings.feature +++ b/mod/quiz/tests/behat/editing_section_headings.feature @@ -349,17 +349,17 @@ Feature: Edit quiz page - section headings And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on the "Add" page break icon after question "TF1" - And I click on "Add" "link" in the "Page 1" "list_item" + And I open the action menu in "Page 1" "list_item" Then "a new section heading" "link" in the "Page 1" "list_item" should not be visible # Click away to close the menu. And I click on ".numberofquestions" "css_element" - And I click on "Add" "link" in the "Page 2" "list_item" + And I open the action menu in "Page 2" "list_item" And "a new section heading" "link" in the "Page 2" "list_item" should be visible And I click on ".numberofquestions" "css_element" - And I click on "Add" "link" in the "Page 3" "list_item" + And I open the action menu in "Page 3" "list_item" And "a new section heading" "link" in the "Page 3" "list_item" should be visible And I click on ".numberofquestions" "css_element" - And I click on "Add" "link" in the ".last-add-menu" "css_element" + And I open the action menu in ".last-add-menu" "css_element" And "a new section heading" "link" in the ".last-add-menu" "css_element" should not be visible @javascript