diff --git a/admin/tool/customlang/tests/behat/customisation_create.feature b/admin/tool/customlang/tests/behat/customisation_create.feature index 1d139473593..a473c0c58fb 100644 --- a/admin/tool/customlang/tests/behat/customisation_create.feature +++ b/admin/tool/customlang/tests/behat/customisation_create.feature @@ -14,20 +14,20 @@ Feature: Within a moodle instance, an administrator should be able to modify lan And I press "Open language pack for editing" And I press "Continue" And I set the field "Show strings of these components" to "moodle.php" - And I set the field "String identifier" to "administrationsite" + And I set the field "String identifier" to "moodledocslink" And I press "Show strings" - And I set the field "core/administrationsite" to "Custom string example" + And I set the field "core/moodledocslink" to "moodle documents" @javascript Scenario: Edit an string but don't save it to lang pack. When I press "Apply changes and continue editing" - Then I should see "Site administration" in the "page-header" "region" - And I should not see "Custom string example" in the "page-header" "region" + Then I should see "Help and documentation" in the ".helplink" "css_element" + And I should not see "moodle documents" in the ".helplink" "css_element" @javascript Scenario: Customize an string as admin and save it to lang pack. Given I press "Save changes to the language pack" And I should see "There are 1 modified strings." When I click on "Continue" "button" - Then I should see "Custom string example" in the "page-header" "region" - And I should not see "Site administration" in the "page-header" "region" + Then I should see "moodle documents" in the ".helplink" "css_element" + And I should not see "Help and documentation" in the ".helplink" "css_element" diff --git a/admin/tool/customlang/tests/behat/import_files.feature b/admin/tool/customlang/tests/behat/import_files.feature index 3d93dfec90f..68265a47d62 100644 --- a/admin/tool/customlang/tests/behat/import_files.feature +++ b/admin/tool/customlang/tests/behat/import_files.feature @@ -24,7 +24,7 @@ Feature: Within a moodle instance, an administrator should be able to import mod And I should see "There are 1 modified strings." And I click on "Save strings to language pack" "button" And I click on "Continue" "button" - And I should see "An amazing import feature" in the "page-header" "region" + And I should see "An amazing import feature" @javascript Scenario: Try to import a PHP file from a non existent component @@ -46,6 +46,6 @@ Feature: Within a moodle instance, an administrator should be able to import mod And I should see "There are 3 modified strings." And I click on "Save strings to language pack" "button" And I click on "Continue" "button" - And I should see "Uploaded custom string" in the "page-header" "region" - And I should see "Another Uploaded string" in the "page-header" "region" - And I should see "An amazing import feature" in the "page-header" "region" + And I should see "Uploaded custom string" + And I should see "Another Uploaded string" + And I should see "An amazing import feature" diff --git a/admin/tool/customlang/tests/behat/import_mode.feature b/admin/tool/customlang/tests/behat/import_mode.feature index e977237a5e8..2b0186acdbb 100644 --- a/admin/tool/customlang/tests/behat/import_mode.feature +++ b/admin/tool/customlang/tests/behat/import_mode.feature @@ -21,7 +21,7 @@ Feature: Within a moodle instance, an administrator should be able to import lan And I press "Save changes to the language pack" And I should see "There are 1 modified strings." And I click on "Continue" "button" - And I should see "Custom string example" in the "page-header" "region" + And I should see "Custom string example" @javascript Scenario: Update only customized strings @@ -36,12 +36,12 @@ Feature: Within a moodle instance, an administrator should be able to import lan And I should see "String core/nonexistentinvetedstring not found." And I click on "Continue" "button" And I should see "There are 1 modified strings." - And I should not see "Uploaded custom string" in the "page-header" "region" + And I should not see "Uploaded custom string" And I click on "Save strings to language pack" "button" And I click on "Continue" "button" - And I should not see "Custom string example" in the "page-header" "region" - And I should see "Uploaded custom string" in the "page-header" "region" - And I should not see "Another Uploaded string" in the "page-header" "region" + And I should not see "Custom string example" + And I should see "Uploaded custom string" + And I should not see "Another Uploaded string" @javascript Scenario: Create only new strings @@ -56,12 +56,12 @@ Feature: Within a moodle instance, an administrator should be able to import lan And I should see "String core/nonexistentinvetedstring not found." And I click on "Continue" "button" And I should see "There are 1 modified strings." - And I should not see "Uploaded custom string" in the "page-header" "region" + And I should not see "Uploaded custom string" And I click on "Save strings to language pack" "button" And I click on "Continue" "button" - And I should see "Custom string example" in the "page-header" "region" - And I should not see "Uploaded custom string" in the "page-header" "region" - And I should see "Another Uploaded string" in the "page-header" "region" + And I should see "Custom string example" + And I should not see "Uploaded custom string" + And I should see "Another Uploaded string" @javascript Scenario: Import all strings @@ -76,9 +76,9 @@ Feature: Within a moodle instance, an administrator should be able to import lan And I should see "String core/nonexistentinvetedstring not found." And I click on "Continue" "button" And I should see "There are 2 modified strings." - And I should not see "Uploaded custom string" in the "page-header" "region" + And I should not see "Uploaded custom string" And I click on "Save strings to language pack" "button" And I click on "Continue" "button" - And I should not see "Custom string example" in the "page-header" "region" - And I should see "Uploaded custom string" in the "page-header" "region" - And I should see "Another Uploaded string" in the "page-header" "region" + And I should not see "Custom string example" + And I should see "Uploaded custom string" + And I should see "Another Uploaded string" diff --git a/admin/tool/lp/tests/behat/plan_crud.feature b/admin/tool/lp/tests/behat/plan_crud.feature index 9f3dc075302..761a569fc87 100644 --- a/admin/tool/lp/tests/behat/plan_crud.feature +++ b/admin/tool/lp/tests/behat/plan_crud.feature @@ -56,7 +56,7 @@ Feature: Manage plearning plan And I set the field "Select cohorts to sync" to "cohort plan" When I click on "Add cohorts" "button" Then I should see "2 learning plans were created." - And I follow "Learning plan templates" + And I navigate to "Competencies > Learning plan templates" in site administration And I click on ".template-userplans" "css_element" in the "Science template cohort" "table_row" And I should see "Student 1" And I should see "Student 2" diff --git a/admin/tool/lp/tests/behat/plan_workflow.feature b/admin/tool/lp/tests/behat/plan_workflow.feature index 5410f2ab2e9..9d8f2eb39c1 100644 --- a/admin/tool/lp/tests/behat/plan_workflow.feature +++ b/admin/tool/lp/tests/behat/plan_workflow.feature @@ -149,7 +149,6 @@ Feature: Manage plan workflow And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" - And I follow "Learning plans" When I click on "Send back to draft" of edit menu in the "Test-Plan3" row And I follow "Test-Plan4" And I follow "Send back to draft" @@ -168,7 +167,6 @@ Feature: Manage plan workflow And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" - And I follow "Learning plans" When I click on "Complete this learning plan" of edit menu in the "Test-Plan3" row And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue" And I wait until the page is ready @@ -190,7 +188,6 @@ Feature: Manage plan workflow And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" - And I follow "Learning plans" When I click on "Reopen this learning plan" of edit menu in the "Test-Plan3" row And I click on "Reopen this learning plan" "button" in the "Confirm" "dialogue" And I follow "Test-Plan4" diff --git a/admin/tool/oauth2/tests/behat/basic_settings.feature b/admin/tool/oauth2/tests/behat/basic_settings.feature index beb669eab94..d2c402c436c 100644 --- a/admin/tool/oauth2/tests/behat/basic_settings.feature +++ b/admin/tool/oauth2/tests/behat/basic_settings.feature @@ -24,11 +24,11 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Testing service" "table_row" And I should see "https://accounts.google.com/.well-known/openid-configuration" in the "discovery_endpoint" "table_row" And I should see "authorization_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Testing service" "table_row" And I should see "firstname" in the "given_name" "table_row" And I should see "middlename" in the "middle_name" "table_row" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Testing service" "table_row" And I set the following fields to these values: | Name | Testing service modified | @@ -57,10 +57,10 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Testing service" "table_row" And I should see "authorization_endpoint" And I should not see "discovery_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Testing service" "table_row" And I should see "firstname" in the "givenName" "table_row" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Testing service" "table_row" And I set the following fields to these values: | Name | Testing service modified | @@ -89,10 +89,10 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Testing service" "table_row" And I should see "authorization_endpoint" And I should not see "discovery_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Testing service" "table_row" And I should see "firstname" in the "first_name" "table_row" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Testing service" "table_row" And I set the following fields to these values: | Name | Testing service modified | @@ -126,10 +126,10 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Testing service" "table_row" And I should see "authorization_endpoint" And I should not see "discovery_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Testing service" "table_row" And I should see "username" in the "ocs-data-id" "table_row" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Testing service" "table_row" And I set the following fields to these values: | Name | Testing service modified | @@ -159,11 +159,11 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Open Badges" "table_row" And I should see "https://dc.imsglobal.org/.well-known/badgeconnect.json" in the "discovery_endpoint" "table_row" And I should see "authorization_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Open Badges" "table_row" And I should not see "given_name" And I should not see "middle_name" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Open Badges" "table_row" And I set the following fields to these values: | Name | IMS Global | @@ -194,11 +194,11 @@ Feature: Basic OAuth2 functionality And I click on "Configure endpoints" "link" in the "Google custom" "table_row" And I should see "https://accounts.google.com/.well-known/openid-configuration" in the "discovery_endpoint" "table_row" And I should see "authorization_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Google custom" "table_row" And I should see "firstname" in the "given_name" "table_row" And I should see "middlename" in the "middle_name" "table_row" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Google custom" "table_row" And I set the following fields to these values: | Name | Google custom modified | @@ -227,11 +227,11 @@ Feature: Basic OAuth2 functionality And I should see "-" in the "Invalid custom service" "table_row" And I click on "Configure endpoints" "link" in the "Invalid custom service" "table_row" And I should not see "discovery_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Invalid custom service" "table_row" And I should not see "given_name" And I should not see "middle_name" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Invalid custom service" "table_row" And I set the following fields to these values: | Name | Valid custom service | @@ -268,11 +268,11 @@ Feature: Basic OAuth2 functionality And I should see "-" in the "Empty custom service" "table_row" And I click on "Configure endpoints" "link" in the "Empty custom service" "table_row" And I should not see "discovery_endpoint" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Configure user field mappings" "link" in the "Empty custom service" "table_row" And I should not see "given_name" And I should not see "middle_name" - And I follow "OAuth 2 services" + And I navigate to "Server > OAuth 2 services" in site administration And I click on "Edit" "link" in the "Empty custom service" "table_row" # Check it works as expected too without slash at the end of the service base URL. And I set the following fields to these values: diff --git a/analytics/tests/behat/manage_models.feature b/analytics/tests/behat/manage_models.feature index d68ed78e11b..d6b56f56695 100644 --- a/analytics/tests/behat/manage_models.feature +++ b/analytics/tests/behat/manage_models.feature @@ -93,7 +93,7 @@ Feature: Manage analytics models And I click on "View" "link" And I should see "Log extra info" And I click on "Close" "button" - And I click on "Analytics models" "link" + And I navigate to "Analytics > Analytics models" in site administration # Execute scheduled analysis And I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row" And I choose "Execute scheduled analysis" in the open action menu diff --git a/badges/tests/behat/add_badge.feature b/badges/tests/behat/add_badge.feature index bc7695df440..82d5c3b1ff9 100644 --- a/badges/tests/behat/add_badge.feature +++ b/badges/tests/behat/add_badge.feature @@ -44,7 +44,7 @@ Feature: Add badges to the system And I should see "Issuer details" And I should see "Test Badge Site" And I should see "testuser@example.com" - And I follow "Manage badges" + And I navigate to "Badges > Manage badges" in site administration And I should see "Number of badges available: 1" And I should not see "There are no badges available." @@ -61,7 +61,7 @@ Feature: Add badges to the system And I upload "badges/tests/behat/badge.png" file to "Image" filemanager And I press "Create badge" And I wait until the page is ready - And I follow "Manage badges" + And I navigate to "Badges > Manage badges" in site administration And I should see "Number of badges available: 1" And I press "Add a new badge" And I set the following fields to these values: @@ -157,7 +157,7 @@ Feature: Add badges to the system And I should see "Related badges (0)" And I should see "Alignments (0)" And I should not see "Create badge" - And I follow "Manage badges" + And I navigate to "Badges > Manage badges" in site administration And I should see "Number of badges available: 1" And I should not see "There are no badges available." # See buttons from the "Site badges" page. diff --git a/badges/tests/behat/award_badge.feature b/badges/tests/behat/award_badge.feature index 7324e75c31f..b25de058730 100644 --- a/badges/tests/behat/award_badge.feature +++ b/badges/tests/behat/award_badge.feature @@ -21,7 +21,6 @@ Feature: Award badges And I am on "Course 1" course homepage # Create course badge 1. And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 1 | | Description | Course badge 1 description | @@ -38,7 +37,6 @@ Feature: Award badges # Badge #2 And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 2 | | Description | Course badge 2 description | @@ -57,6 +55,7 @@ Feature: Award badges # Award course badge 1 to student 1. And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge 1" And I follow "Recipients (1)" Then I should see "Recipients (1)" @@ -149,6 +148,7 @@ Feature: Award badges And I press "Award badge" And I set the field "potentialrecipients[]" to "student 1 (student1@example.com)" And I press "Award badge" + And I navigate to "Badges > Manage badges" in site administration When I follow "Site Badge" Then I should see "Recipients (2)" And I log out @@ -174,7 +174,6 @@ Feature: Award badges And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -191,6 +190,7 @@ Feature: Award badges And I press "Award badge" And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge" Then I should see "Recipients (2)" And I log out @@ -225,7 +225,6 @@ Feature: Award badges | id_completion | 1 | And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -279,7 +278,6 @@ Feature: Award badges And I press "Save changes" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -328,7 +326,6 @@ Feature: Award badges And I am on "Course 1" course homepage # Create course badge 1. And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 1 | | Description | Course badge description | @@ -347,13 +344,13 @@ Feature: Award badges # Award course badge 1 to student 1. And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge 1" And I follow "Recipients (1)" Then I should see "Recipients (1)" # Add course badge 2. And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 2 | | Description | Course badge description | @@ -372,6 +369,7 @@ Feature: Award badges # Award course badge 2 to student 2. And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)" When I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge 2" And I follow "Recipients (1)" Then I should see "Recipients (1)" @@ -409,7 +407,6 @@ Feature: Award badges And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -426,6 +423,7 @@ Feature: Award badges And I press "Award badge" And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge" Then I should see "Recipients (2)" And I follow "Recipients (2)" @@ -434,5 +432,6 @@ Feature: Award badges And I press "Revoke badge" And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)" When I press "Revoke badge" + And I follow "Manage badges" And I follow "Course Badge" Then I should see "Recipients (0)" diff --git a/badges/tests/behat/award_badge_groups.feature b/badges/tests/behat/award_badge_groups.feature index 76b29b689e3..2596b26dd4c 100644 --- a/badges/tests/behat/award_badge_groups.feature +++ b/badges/tests/behat/award_badge_groups.feature @@ -37,7 +37,6 @@ Feature: Award badges with separate groups And I set the field "Group mode" to "Separate groups" And I press "Save and display" And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -59,7 +58,6 @@ Feature: Award badges with separate groups When I log in as "teacher2" And I am on "Course 1" course homepage And I navigate to "Badges > Manage badges" in current page administration - And I follow "Manage badges" And I follow "Course Badge" And I press "Award badge" And I set the field "role" to "Non-editing teacher" @@ -71,6 +69,7 @@ Feature: Award badges with separate groups # Non-editing teacher can award the badge And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)" And I press "Award badge" + And I follow "Manage badges" And I follow "Course Badge" And I should see "Recipients (1)" And I log out @@ -85,7 +84,6 @@ Feature: Award badges with separate groups 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 "Groups" And I set the field "groups" to "Class B (2)" And I press "Add/remove users" And I set the field "addselect" to "Teacher 2 (teacher2@example.com)" @@ -94,7 +92,6 @@ Feature: Award badges with separate groups When I log in as "teacher2" And I am on "Course 1" course homepage And I navigate to "Badges > Manage badges" in current page administration - And I follow "Manage badges" And I follow "Course Badge" And I press "Award badge" And I set the field "role" to "Non-editing teacher" @@ -112,7 +109,6 @@ Feature: Award badges with separate groups 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 "Groups" And I set the field "groups" to "Class A (2)" And I press "Add/remove users" And I set the field "removeselect" to "Teacher 2 (teacher2@example.com)" @@ -122,7 +118,6 @@ Feature: Award badges with separate groups When I log in as "teacher2" And I am on "Course 1" course homepage And I navigate to "Badges > Manage badges" in current page administration - And I follow "Manage badges" And I follow "Course Badge" And I press "Award badge" # Teacher 2 shouldn't be able to go further diff --git a/badges/tests/behat/criteria_activity.feature b/badges/tests/behat/criteria_activity.feature index 42b16f33c1c..93911ff5715 100644 --- a/badges/tests/behat/criteria_activity.feature +++ b/badges/tests/behat/criteria_activity.feature @@ -36,7 +36,6 @@ Feature: Award badges based on activity completion And I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | diff --git a/badges/tests/behat/criteria_cohort.feature b/badges/tests/behat/criteria_cohort.feature index e0578debdf7..32d2625e0af 100644 --- a/badges/tests/behat/criteria_cohort.feature +++ b/badges/tests/behat/criteria_cohort.feature @@ -152,6 +152,7 @@ Feature: Award badges based on cohort And I press "Award badge" And I set the field "potentialrecipients[]" to "Second User (second@example.com)" And I press "Award badge" + And I navigate to "Badges > Manage badges" in site administration And I follow "Site Badge" Then I should see "Recipients (1)" And I log out @@ -203,6 +204,7 @@ Feature: Award badges based on cohort And I press "Award badge" And I set the field "potentialrecipients[]" to "Second User (second@example.com)" And I press "Award badge" + And I navigate to "Badges > Manage badges" in site administration And I follow "Site Badge" Then I should see "Recipients (2)" And I log out @@ -259,6 +261,7 @@ Feature: Award badges based on cohort And I press "Award badge" And I set the field "potentialrecipients[]" to "Second User (second@example.com)" And I press "Award badge" + And I navigate to "Badges > Manage badges" in site administration And I follow "Site Badge" Then I should see "Recipients (2)" And I log out @@ -317,6 +320,7 @@ Feature: Award badges based on cohort And I press "Award badge" And I set the field "potentialrecipients[]" to "Second User (second@example.com)" And I press "Award badge" + And I navigate to "Badges > Manage badges" in site administration And I follow "Site Badge" Then I should see "Recipients (1)" And I log out diff --git a/badges/tests/behat/criteria_competency.feature b/badges/tests/behat/criteria_competency.feature index 0945c09ae58..77bac3fe102 100644 --- a/badges/tests/behat/criteria_competency.feature +++ b/badges/tests/behat/criteria_competency.feature @@ -40,7 +40,6 @@ Feature: Award badges based on competency completion # Add a badge to the course And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | diff --git a/badges/tests/behat/role_visibility.feature b/badges/tests/behat/role_visibility.feature index 036ff5d060b..4d46e8f7f10 100644 --- a/badges/tests/behat/role_visibility.feature +++ b/badges/tests/behat/role_visibility.feature @@ -22,7 +22,6 @@ Feature: Test role visibility for the badge administration page Given I log in as "manager1" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | @@ -37,7 +36,6 @@ Feature: Test role visibility for the badge administration page Given I log in as "teacher1" And I am on "Course 1" course homepage And I navigate to "Badges > Add a new badge" in current page administration - And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | | Description | Course badge description | diff --git a/cohort/tests/behat/add_cohort.feature b/cohort/tests/behat/add_cohort.feature index 0d28abfa8a8..7ba866d8588 100644 --- a/cohort/tests/behat/add_cohort.feature +++ b/cohort/tests/behat/add_cohort.feature @@ -33,6 +33,10 @@ Feature: Add cohorts of users Then the following should exist in the "generaltable" table: | Name | Cohort ID | Description | | My new cohort | mynewcohort | My new cohort is cool | + And I should see "Test cohort name" + And I should see "333" + And I should see "Test cohort description" + And I should see "Created manually" @javascript Scenario: Add users to a cohort selecting them from the system users list @@ -76,8 +80,7 @@ Feature: Add cohorts of users @javascript Scenario: Add users to a cohort using a bulk user action - When I follow "Accounts" - And I follow "Bulk user actions" + When I navigate to "Users > Accounts > Bulk user actions" in site administration And I set the field "Available" to "Third User" And I press "Add to selection" And I set the field "Available" to "Forth User" @@ -86,8 +89,7 @@ Feature: Add cohorts of users And I press "Go" And I set the field "Cohort" to "Test cohort name [333]" And I press "Add to cohort" - And I follow "Accounts" - And I follow "Cohorts" + And I navigate to "Users > Accounts > Cohorts" in site administration Then I should see "2" in the "#cohorts" "css_element" And I click on "Assign" "link" in the "Test cohort name" "table_row" And the "Current users" select box should contain "Third User (third@example.com)" @@ -96,9 +98,9 @@ Feature: Add cohorts of users @javascript Scenario: Edit cohort name in-place - When I follow "Cohorts" + When I navigate to "Users > Accounts > Cohorts" in site administration And I set the field "Edit cohort name" to "Students cohort" Then I should not see "Test cohort name" And I should see "Students cohort" - And I follow "Cohorts" + And I navigate to "Users > Accounts > Cohorts" in site administration And I should see "Students cohort" diff --git a/course/tests/behat/course_browsing.feature b/course/tests/behat/course_browsing.feature index 4993d076e20..586859d2a3c 100644 --- a/course/tests/behat/course_browsing.feature +++ b/course/tests/behat/course_browsing.feature @@ -91,7 +91,7 @@ Feature: Restricting access to course lists And I should see "Biology" And I should not see "Humanities" And I click on "Courses" "link" in the "Navigation" "block" - And "category" "text" should not exist in the ".breadcrumb" "css_element" + # And "category" "text" should not exist in the ".breadcrumb" "css_element" And I should see "Science category" And I should see "English category" And I should not see "Other category" diff --git a/course/tests/behat/course_controls.feature b/course/tests/behat/course_controls.feature index e51d1807df9..a571bf6ad3d 100644 --- a/course/tests/behat/course_controls.feature +++ b/course/tests/behat/course_controls.feature @@ -81,12 +81,12 @@ Feature: Course activity controls works as expected Examples: | courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage | - | topics | 0 | "Course 1" | should | should | "Topic 2" | + | topics | 0 | "C1" | should | should | "Topic 2" | | topics | 1 | "Topic 1" | should not | should not | "Topic 2" | - | topics | 1 | "Course 1" | should | should not | "Topic 2" | - | weeks | 0 | "Course 1" | should | should | "8 January - 14 January" | + | topics | 1 | "C1" | should | should not | "Topic 2" | + | weeks | 0 | "C1" | should | should | "8 January - 14 January" | | weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" | - | weeks | 1 | "Course 1" | should | should not | "8 January - 14 January" | + | weeks | 1 | "C1" | should | should not | "8 January - 14 January" | Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected Given the following "users" exist: @@ -146,9 +146,9 @@ Feature: Course activity controls works as expected Examples: | courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage | - | topics | 0 | "Course 1" | should | should | "Topic 2" | + | topics | 0 | "C1" | should | should | "Topic 2" | | topics | 1 | "Topic 1" | should not | should not | "Topic 2" | - | topics | 1 | "Course 1" | should | should not | "Topic 2" | - | weeks | 0 | "Course 1" | should | should | "8 January - 14 January" | + | topics | 1 | "C1" | should | should not | "Topic 2" | + | weeks | 0 | "C1" | should | should | "8 January - 14 January" | | weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" | - | weeks | 1 | "Course 1" | should | should not | "8 January - 14 January" | + | weeks | 1 | "C1" | should | should not | "8 January - 14 January" | diff --git a/course/tests/behat/edit_settings.feature b/course/tests/behat/edit_settings.feature index 4d46d50d61f..59c801af74e 100644 --- a/course/tests/behat/edit_settings.feature +++ b/course/tests/behat/edit_settings.feature @@ -23,7 +23,6 @@ Feature: Edit course settings | Course short name | Edited course shortname | | Course summary | Edited course summary | And I press "Save and display" - And I follow "Edited course fullname" Then I should not see "Course 1" And I should not see "C1" And I should see "Edited course fullname" diff --git a/mod/assign/tests/behat/submission_comments.feature b/mod/assign/tests/behat/submission_comments.feature index 09f1da1ff65..261521c0e61 100644 --- a/mod/assign/tests/behat/submission_comments.feature +++ b/mod/assign/tests/behat/submission_comments.feature @@ -40,7 +40,7 @@ Feature: In an assignment, students can comment in their submissions And I follow "Save comment" And I should see "Second student comment" And I should not see "First student comment" - And I follow "Test assignment name" + And I reload the page And I click on ".comment-link" "css_element" And I should see "Second student comment" And I should not see "First student comment" diff --git a/mod/book/tests/behat/reorganize_chapters.feature b/mod/book/tests/behat/reorganize_chapters.feature index be0c0883248..4a4601b4921 100644 --- a/mod/book/tests/behat/reorganize_chapters.feature +++ b/mod/book/tests/behat/reorganize_chapters.feature @@ -51,7 +51,8 @@ Feature: In a book, chapters and subchapters can be rearranged Scenario: Moving chapters down rearranges them properly Given I click on "Move chapter down \"1. Originally first chapter\"" "link" - When I follow "Test book" + When I am on "Course 1" course homepage + And I follow "Test book" Then I should see "1. A great second chapter" And I should see "#2 chapter content" And I should see "1.1. Second chapter, subchapter 1" @@ -61,7 +62,8 @@ Feature: In a book, chapters and subchapters can be rearranged Scenario: Moving chapters up rearranges them properly Given I click on "Move chapter up \"3. There aren't 2 without 3\"" "link" - When I follow "Test book" + When I am on "Course 1" course homepage + And I follow "Test book" Then I should see "1. Originally first chapter" And I should see "#1 chapter content" And I should see "2. There aren't 2 without 3" @@ -71,30 +73,26 @@ Feature: In a book, chapters and subchapters can be rearranged Scenario: Moving subchapters down within chapter rearranges them properly Given I click on "Move chapter down \"2.1. Second chapter, subchapter 1\"" "link" - When I follow "Test book" - Then I should see "2.1. Second chapter, subchapter 2" - And I should see "2.2. Second chapter, subchapter 1" + When I should see "2.1. Second chapter, subchapter 2" + Then I should see "2.2. Second chapter, subchapter 1" Scenario: Moving subchapters down out of chapter rearranges them properly Given I click on "Move chapter down \"2.2. Second chapter, subchapter 2\"" "link" - When I follow "Test book" - Then I should see "3.1. Second chapter, subchapter 2" - And I click on "Move chapter down \"3. There aren't 2 without 3\"" "link" + When I should see "3.1. Second chapter, subchapter 2" + Then I click on "Move chapter down \"3. There aren't 2 without 3\"" "link" And I should not see "4. There aren't 2 without 3" And I should see "3. There aren't 2 without 3" And I should see "3.1. Second chapter, subchapter 2" Scenario: Moving subchapters up within chapter rearranges them properly Given I click on "Move chapter up \"2.2. Second chapter, subchapter 2\"" "link" - When I follow "Test book" - Then I should see "2.1. Second chapter, subchapter 2" - And I should see "2.2. Second chapter, subchapter 1" + When I should see "2.1. Second chapter, subchapter 2" + Then I should see "2.2. Second chapter, subchapter 1" Scenario: Moving subchapters up out of chapter rearranges them properly Given I click on "Move chapter up \"2.1. Second chapter, subchapter 1\"" "link" - When I follow "Test book" - Then I should see "1.1. Second chapter, subchapter 1" - And I click on "Move chapter up \"1.1. Second chapter, subchapter 1\"" "link" + When I should see "1.1. Second chapter, subchapter 1" + Then I click on "Move chapter up \"1.1. Second chapter, subchapter 1\"" "link" And I should not see "1.1. Second chapter, subchapter 1" And I should see "1. Second chapter, subchapter 1" And I should see "2. Originally first chapter" diff --git a/mod/forum/tests/behat/discussion_subscriptions.feature b/mod/forum/tests/behat/discussion_subscriptions.feature index 8bf50661194..fc8e8ba3a67 100644 --- a/mod/forum/tests/behat/discussion_subscriptions.feature +++ b/mod/forum/tests/behat/discussion_subscriptions.feature @@ -341,7 +341,6 @@ Feature: A user can control their own subscription preferences for a discussion And I follow "You are not subscribed to this discussion. Click to subscribe" And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" And "Unsubscribe from this discussion" "checkbox" should exist in the "Test post subject one" "table_row" - And I follow "Test forum name" And I navigate to "Subscribe to this forum" in current page administration And I should see "Student One will be notified of new posts in 'Test forum name'" And "Unsubscribe from this forum" "link" should exist in current page administration diff --git a/mod/forum/tests/behat/edit_post_teacher.feature b/mod/forum/tests/behat/edit_post_teacher.feature index 4875a8d648c..6a9ec280d7e 100644 --- a/mod/forum/tests/behat/edit_post_teacher.feature +++ b/mod/forum/tests/behat/edit_post_teacher.feature @@ -57,6 +57,7 @@ Feature: Teachers can edit or delete any forum post And I should see "Edited by Teacher 1 - original submission" Scenario: A student can't edit or delete another user's posts - When I follow "Teacher post subject" + When I follow "Test forum name" + And I follow "Teacher post subject" Then I should not see "Edit" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" And I should not see "Delete" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" diff --git a/mod/forum/tests/behat/private_replies.feature b/mod/forum/tests/behat/private_replies.feature index eb2d8eda5ab..364dc3d7fd6 100644 --- a/mod/forum/tests/behat/private_replies.feature +++ b/mod/forum/tests/behat/private_replies.feature @@ -36,7 +36,8 @@ Feature: Forum posts can be replied to in private | Reply privately | 1 | Scenario: As a teacher I can see my own response - Given I follow "Answers to the homework" + Given I follow "Study discussions" + And I follow "Answers to the homework" Then I should see "How about you and I have a meeting after class about plagiarism?" Scenario: As a fellow teacher I can see the other teacher's response diff --git a/mod/lesson/tests/behat/lesson_student_resume.feature b/mod/lesson/tests/behat/lesson_student_resume.feature index e3d8c4185e0..8e207dfedcb 100644 --- a/mod/lesson/tests/behat/lesson_student_resume.feature +++ b/mod/lesson/tests/behat/lesson_student_resume.feature @@ -89,6 +89,7 @@ Feature: In a lesson activity a student should And I should see "Second page contents" And I press "Next page" And I should see "Third page contents" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" @@ -98,6 +99,7 @@ Feature: In a lesson activity a student should And I wait "1" seconds And I press "Next page" And I should see "Paper is made from trees." + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" @@ -108,6 +110,7 @@ Feature: In a lesson activity a student should And I press "Submit" And I press "Continue" And I should see "Kermit is a frog" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" @@ -165,6 +168,7 @@ Feature: In a lesson activity a student should And I wait "1" seconds And I press "Next page" And I should see "Third page contents" + And I am on "Course 1" course homepage And I follow "Test lesson name" Then I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" @@ -286,6 +290,7 @@ Feature: In a lesson activity a student should And I press "Submit" And I press "Continue" And I should see "2+2=4" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "You have seen more than one page of this lesson already." Then I should see "Do you want to start at the last page you saw?" @@ -298,6 +303,7 @@ Feature: In a lesson activity a student should And I press "Submit" And I press "Continue" And I should see "Second content page" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" @@ -399,6 +405,7 @@ Feature: In a lesson activity a student should And I press "Submit" And I press "Continue" And I should see "2+2=4" + And I am on "Course 1" course homepage And I follow "Test lesson name" Then I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" diff --git a/mod/lti/tests/behat/backup_restore.feature b/mod/lti/tests/behat/backup_restore.feature index 7ae20306771..9da97b66c9d 100644 --- a/mod/lti/tests/behat/backup_restore.feature +++ b/mod/lti/tests/behat/backup_restore.feature @@ -27,13 +27,12 @@ Feature: Restoring Moodle 2 backup restores LTI configuration And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And "This tool has not yet been used" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element" And I am on site homepage - And I follow "Course 1" + And I am on "Course 1" course homepage And I turn editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | My LTI module | | Preconfigured tool | My site tool | | Launch container | Embed | - And I follow "Course 1" And I should see "My LTI module" And I backup "Course 1" course using this options: | Confirmation | Filename | test_backup.mbz | diff --git a/tag/tests/behat/collections.feature b/tag/tests/behat/collections.feature index 50bdd8bf9cb..a1deb030b3e 100644 --- a/tag/tests/behat/collections.feature +++ b/tag/tests/behat/collections.feature @@ -86,7 +86,7 @@ Feature: Managers can create and manage tag collections And I should see "Tag3" And I should not see "Tag1" And I should not see "Tag2" - And I follow "Manage tags" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" # Tag "Swimming" was not standard and was moved completely. And I should not see "Swimming" diff --git a/tag/tests/behat/delete_tag.feature b/tag/tests/behat/delete_tag.feature index 18eb048f16a..b29b1469ac8 100644 --- a/tag/tests/behat/delete_tag.feature +++ b/tag/tests/behat/delete_tag.feature @@ -61,6 +61,7 @@ Feature: Manager is able to delete tags And I press "Yes" And I should see "Tag(s) deleted" And I should not see "Dog" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should not see "Dog" And I follow "Cat" @@ -94,6 +95,7 @@ Feature: Manager is able to delete tags And I should see "Tag(s) deleted" And I should not see "Dog" And I should not see "Neverusedtag" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should not see "Dog" And I should not see "Neverusedtag" diff --git a/tag/tests/behat/edit_tag.feature b/tag/tests/behat/edit_tag.feature index c3bc35e51ec..21fd143a93e 100644 --- a/tag/tests/behat/edit_tag.feature +++ b/tag/tests/behat/edit_tag.feature @@ -123,7 +123,6 @@ Feature: Users can edit tags to add description or rename | Related tags | Dog, Turtle,Fish | | Standard | 0 | And I press "Update" - Then "Default collection" "link" should exist in the ".breadcrumb" "css_element" And I follow "Kitten" And "Description of tag 1" "text" should exist in the ".tag-description" "css_element" And I should see "Related tags:" in the ".tag_list" "css_element" @@ -143,12 +142,10 @@ Feature: Users can edit tags to add description or rename And I set the following fields to these values: | Tag name | Kitten | And I press "Update" - Then "Default collection" "text" should exist in the ".breadcrumb" "css_element" And I click on "Edit this tag" "link" in the "Kitten" "table_row" And I set the following fields to these values: | Tag name | KITTEN | And I press "Update" - And "Default collection" "text" should exist in the ".breadcrumb" "css_element" And I should see "KITTEN" And I should not see "Kitten" @@ -161,6 +158,7 @@ Feature: Users can edit tags to add description or rename And I set the field "Edit tag name" in the "Cat" "table_row" to "Kitten" Then I should not see "Cat" And "New name for tag" "field" should not exist + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should see "Kitten" And I should not see "Cat" @@ -172,6 +170,7 @@ Feature: Users can edit tags to add description or rename And I should see "Turtle" And I should see "Dog" And I should not see "DOG" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should see "Turtle" And I should see "Dog" @@ -183,6 +182,7 @@ Feature: Users can edit tags to add description or rename And "New name for tag" "field" should not exist And I should see "Turtle" And I should not see "Penguin" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should see "Turtle" And I should not see "Penguin" diff --git a/tag/tests/behat/flag_tags.feature b/tag/tests/behat/flag_tags.feature index 7eda63891eb..b9fade17cf9 100644 --- a/tag/tests/behat/flag_tags.feature +++ b/tag/tests/behat/flag_tags.feature @@ -78,6 +78,7 @@ Feature: Users can flag tags and manager can reset flags And "(1)" "text" should exist in the "//tr[contains(.,'Nicetag')]//td[contains(@class,'col-flag')]" "xpath_element" And "(" "text" should not exist in the "//tr[contains(.,'Badtag')]//td[contains(@class,'col-flag')]" "xpath_element" And "(" "text" should not exist in the "//tr[contains(.,'Neverusedtag')]//td[contains(@class,'col-flag')]" "xpath_element" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And "Nicetag" "link" should appear before "Sweartag" "link" And "Sweartag" "link" should appear before "Badtag" "link" diff --git a/tag/tests/behat/standard_tags.feature b/tag/tests/behat/standard_tags.feature index ef06919ff1a..dbc7e98bb0f 100644 --- a/tag/tests/behat/standard_tags.feature +++ b/tag/tests/behat/standard_tags.feature @@ -63,6 +63,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags And "Remove from standard tags" "link" should exist in the "Tag1" "table_row" And "Make standard" "link" should exist in the "Tag2" "table_row" And "Make standard" "link" should exist in the "Tag3" "table_row" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And "Make standard" "link" should exist in the "Tag0" "table_row" And "Remove from standard tags" "link" should exist in the "Tag1" "table_row"