diff --git a/admin/tests/behat/display_short_names.feature b/admin/tests/behat/display_short_names.feature index 864b73379c5..1a128ca9d1e 100644 --- a/admin/tests/behat/display_short_names.feature +++ b/admin/tests/behat/display_short_names.feature @@ -16,8 +16,7 @@ Feature: Display extended course names And I should not see "C_shortname Course fullname" Scenario: Courses list with extended course names - Given I expand "Site administration" node - And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element" + Given I navigate to "Appearance > Courses" in site administration And I set the field "Display extended course names" to "1" When I press "Save changes" And I am on site homepage diff --git a/admin/tests/behat/filter_users.feature b/admin/tests/behat/filter_users.feature index f8b930dd822..b9a03e5ee7b 100644 --- a/admin/tests/behat/filter_users.feature +++ b/admin/tests/behat/filter_users.feature @@ -25,7 +25,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro And I log in as "admin" And I add "User Two (two@example.com)" user to "CH1" cohort members And I add "User Three (three@example.com)" user to "CH1" cohort members - And I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration Scenario: Filter user accounts by role and cohort When I set the following fields to these values: diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 051dd86ca23..e4715183fa7 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -59,8 +59,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" And I follow "Groupings" @@ -90,8 +89,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Permissions" + And I navigate to "Users > Permissions" in current page administration And I set the field "Advanced role override" to "Student (1)" Then "mod/forum:editanypost" capability has "Allow" permission And I press "Cancel" @@ -134,30 +132,31 @@ Feature: Set up contextual data for tests And the following "course enrolments" exist: | user | course | role | | user4 | C1 | custom1 | + | user2 | C1 | student | + | user3 | C1 | editingteacher | And the following "role assigns" exist: | user | role | contextlevel | reference | | user1 | manager | System | | | user2 | editingteacher | Category | CAT1 | - | user3 | editingteacher | Course | C1 | | user5 | custom2 | System | | When I log in as "user1" And I am on site homepage - Then I should see "Front page settings" + Then "Edit settings" "link" should exist in current page administration And I log out And I log in as "user2" And I am on site homepage And I follow "Course 1" - And I should see "Turn editing on" + And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user3" And I am on site homepage And I follow "Course 1" - And I should see "Turn editing on" + And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user4" And I am on site homepage And I follow "Course 1" - And I should see "Turn editing on" + And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user5" And I should see "You are logged in as" @@ -264,8 +263,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration Then the "groups" select box should contain "Group 1 (1)" And the "groups" select box should contain "Group 2 (1)" And I set the field "groups" to "Group 1 (1)" @@ -302,7 +300,7 @@ Feature: Set up contextual data for tests | System cohort A | 1 | | System cohort B | 2 | And I should not see "Cohort in category" - And I follow "Courses" + And I am on course index And I follow "Cat 1" And I follow "Cohorts" And I should not see "System cohort" @@ -322,8 +320,7 @@ Feature: Set up contextual data for tests | fullname | course | gradecategory | | Grade sub category 2 | C1 | Grade category 1 | When I log in as "admin" - And I am on site homepage - And I follow "Courses" + And I am on course index And I follow "Course 1" And I go to "View > Grader report" in the course gradebook Then I should see "Grade category 1" diff --git a/admin/tool/behat/tests/behat/edit_permissions.feature b/admin/tool/behat/tests/behat/edit_permissions.feature index b07c1218bcb..c0e7cc045f6 100644 --- a/admin/tool/behat/tests/behat/edit_permissions.feature +++ b/admin/tool/behat/tests/behat/edit_permissions.feature @@ -32,8 +32,7 @@ Feature: Edit capabilities Scenario: Course capabilities overrides Given I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Permissions" + And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Student" role with: | mod/forum:deleteanypost | Prohibit | | mod/forum:editanypost | Prevent | @@ -52,7 +51,7 @@ Feature: Edit capabilities | Forum name | I'm the name | | Description | I'm the introduction | And I follow "I'm the name" - And I navigate to "Permissions" node in "Forum administration" + And I navigate to "Permissions" in current page administration And I override the system permissions of "Student" role with: | mod/forum:deleteanypost | Prohibit | | mod/forum:editanypost | Prevent | diff --git a/admin/tool/behat/tests/behat/get_and_set_fields.feature b/admin/tool/behat/tests/behat/get_and_set_fields.feature index b867c582c51..f9ac3a15070 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -33,8 +33,6 @@ Feature: Verify that all form fields values can be get and set | activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible | | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | And I log in as "admin" - And I expand "Site administration" node - And I expand "Appearance" node And I am on site homepage And I follow "Course 1" And I navigate to "Reset" node in "Course administration" @@ -60,9 +58,8 @@ Feature: Verify that all form fields values can be get and set | HTML format | Student page contents | And I press "Save" Then I should see "Student page contents" in the "region-main" "region" - And I click on "Edit" "link" in the "Administration" "block" # Select (multi-select) - Checking "I set the field". - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets # Checkbox - Checking "I set the field". And I set the field "Display description on course page" to "1" @@ -75,7 +72,7 @@ Feature: Verify that all form fields values can be get and set And I press "Save and return to course" And I should see "Test this one" And I follow "Test this one" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration # Checkbox - Checking "the field matches value" and "the following fields match these values". And the following fields match these values: | Display description on course page | 1 | @@ -91,7 +88,7 @@ Feature: Verify that all form fields values can be get and set # Select (simple) - Checking "I set the field". And I set the field "Group mode" to "Separate groups" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And the following fields match these values: | Default format | NWiki | | Group mode | Separate groups | @@ -134,8 +131,7 @@ Feature: Verify that all form fields values can be get and set @javascript Scenario: with JS enabled all form fields getters and setters works as expected Then I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration # Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain". And I set the field "groups" to "Group 2" And the "members" select box should contain "Student 2" @@ -158,7 +154,7 @@ Feature: Verify that all form fields values can be get and set And the "available[day]" "field" should be enabled And the field "deadline[enabled]" matches value "1" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And the field "available[enabled]" matches value "1" And the "available[day]" "field" should be enabled And the field "deadline[enabled]" matches value "1" diff --git a/admin/tool/lp/tests/behat/framework_crud.feature b/admin/tool/lp/tests/behat/framework_crud.feature index 27b6f95ddbb..bccf5f76722 100644 --- a/admin/tool/lp/tests/behat/framework_crud.feature +++ b/admin/tool/lp/tests/behat/framework_crud.feature @@ -7,12 +7,9 @@ Feature: Manage competency frameworks Background: Given I log in as "admin" And I am on site homepage - And I expand "Site administration" node - When I expand "Competencies" node - Then I should see "Competency frameworks" Scenario: Create a new framework - Given I follow "Competency frameworks" + Given I navigate to "Competencies > Competency frameworks" in site administration And I should see "List of competency frameworks" And I click on "Add new competency framework" "button" And I should see "General" @@ -34,7 +31,7 @@ Feature: Manage competency frameworks Given the following lp "frameworks" exist: | shortname | idnumber | | Science Year-2 | sc-y-2 | - And I follow "Competency frameworks" + And I navigate to "Competencies > Competency frameworks" in site administration And I should see "Science Year-2" When I click on "Science Year-2" "link" Then I should see "Science Year-2" @@ -43,7 +40,7 @@ Feature: Manage competency frameworks Given the following lp "frameworks" exist: | shortname | idnumber | | Science Year-3 | sc-y-3 | - And I follow "Competency frameworks" + And I navigate to "Competencies > Competency frameworks" in site administration And I should see "Science Year-3" And I click on "Edit" of edit menu in the "Science Year-3" row And the field "Name" matches value "Science Year-3 " @@ -57,7 +54,7 @@ Feature: Manage competency frameworks Given the following lp "frameworks" exist: | shortname | idnumber | | Science Year-4 | sc-y-4 | - And I follow "Competency frameworks" + And I navigate to "Competencies > Competency frameworks" in site administration And I should see "Science Year-4" And I should see "sc-y-4" And I click on "Delete" of edit menu in the "Science Year-4" row @@ -90,7 +87,7 @@ Scenario: Edit a framework with competencies in user competency | user | competency | | admin | Comp1 | | admin | Comp2 | - And I follow "Competency frameworks" + And I navigate to "Competencies > Competency frameworks" in site administration And I should see "Science Year-5" And I click on "Edit" of edit menu in the "Science Year-5" row And the field "Name" matches value "Science Year-5 " @@ -120,7 +117,7 @@ Scenario: Edit a framework with competencies in user competency plan | user | competency | plan | | admin | Comp1 | Plan Science-6 | | admin | Comp2 | Plan Science-6 | - And I follow "Competency frameworks" + And I navigate to "Competencies > Competency frameworks" in site administration And I should see "Science Year-6" And I click on "Edit" of edit menu in the "Science Year-6" row And the field "Name" matches value "Science Year-6 " diff --git a/admin/tool/lp/tests/behat/plan_crud.feature b/admin/tool/lp/tests/behat/plan_crud.feature index a03113dcc2c..71086f3a886 100644 --- a/admin/tool/lp/tests/behat/plan_crud.feature +++ b/admin/tool/lp/tests/behat/plan_crud.feature @@ -26,9 +26,7 @@ Feature: Manage plearning plan | shortname | description | | Science template | science template description | And I follow "Home" - And I expand "Site administration" node - And I expand "Competencies" node - 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" "table_row" And I click on ".form-autocomplete-downarrow" "css_element" And I click on "Admin" item in the autocomplete list @@ -52,9 +50,7 @@ Feature: Manage plearning plan | student-plan1 | COHORTPLAN | | student-plan2 | COHORTPLAN | And I follow "Home" - And I expand "Site administration" node - And I expand "Competencies" node - And I follow "Learning plan templates" + And I navigate to "Competencies > Learning plan templates" in site administration And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row" And I click on ".form-autocomplete-downarrow" "css_element" And I click on "cohort plan" item in the autocomplete list diff --git a/admin/tool/lp/tests/behat/plan_workflow.feature b/admin/tool/lp/tests/behat/plan_workflow.feature index 8a3a4386262..bfaf1e0307a 100644 --- a/admin/tool/lp/tests/behat/plan_workflow.feature +++ b/admin/tool/lp/tests/behat/plan_workflow.feature @@ -145,10 +145,7 @@ Feature: Manage plan workflow | Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 | | Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 | And I log in as "manager1" - And I expand "Site administration" node - And I expand "Users" node - And I expand "Accounts" node - And I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" @@ -167,10 +164,7 @@ Feature: Manage plan workflow | Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 | | Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 | And I log in as "manager1" - And I expand "Site administration" node - And I expand "Users" node - And I expand "Accounts" node - And I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" @@ -191,10 +185,7 @@ Scenario: Manager reopen a complete learning plan | Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 | | Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 | And I log in as "manager1" - And I expand "Site administration" node - And I expand "Users" node - And I expand "Accounts" node - And I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "User 1" And I follow "Learning plans" And I should see "List of learning plans" diff --git a/admin/tool/lp/tests/behat/template_crud.feature b/admin/tool/lp/tests/behat/template_crud.feature index 268651701d0..1479fcfbcd8 100644 --- a/admin/tool/lp/tests/behat/template_crud.feature +++ b/admin/tool/lp/tests/behat/template_crud.feature @@ -7,12 +7,9 @@ Feature: Manage plearning plan templates Background: Given I log in as "admin" And I am on site homepage - And I expand "Site administration" node - When I expand "Competencies" node - Then I should see "Learning plan templates" Scenario: Create a new learning plan template - Given I follow "Learning plan templates" + Given I navigate to "Competencies > Learning plan templates" in site administration And I should see "List of learning plan templates" And I click on "Add new learning plan template" "button" And I should see "Add new learning plan template" @@ -26,7 +23,7 @@ Feature: Manage plearning plan templates Given the following lp "templates" exist: | shortname | description | | Science template Year-2 | science template description | - And I follow "Learning plan templates" + And I navigate to "Competencies > Learning plan templates" in site administration And I should see "Science template Year-2" When I click on "Science template Year-2" "link" Then I should see "Science template Year-2" @@ -36,7 +33,7 @@ Feature: Manage plearning plan templates Given the following lp "templates" exist: | shortname | description | | Science template Year-3 | science template description | - And I follow "Learning plan templates" + And I navigate to "Competencies > Learning plan templates" in site administration And I should see "Science template Year-3" And I click on "Edit" of edit menu in the "Science template Year-3" row And the field "Name" matches value "Science template Year-3" @@ -49,7 +46,7 @@ Feature: Manage plearning plan templates Given the following lp "templates" exist: | shortname | description | | Science template Year-4 | science template description | - And I follow "Learning plan templates" + And I navigate to "Competencies > Learning plan templates" in site administration And I should see "Science template Year-4" And I click on "Delete" of edit menu in the "Science template Year-4" row And "Confirm" "dialogue" should be visible diff --git a/admin/tool/uploaduser/tests/behat/upload_users.feature b/admin/tool/uploaduser/tests/behat/upload_users.feature index 32aa9631c35..7ee6235889f 100644 --- a/admin/tool/uploaduser/tests/behat/upload_users.feature +++ b/admin/tool/uploaduser/tests/behat/upload_users.feature @@ -29,14 +29,13 @@ Feature: Upload users And I should see "Section 1" And I press "Upload users" And I press "Continue" - And I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I should see "Tom Jones" And I should see "Trent Reznor" And I should see "reznor@example.com" And I am on site homepage And I follow "Maths" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Section 1 (1)" And the "members" select box should contain "Tom Jones" diff --git a/admin/tool/usertours/tests/behat/create_tour.feature b/admin/tool/usertours/tests/behat/create_tour.feature index 8e967bd1975..33c7db7cc77 100644 --- a/admin/tool/usertours/tests/behat/create_tour.feature +++ b/admin/tool/usertours/tests/behat/create_tour.feature @@ -25,7 +25,7 @@ Feature: Add a new user tour And I add steps to the "First tour" tour: | targettype | targetvalue_selector | Title | Content | | Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" And I press "Next" And I should see "This area shows you what's happening in some of your courses" @@ -38,7 +38,7 @@ Feature: Add a new user tour And I should see "This area shows you what's happening in some of your courses" And I press "End tour" And I should not see "This area shows you what's happening in some of your courses" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" And I should not see "This area shows you what's happening in some of your courses" And I follow "Reset user tour on this page" @@ -58,7 +58,7 @@ Feature: Add a new user tour And I add steps to the "First tour" tour: | targettype | Title | Content | | Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" @javascript @@ -77,5 +77,5 @@ Feature: Add a new user tour | Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | And I open the User tour settings page When I click on "Enable" "link" in the "My first tour" "table_row" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" diff --git a/admin/tool/usertours/tests/behat/tour_filter.feature b/admin/tool/usertours/tests/behat/tour_filter.feature index ebcb2b208c6..a0104d454be 100644 --- a/admin/tool/usertours/tests/behat/tour_filter.feature +++ b/admin/tool/usertours/tests/behat/tour_filter.feature @@ -16,7 +16,7 @@ Feature: Apply tour filters to a tour And I add steps to the "First tour" tour: | targettype | Title | Content | | Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" @javascript diff --git a/availability/condition/grade/tests/behat/availability_grade.feature b/availability/condition/grade/tests/behat/availability_grade.feature index df3340e9fa1..60f79208996 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -115,7 +115,7 @@ Feature: availability_grade # Give the assignment 40%. And I follow "A1" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration # Pick the grade link in the row that has s@example.com in it. And I click on "Grade" "link" in the "s@example.com" "table_row" And I set the field "Grade out of 100" to "40" diff --git a/availability/condition/profile/tests/behat/availability_profile.feature b/availability/condition/profile/tests/behat/availability_profile.feature index 2222fb7b74d..8e324bb1c21 100644 --- a/availability/condition/profile/tests/behat/availability_profile.feature +++ b/availability/condition/profile/tests/behat/availability_profile.feature @@ -101,7 +101,7 @@ Feature: availability_profile # Edit it again and check the setting still works. When I follow "P1" - And I navigate to "Edit settings" node in "Page module administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "User profile field" matches value "Super field" And the field "Value to compare against" matches value "Bananaman" diff --git a/availability/tests/behat/edit_availability.feature b/availability/tests/behat/edit_availability.feature index 08a6f70c696..7193088a9b4 100644 --- a/availability/tests/behat/edit_availability.feature +++ b/availability/tests/behat/edit_availability.feature @@ -216,7 +216,7 @@ Feature: edit_availability # Check the button still works after saving and editing. And I press "Save and display" - And I navigate to "Edit settings" node in "Forum administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the "Add group/grouping access restriction" "button" should be disabled And I should see "Grouping" in the "Restrict access" "fieldset" diff --git a/backup/util/ui/tests/behat/restore_moodle2_courses.feature b/backup/util/ui/tests/behat/restore_moodle2_courses.feature index 1fa38f17d1f..32c1cd7e7f1 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -41,7 +41,7 @@ Feature: Restore Moodle 2 course backups Then I should see "Course 1 restored in a new course" And I should see "Community finder" in the "Community finder" "block" And I should see "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets And the field "id_format" matches value "Topics format" And the field "Number of sections" matches value "15" @@ -83,7 +83,7 @@ Feature: Restore Moodle 2 course backups When I restore "test_backup.mbz" backup into a new course using this options: Then I should see "Topic 1" And I should see "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets And the field "id_format" matches value "Topics format" And I set the following fields to these values: @@ -95,14 +95,14 @@ Feature: Restore Moodle 2 course backups And I press "Save and display" And I should see "1 January - 7 January" And I should see "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets And the field "id_format" matches value "Weekly format" And I set the following fields to these values: | id_format | Social format | And I press "Save and display" And I should see "An open forum for chatting about anything you want to" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets And the field "id_format" matches value "Social format" And I press "Cancel" @@ -119,7 +119,7 @@ Feature: Restore Moodle 2 course backups | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into "Course 2" course using this options: | Schema | Overwrite course configuration | Yes | - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Number of sections" matches value "15" diff --git a/blocks/activity_modules/tests/behat/block_activity_modules.feature b/blocks/activity_modules/tests/behat/block_activity_modules.feature index b57d54d1110..462ef805ccb 100644 --- a/blocks/activity_modules/tests/behat/block_activity_modules.feature +++ b/blocks/activity_modules/tests/behat/block_activity_modules.feature @@ -109,7 +109,7 @@ Feature: Block activity modules | workshop | Test workshop name | Test workshop description | C1 | workshop1 | When I log in as "admin" - And I follow "Courses" + And I am on course index And I follow "Course 1" And I turn editing mode on And I add the "Activities" block diff --git a/blocks/activity_results/tests/behat/addunsupportedactivity.feature b/blocks/activity_results/tests/behat/addunsupportedactivity.feature index 012549ea5e5..3aa10b9f65d 100644 --- a/blocks/activity_results/tests/behat/addunsupportedactivity.feature +++ b/blocks/activity_results/tests/behat/addunsupportedactivity.feature @@ -33,7 +33,7 @@ Feature: The activity results block displays student scores | id_config_nameformat | Display full names | And I press "Save changes" When I follow "Test assignment" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_grade_modgrade_type | None | And I press "Save and return to course" diff --git a/blocks/badges/tests/behat/block_badges_dashboard.feature b/blocks/badges/tests/behat/block_badges_dashboard.feature index 7a39ed12405..3f87995725e 100644 --- a/blocks/badges/tests/behat/block_badges_dashboard.feature +++ b/blocks/badges/tests/behat/block_badges_dashboard.feature @@ -35,5 +35,4 @@ Feature: Enable Block Badges on the dashboard and view awarded badges And I press "Award badge" And I log out When I log in as "teacher1" - And I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "Badge 1" in the "Latest badges" "block" diff --git a/blocks/calendar_month/tests/behat/block_calendar_month.feature b/blocks/calendar_month/tests/behat/block_calendar_month.feature index 1dd28e99c81..e4952e8829f 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month.feature @@ -86,7 +86,7 @@ Feature: Enable the calendar block in a course and test it's functionality And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage And I follow "Course 1" And I follow "Hide course events" And I hover over today in the calendar @@ -102,7 +102,7 @@ Feature: Enable the calendar block in a course and test it's functionality And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage And I follow "Course 1" And I hover over today in the calendar Then I should see "User Event" @@ -120,7 +120,7 @@ Feature: Enable the calendar block in a course and test it's functionality And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage And I follow "Course 1" And I follow "Hide user events" And I hover over today in the calendar diff --git a/blocks/completionstatus/tests/behat/block_completionstatus.feature b/blocks/completionstatus/tests/behat/block_completionstatus.feature index 58b7cc74a90..9fd829510aa 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus.feature @@ -43,7 +43,7 @@ Feature: Enable Block Completion in a course And I follow "Course 1" And I turn editing mode on And I follow "Test page name" - And I navigate to "Edit settings" node in "Page module administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Completion tracking | Show activity as complete when conditions are met | | Require view | 1 | diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature index 7d3285f761a..0a31bb7bb36 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature @@ -25,7 +25,7 @@ Feature: Enable Block Completion in a course using activity completion And I follow "Course 1" And I turn editing mode on And I follow "Test page name" - And I navigate to "Edit settings" node in "Page module administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Completion tracking | Show activity as complete when conditions are met | | Require view | 1 | @@ -47,7 +47,7 @@ Feature: Enable Block Completion in a course using activity completion And I follow "Course 1" And I turn editing mode on And I follow "Test page name" - And I navigate to "Edit settings" node in "Page module administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Completion tracking | Show activity as complete when conditions are met | | Require view | 1 | diff --git a/blocks/course_overview/tests/behat/block_course_overview.feature b/blocks/course_overview/tests/behat/block_course_overview.feature index 90b8c364d85..389b6c5353b 100644 --- a/blocks/course_overview/tests/behat/block_course_overview.feature +++ b/blocks/course_overview/tests/behat/block_course_overview.feature @@ -153,7 +153,6 @@ Feature: View the course overview block on the dashboard and test it's functiona And I click on "Enable" "link" in the "Course meta link" "table_row" And I am on site homepage And I follow "Course 2" - And I navigate to "Enrolment methods" node in "Course administration > Users" And I add "Course meta link" enrolment method with: | Link course | C1 | And I log out diff --git a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature index 001814381a1..fc6f19caa9d 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_frontpage.feature @@ -10,7 +10,7 @@ Scenario: Admin can add random glossary block to the frontpage | glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 | And I log in as "admin" And I am on site homepage - And I click on "Turn editing on" "link" in the "Administration" "block" + And I turn editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block And I set the following fields to these values: diff --git a/blocks/html/tests/behat/configuring_html_block.feature b/blocks/html/tests/behat/configuring_html_block.feature index 5c696d8373e..b4865e7f9ef 100644 --- a/blocks/html/tests/behat/configuring_html_block.feature +++ b/blocks/html/tests/behat/configuring_html_block.feature @@ -8,7 +8,7 @@ Feature: Adding and configuring HTML blocks Scenario: Configuring the HTML block with Javascript on Given I log in as "admin" And I am on site homepage - When I click on "Turn editing on" "link" in the "Administration" "block" + When I turn editing mode on And I add the "HTML" block And I configure the "(new HTML block)" block And I set the field "Content" to "Static text without a header" @@ -25,7 +25,7 @@ Feature: Adding and configuring HTML blocks Scenario: Configuring the HTML block with Javascript off Given I log in as "admin" And I am on site homepage - When I click on "Turn editing on" "link" in the "Administration" "block" + When I turn editing mode on And I add the "HTML" block And I configure the "(new HTML block)" block And I set the field "Content" to "Static text without a header" diff --git a/blocks/html/tests/behat/multiple_instances.feature b/blocks/html/tests/behat/multiple_instances.feature index 564c0b28dc0..93b58de8fd9 100644 --- a/blocks/html/tests/behat/multiple_instances.feature +++ b/blocks/html/tests/behat/multiple_instances.feature @@ -7,7 +7,7 @@ Feature: Adding and configuring HTML blocks Background: Given I log in as "admin" And I am on site homepage - When I click on "Turn editing on" "link" in the "Administration" "block" + When I turn editing mode on And I add the "HTML" block Scenario: Other users can not see HTML block that has not been configured diff --git a/blocks/news_items/tests/behat/display_news.feature b/blocks/news_items/tests/behat/display_news.feature index a899073dc5b..ada6a9e1866 100644 --- a/blocks/news_items/tests/behat/display_news.feature +++ b/blocks/news_items/tests/behat/display_news.feature @@ -34,14 +34,14 @@ Feature: Latest announcements block displays the course latest news Then I should see "Discussion One" in the "Latest announcements" "block" And I should see "Discussion Two" in the "Latest announcements" "block" And I should see "Discussion Three" in the "Latest announcements" "block" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | News items to show | 2 | And I press "Save and display" And I should not see "Discussion One" in the "Latest announcements" "block" And I should see "Discussion Two" in the "Latest announcements" "block" And I should see "Discussion Three" in the "Latest announcements" "block" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | News items to show | 0 | And I press "Save and display" diff --git a/blocks/recent_activity/tests/behat/structural_changes.feature b/blocks/recent_activity/tests/behat/structural_changes.feature index 5914281d57b..067b5730dad 100644 --- a/blocks/recent_activity/tests/behat/structural_changes.feature +++ b/blocks/recent_activity/tests/behat/structural_changes.feature @@ -165,7 +165,7 @@ Feature: View structural changes in recent activity block And I log in as "teacher1" And I follow "Course 1" And I follow "ForumNew" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | name | ForumUpdated | And I press "Save and return to course" diff --git a/blocks/search_forums/tests/behat/block_search_forums_course.feature b/blocks/search_forums/tests/behat/block_search_forums_course.feature index 0f54b4b4dab..a52b9ad5690 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_course.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_course.feature @@ -43,7 +43,7 @@ Feature: The search forums block allows users to search for forum posts And I follow "Course 1" And I turn editing mode on And I follow "Announcements" - And I navigate to "Edit settings" node in "Forum administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "id_visible" to "0" And I press "Save and return to course" diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index db03ce2107b..a9d31d7af1b 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -50,9 +50,8 @@ Feature: Add and configure blocks throughout the site Scenario: Blocks on the dashboard page can have roles assigned to them Given I log in as "manager1" - And I click on "Dashboard" "link" in the "Navigation" "block" When I press "Customise this page" - Then I should see "Assign roles in Navigation block" + Then I should see "Assign roles in Private files block" Scenario: Blocks on courses can have roles assigned to them Given I log in as "teacher1" @@ -64,7 +63,7 @@ Feature: Add and configure blocks throughout the site @javascript Scenario: Blocks can safely be customised Given I log in as "admin" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I press "Customise this page" And I add the "HTML" block And I configure the "(new HTML block)" block diff --git a/blocks/tests/behat/restrict_available_blocks.feature b/blocks/tests/behat/restrict_available_blocks.feature index 10068dcb8ed..6a5c2a11ff2 100644 --- a/blocks/tests/behat/restrict_available_blocks.feature +++ b/blocks/tests/behat/restrict_available_blocks.feature @@ -30,8 +30,7 @@ Feature: Allowed blocks controls | block/activity_modules:addinstance | Prohibit | And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Permissions" + And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | block/completionstatus:addinstance | Prohibit | And I log out diff --git a/blocks/tests/behat/return_block_original_state.feature b/blocks/tests/behat/return_block_original_state.feature index 931eb3fab48..98226cdffaa 100644 --- a/blocks/tests/behat/return_block_original_state.feature +++ b/blocks/tests/behat/return_block_original_state.feature @@ -14,7 +14,7 @@ Feature: The context of a block can always be returned to it's original state. And I follow "Turn editing on" And I add the "Tags" block Then I should see "Tags" in the "Tags" "block" - And I click on "Participants" "link" in the "//li[p/a[contains(normalize-space(string(.)), 'Courses')]]" "xpath_element" + And I navigate to course participants And I configure the "Tags" block And I set the following fields to these values: | Display on page types | Any page | @@ -31,7 +31,7 @@ Feature: The context of a block can always be returned to it's original state. And I should see "Tags" in the "Tags" "block" And I follow "Course 1" And "Tags" "block" should not exist - And I navigate to "Participants" node in "Courses > C1" + And I navigate to course participants And "Tags" "block" should not exist And I follow "Course 1" And I add a "Assignment" to section "1" and I fill the form with: @@ -45,5 +45,5 @@ Feature: The context of a block can always be returned to it's original state. And I press "Save changes" And I follow "Course 1" And I should see "Tags" in the "Tags" "block" - And I navigate to "Participants" node in "Courses > C1" + And I navigate to course participants And I should see "Tags" in the "Tags" "block" diff --git a/blog/tests/behat/blog_visibility.feature b/blog/tests/behat/blog_visibility.feature index dfb5c8f74c2..e1356810731 100644 --- a/blog/tests/behat/blog_visibility.feature +++ b/blog/tests/behat/blog_visibility.feature @@ -27,7 +27,7 @@ Feature: Blogs can be set to be only visible by the author. Scenario: A student can not see another student's blog entries. Given I log in as "testuser" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Test2 User2" And I should see "Miscellaneous" Then I should not see "Blog entries" diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index 8f5dc510454..899ec2c4f4d 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -58,8 +58,10 @@ Feature: Access visible and hidden cohorts And the "Cohort" select box should contain "System empty cohort" And I set the field "Cohort" to "System cohort" And I press "Add method" + And I follow "Course 1" And I navigate to "Enrolled users" node in "Course administration > Users" And I should see "student@example.com" + And I follow "Course 1" And I navigate to "Groups" node in "Course administration > Users" And I press "Auto-create groups" And the "Select members from cohort" select box should contain "Cohort in category 1" diff --git a/cohort/tests/behat/add_cohort.feature b/cohort/tests/behat/add_cohort.feature index 3d89faf90b4..7d21b9877bf 100644 --- a/cohort/tests/behat/add_cohort.feature +++ b/cohort/tests/behat/add_cohort.feature @@ -38,7 +38,8 @@ Feature: Add cohorts of users And the "Current users" select box should not contain "Forth User (forth@example.com)" Scenario: Add users to a cohort using a bulk user action - When I follow "Bulk user actions" + When I follow "Accounts" + And I follow "Bulk user actions" And I set the field "Available" to "Third User" And I press "Add to selection" And I set the field "Available" to "Forth User" @@ -47,6 +48,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" Then I should see "2" in the "#cohorts" "css_element" And I click on "Assign" "link" in the "Test cohort name" "table_row" diff --git a/cohort/tests/behat/upload_cohort_users.feature b/cohort/tests/behat/upload_cohort_users.feature index 702107ef11a..68adda85f83 100644 --- a/cohort/tests/behat/upload_cohort_users.feature +++ b/cohort/tests/behat/upload_cohort_users.feature @@ -28,7 +28,7 @@ Feature: Upload users to a cohort And I press "Upload users" And I press "Upload users" And I press "Continue" - And I follow "Cohorts" + And I navigate to "Users > Accounts > Cohorts" in site administration And I click on "Assign" "link" in the "Cohort 1" "table_row" Then the "Current users" select box should contain "Tom Jones (tomjones@example.com)" And the "Current users" select box should contain "Bob Jones (bobjones@example.com)" @@ -38,15 +38,13 @@ Feature: Upload users to a cohort And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Enrolled users" + And I navigate to "Users > Enrolled users" in current page administration And I should see "Tom Jones" And I should see "Bob Jones" And I should not see "Mary Smith" And I am on site homepage And I follow "Course 2" - And I expand "Users" node - And I follow "Enrolled users" + And I navigate to "Users > Enrolled users" in current page administration And I should see "Mary Smith" And I should see "Alice Smith" And I should not see "Tom Jones" diff --git a/cohort/tests/behat/upload_cohorts.feature b/cohort/tests/behat/upload_cohorts.feature index 822fa60d223..a400b019f3a 100644 --- a/cohort/tests/behat/upload_cohorts.feature +++ b/cohort/tests/behat/upload_cohorts.feature @@ -90,9 +90,9 @@ Feature: A privileged user can create cohorts using a CSV file | user | role | contextlevel | reference | | user1 | manager | Category | CAT1 | When I log in as "user1" - And I follow "Courses" + And I am on course index And I follow "Cat 1" - And I navigate to "Cohorts" node in "Category: Cat 1" + And I navigate to "Cohorts" in current page administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager And I click on "Preview" "button" diff --git a/cohort/tests/behat/view_cohorts.feature b/cohort/tests/behat/view_cohorts.feature index 8e7a742e9d1..f9707017aaf 100644 --- a/cohort/tests/behat/view_cohorts.feature +++ b/cohort/tests/behat/view_cohorts.feature @@ -53,7 +53,7 @@ Feature: View cohort list Scenario: Manager in category can see cohorts in the category When I log in as "user2" - And I follow "Courses" + And I am on course index And I follow "Cat 1" And I follow "Cohorts" And I should not see "All cohorts" diff --git a/completion/tests/behat/enable_manual_complete_mark.feature b/completion/tests/behat/enable_manual_complete_mark.feature index 75a11a2f0c0..c7aeb270ae6 100644 --- a/completion/tests/behat/enable_manual_complete_mark.feature +++ b/completion/tests/behat/enable_manual_complete_mark.feature @@ -21,7 +21,7 @@ Feature: Allow students to manually mark an activity as complete And I am on site homepage And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" @@ -38,6 +38,5 @@ Feature: Allow students to manually mark an activity as complete And I log in as "teacher1" And I am on site homepage And I follow "Course 1" - And I expand "Reports" node - And I follow "Activity completion" + And I navigate to "Reports > Activity completion" in current page administration And "Student First" user has completed "Test forum name" activity diff --git a/completion/tests/behat/restrict_activity_by_grade.feature b/completion/tests/behat/restrict_activity_by_grade.feature index a42b23c3ec8..040bf16b1d9 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -56,7 +56,7 @@ Feature: Restrict activity availability through grade conditions And I am on site homepage And I follow "Course 1" And I follow "Grade assignment" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student First" "table_row" And I set the following fields to these values: | Grade | 21 | diff --git a/completion/tests/behat/restrict_section_availability.feature b/completion/tests/behat/restrict_section_availability.feature index 5090562e99e..c538bb2cd38 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -23,7 +23,7 @@ Feature: Restrict sections availability through completion or grade conditions And I am on site homepage And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" @@ -93,7 +93,7 @@ Feature: Restrict sections availability through completion or grade conditions And I am on site homepage And I follow "Course 1" And I follow "Grade assignment" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student First" "table_row" And I set the following fields to these values: | Grade | 21 | diff --git a/course/format/social/tests/behat/social_adjust_discussion_count.feature b/course/format/social/tests/behat/social_adjust_discussion_count.feature index 92bc5e9bae4..2f474b2f6a1 100644 --- a/course/format/social/tests/behat/social_adjust_discussion_count.feature +++ b/course/format/social/tests/behat/social_adjust_discussion_count.feature @@ -97,7 +97,7 @@ Background: And I follow "Course 1" Scenario: When number of discussions is decreased fewer discussions appear - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | numdiscussions | 5 | When I press "Save and display" @@ -106,7 +106,7 @@ Scenario: When number of discussions is decreased fewer discussions appear And I should not see "This is forum post six" Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | numdiscussions | -1 | When I press "Save and display" @@ -115,7 +115,7 @@ Scenario: When number of discussions is decreased to less than 1 only 1 discussi And I should not see "This is forum post ten" Scenario: When number of discussions is increased more discussions appear - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | numdiscussions | 9 | When I press "Save and display" diff --git a/course/tests/behat/activities_edit_completion.feature b/course/tests/behat/activities_edit_completion.feature index 1eb0f5f2b2f..c4f44b7b959 100644 --- a/course/tests/behat/activities_edit_completion.feature +++ b/course/tests/behat/activities_edit_completion.feature @@ -35,24 +35,24 @@ Feature: Edit completion settings of an activity @javascript Scenario: Pressing the unlock button allows the user to edit completion settings Given I follow "TestPage" - When I click on "Edit settings" "link" in the "Administration" "block" + When I navigate to "Edit settings" in current page administration And I expand all fieldsets And I press "Unlock completion options" Then I should see "Completion options unlocked" And I set the field "Completion tracking" to "Students can manually mark the activity as completed" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "Completion tracking" matches value "Students can manually mark the activity as completed" @javascript Scenario: Even when completion is locked, the user can still set the date Given I follow "TestPage" - When I click on "Edit settings" "link" in the "Administration" "block" + When I navigate to "Edit settings" in current page administration And I expand all fieldsets When I click on "id_completionexpected_enabled" "checkbox" And I set the field "id_completionexpected_year" to "2013" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_completionexpected_year" matches value "2013" diff --git a/course/tests/behat/activities_group_icons.feature b/course/tests/behat/activities_group_icons.feature index f65116277ab..dbb26da63e6 100644 --- a/course/tests/behat/activities_group_icons.feature +++ b/course/tests/behat/activities_group_icons.feature @@ -21,7 +21,7 @@ Feature: Toggle activities groups mode from the course page And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Group mode | No groups | | Force group mode | No | diff --git a/course/tests/behat/add_activities.feature b/course/tests/behat/add_activities.feature index 662a3c54861..b318d8046d0 100644 --- a/course/tests/behat/add_activities.feature +++ b/course/tests/behat/add_activities.feature @@ -30,8 +30,9 @@ Feature: Add activities to courses | Allow comments on entries | Yes | And I turn editing mode off Then I should not see "Adding a new" - And I follow "Test name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I turn editing mode on + And I open "Test name" actions menu + And I click on "Edit settings" "link" in the "Test name" activity And I expand all fieldsets And the field "Name" matches value "Test name" And the field "Entries required for completion" matches value "9" diff --git a/course/tests/behat/category_management.feature b/course/tests/behat/category_management.feature index f08fb222f4b..5a68d138656 100644 --- a/course/tests/behat/category_management.feature +++ b/course/tests/behat/category_management.feature @@ -340,9 +340,7 @@ Feature: Test category management actions | name | category | idnumber | | Cat 1 | 0 | CAT1 | And I log in as "admin" - And I expand "Site administration" node - And I expand "Courses" node - And I follow "Add a category" + And I navigate to "Courses > Add a category" in site administration And I set the following fields to these values: | Category name | Test duplicate | | Category ID number | CAT1 | diff --git a/course/tests/behat/category_role_assignment.feature b/course/tests/behat/category_role_assignment.feature index 9d9dc77350a..3dfe02cf855 100644 --- a/course/tests/behat/category_role_assignment.feature +++ b/course/tests/behat/category_role_assignment.feature @@ -16,16 +16,15 @@ Feature: Role assignments can be made at the category level | manager | manager | Category | CAT1 | And I log in as "admin" - @javascript Scenario: A user with a category role can assign roles Given I define the allowed role assignments for the "Manager" role as: | Teacher | Assignable | And I log out And I log in as "manager" - And I follow "Courses" + And I am on course index When I follow "Cat 1" - Then I should see "Assign roles" + Then "Assign roles" "link" should exist in current page administration @javascript Scenario: A user with a category role cannot assign roles if there are no roles to assign @@ -37,6 +36,6 @@ Feature: Role assignments can be made at the category level | Student | Not assignable | And I log out And I log in as "manager" - And I follow "Courses" + And I am on course index When I follow "Cat 1" - Then I should not see "Assign roles" + Then "Assign roles" "link" should not exist in current page administration diff --git a/course/tests/behat/course_creation.feature b/course/tests/behat/course_creation.feature index f8c945c9065..31ac9272f98 100644 --- a/course/tests/behat/course_creation.feature +++ b/course/tests/behat/course_creation.feature @@ -5,7 +5,7 @@ Feature: Managers can create courses I need to create courses and set default values on them @javascript - Scenario: Courses are created with the default forum and blocks + Scenario: Courses are created with the default announcements forum Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@example.com | @@ -24,13 +24,14 @@ Feature: Managers can create courses Then "Latest announcements" "block" should exist And I follow "Announcements" And "Add a new topic" "button" should exist - And "Forced subscription" "link" should not exist + And "Subscription mode > Forced subscription" "link" should not exist in current page administration + And "Subscription mode > Forced subscription" "text" should exist in current page administration And I log out And I log in as "student1" And I follow "Course 1" And I follow "Announcements" And "Add a new topic" "button" should not exist - And I should see "Forced subscription" in the "Administration" "block" + And "Subscription mode > Forced subscription" "text" should exist in current page administration Scenario: Create a course from the management interface and return to it Given the following "courses" exist: diff --git a/course/tests/behat/coursetags.feature b/course/tests/behat/coursetags.feature index b330e80b8a5..7d99167ac80 100644 --- a/course/tests/behat/coursetags.feature +++ b/course/tests/behat/coursetags.feature @@ -25,7 +25,7 @@ Feature: Tagging courses | teacher2 | c2 | teacher | And I log in as "teacher1" And I follow "Course 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Tags | Mathematics | And I press "Save and display" @@ -34,16 +34,15 @@ Feature: Tagging courses Scenario: Set course tags using the course edit form When I log in as "teacher1" And I follow "Course 1" - And "Course tags" "link" should not exist in the "Administration" "block" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" And I set the following fields to these values: | Tags | Algebra | And I press "Save and display" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I follow "Course 2" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Tags | Mathematics, Geometry | And I press "Save and display" @@ -70,15 +69,14 @@ Feature: Tagging courses And I log out When I log in as "teacher2" And I follow "Course 1" - And "Edit settings" "link" should not exist in the "Administration" "block" - And I click on "Course tags" "link" in the "Administration" "block" + And I navigate to "Course tags" in current page administration Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" And I set the following fields to these values: | Tags | Algebra | And I press "Save changes" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I follow "Course 2" - And I click on "Course tags" "link" in the "Administration" "block" + And I navigate to "Course tags" in current page administration And I set the following fields to these values: | Tags | Mathematics, Geometry | And I press "Save changes" diff --git a/course/tests/behat/edit_settings.feature b/course/tests/behat/edit_settings.feature index 572d1a94562..1ef2c67cb64 100644 --- a/course/tests/behat/edit_settings.feature +++ b/course/tests/behat/edit_settings.feature @@ -17,7 +17,7 @@ Feature: Edit course settings | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - When I click on "Edit settings" "link" in the "Administration" "block" + When I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course full name | Edited course fullname | | Course short name | Edited course shortname | @@ -28,7 +28,7 @@ Feature: Edit course settings And I should not see "C1" And I should see "Edited course fullname" And I should see "Edited course shortname" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And the field "Course full name" matches value "Edited course fullname" And the field "Course short name" matches value "Edited course shortname" And the field "Course summary" matches value "Edited course summary" diff --git a/course/tests/behat/force_group_mode.feature b/course/tests/behat/force_group_mode.feature index 185d69ed0c5..07333d132f2 100644 --- a/course/tests/behat/force_group_mode.feature +++ b/course/tests/behat/force_group_mode.feature @@ -20,7 +20,7 @@ Feature: Force group mode in a course And I add a "Chat" to section "1" and I fill the form with: | Name of this chat room | Chat room | | Description | Chat description | - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration @javascript Scenario: Forced group mode using separate groups diff --git a/course/tests/behat/move_activities.feature b/course/tests/behat/move_activities.feature index 1c81efd6ee0..ba900d446bf 100644 --- a/course/tests/behat/move_activities.feature +++ b/course/tests/behat/move_activities.feature @@ -20,10 +20,6 @@ Feature: Activities can be moved between sections And I add the "Recent activity" block And I follow "Delete Recent activity block" And I press "Yes" - And I follow "Configure Navigation block" - And I set the following fields to these values: - | Visible | Yes | - And I press "Save changes" And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -34,7 +30,7 @@ Feature: Activities can be moved between sections And I should not see "Test forum name" in the "Topic 1" "section" Scenario: Move activities in the course home with Javascript disabled using paged mode - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course layout | Show one section per page | And I press "Save and display" @@ -43,7 +39,7 @@ Feature: Activities can be moved between sections And I should not see "Test forum name" in the "Topic 1" "section" Scenario: Move activities in a course section with Javascript disabled using paged mode - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course layout | Show one section per page | And I press "Save and display" diff --git a/course/tests/behat/move_sections.feature b/course/tests/behat/move_sections.feature index c3bd269812a..d1efdde9dd1 100644 --- a/course/tests/behat/move_sections.feature +++ b/course/tests/behat/move_sections.feature @@ -28,7 +28,7 @@ Feature: Sections can be moved And I should see "Test forum name" in the "Topic 1" "section" Scenario: Move up and down a section with Javascript disabled in the course home of a course using paged mode - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course layout | Show one section per page | And I press "Save and display" @@ -41,7 +41,7 @@ Feature: Sections can be moved And I should see "Test forum name" in the "Topic 1" "section" Scenario: Sections can not be moved with Javascript disabled in a section page of a course using paged mode - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course layout | Show one section per page | And I press "Save and display" diff --git a/course/tests/behat/navigate_course_list.feature b/course/tests/behat/navigate_course_list.feature index d2bb13075da..560e977c667 100644 --- a/course/tests/behat/navigate_course_list.feature +++ b/course/tests/behat/navigate_course_list.feature @@ -19,7 +19,7 @@ Feature: Browse course list and return back from enrolment page Scenario: A user can return to the category page from enrolment page When I log in as "user2" - And I click on "Courses" "link" in the "Navigation" "block" + And I am on course index And I follow "Miscellaneous" And I follow "Sample course" And I press "Continue" @@ -57,7 +57,7 @@ Feature: Browse course list and return back from enrolment page | moodle/course:view | Allow | And I log out When I log in as "user1" - And I click on "Courses" "link" in the "Navigation" "block" + And I am on course index And I follow "Miscellaneous" And I follow "Sample course" And I follow "Test choice" diff --git a/course/tests/behat/rename_roles.feature b/course/tests/behat/rename_roles.feature index e5dce429c02..ba6ce3fdc46 100644 --- a/course/tests/behat/rename_roles.feature +++ b/course/tests/behat/rename_roles.feature @@ -21,7 +21,7 @@ Feature: Rename roles within a course | student1 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - When I click on "Edit settings" "link" in the "Administration" "block" + When I go to "Edit settings" in current page administration And I set the following fields to these values: | Your word for 'Non-editing teacher' | Tutor | | Your word for 'Student' | Learner | @@ -29,11 +29,12 @@ Feature: Rename roles within a course And I follow "Switch role to..." in the user menu Then "Tutor" "button" should exist And "Learner" "button" should exist - And I follow "Participants" + And I navigate to course participants And the "roleid" select box should contain "Tutor" And the "roleid" select box should contain "Learner" And the "roleid" select box should not contain "Student" - And I click on "Edit settings" "link" in the "Administration" "block" + And I follow "Course 1" + And I go to "Edit settings" in current page administration And I set the following fields to these values: | Your word for 'Non-editing teacher' | | | Your word for 'Student' | | @@ -42,6 +43,6 @@ Feature: Rename roles within a course And I should see "Teacher" And "Student" "button" should exist And "Learner" "button" should not exist - And I follow "Participants" + And I navigate to course participants And the "roleid" select box should contain "Non-editing teacher" And the "roleid" select box should contain "Student" diff --git a/course/tests/behat/restrict_available_activities.feature b/course/tests/behat/restrict_available_activities.feature index 6d8485d22ad..dc240de8048 100644 --- a/course/tests/behat/restrict_available_activities.feature +++ b/course/tests/behat/restrict_available_activities.feature @@ -35,8 +35,7 @@ Feature: Restrict activities availability | mod/chat:addinstance | Prohibit | And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Permissions" + And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | mod/glossary:addinstance | Prohibit | And I log out diff --git a/course/tests/behat/role_renaming.feature b/course/tests/behat/role_renaming.feature index 7384c4c9cbd..31012650357 100644 --- a/course/tests/behat/role_renaming.feature +++ b/course/tests/behat/role_renaming.feature @@ -20,7 +20,7 @@ Feature: Rename roles in a course Scenario: Teacher can rename roles Given I log in as "teacher1" And I follow "Course 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I should see "Role renaming" When I set the following fields to these values: | Your word for 'Teacher' | Lecturer | @@ -38,6 +38,6 @@ Feature: Rename roles in a course And I follow "Log out" When I log in as "teacher1" And I follow "Course 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration Then I should not see "Role renaming" And I should not see "Your word for 'Teacher'" diff --git a/course/tests/behat/view_subfolders_inline.feature b/course/tests/behat/view_subfolders_inline.feature index 08404751d98..9730e539c18 100644 --- a/course/tests/behat/view_subfolders_inline.feature +++ b/course/tests/behat/view_subfolders_inline.feature @@ -53,7 +53,7 @@ Feature: View subfolders in a course in-line And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" And I press "Save changes" And I should see "Test sub subfolder" - And I navigate to "Edit settings" node in "Folder administration" + And I navigate to "Edit settings" in current page administration And I set the field "Display folder contents" to "Inline on a course page" And I set the field "Show subfolders expanded" to "" And I press "Save and return to course" diff --git a/enrol/meta/tests/behat/enrol_meta.feature b/enrol/meta/tests/behat/enrol_meta.feature index c5df107038e..e28b005e25a 100644 --- a/enrol/meta/tests/behat/enrol_meta.feature +++ b/enrol/meta/tests/behat/enrol_meta.feature @@ -31,8 +31,7 @@ Feature: Enrolments are synchronised with meta courses And I log in as "admin" And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" And I click on "Enable" "link" in the "Course meta link" "table_row" - And I am on homepage - And I follow "Courses" + And I am on course index Scenario: Add meta enrolment instance without groups When I follow "Course 3" @@ -94,8 +93,7 @@ Feature: Enrolments are synchronised with meta courses And I press "Next" And I press "Perform restore" And I trigger cron - And I am on homepage - And I follow "Courses" + And I am on course index And I follow "Course 4" And I navigate to "Enrolment methods" node in "Course administration > Users" Then I should see "Course meta link (Course 1)" diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature index c60f0ed7408..a0c53dd7dde 100644 --- a/enrol/self/tests/behat/self_enrolment.feature +++ b/enrol/self/tests/behat/self_enrolment.feature @@ -74,7 +74,8 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe | Custom instance name | Test student enrolment | | Enrolment key | moodle_rules | | Use group enrolment keys | Yes | - And I follow "Groups" + And I follow "Course 1" + And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group 1 | diff --git a/enrol/tests/behat/enrol_user.feature b/enrol/tests/behat/enrol_user.feature index 9166d584ed9..94a80c55196 100644 --- a/enrol/tests/behat/enrol_user.feature +++ b/enrol/tests/behat/enrol_user.feature @@ -12,7 +12,7 @@ Feature: User can be enrolled into a course | fullname | shortname | | Course 001 | C001 | And I log in as "admin" - And I follow "Courses" + And I am on course index And I follow "Course 001" Scenario: User can be enrolled without javascript diff --git a/enrol/tests/behat/manage_enrolments_from_participants.feature b/enrol/tests/behat/manage_enrolments_from_participants.feature index 7a4bbd9868c..d50bde399d8 100644 --- a/enrol/tests/behat/manage_enrolments_from_participants.feature +++ b/enrol/tests/behat/manage_enrolments_from_participants.feature @@ -20,7 +20,7 @@ Feature: Manage enrollments from participants page | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants Scenario: Check the participants link when "All partipants" selected Given I select "All participants" from the "roleid" singleselect diff --git a/files/tests/behat/course_files.feature b/files/tests/behat/course_files.feature index c610bfabde2..af9f65ab038 100644 --- a/files/tests/behat/course_files.feature +++ b/files/tests/behat/course_files.feature @@ -15,7 +15,7 @@ Feature: Course files When I log in as "admin" And I am on site homepage And I follow "Course 1" - Then I should see "Legacy course files" + Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" And "Add..." "link" should be visible @@ -32,7 +32,7 @@ Feature: Course files When I log in as "admin" And I am on site homepage And I follow "Course 1" - Then I should see "Legacy course files" + Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" And "Add..." "link" should not be visible diff --git a/grade/grading/form/guide/tests/behat/edit_guide.feature b/grade/grading/form/guide/tests/behat/edit_guide.feature index 0181a86d5d4..8f1ff15323d 100644 --- a/grade/grading/form/guide/tests/behat/edit_guide.feature +++ b/grade/grading/form/guide/tests/behat/edit_guide.feature @@ -87,7 +87,7 @@ Feature: Marking guides can be created and edited And I press "Ok" And I follow "Edit settings" And I follow "Test assignment 1 name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration # Checking that the user grade is correct. Then I should see "80" in the "Student 1" "table_row" And I log out diff --git a/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature b/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature index 1f196737100..5effb3d0e32 100644 --- a/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature +++ b/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature @@ -40,6 +40,7 @@ Feature: Reuse my rubrics in other activities And I should see "Criterion 1" And I should see "Criterion 2" And I should see "Criterion 3" + And I follow "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I should see "Criterion 1" And I should see "Criterion 2" diff --git a/grade/report/singleview/tests/behat/bulk_insert_grades.feature b/grade/report/singleview/tests/behat/bulk_insert_grades.feature index 608f98ad0d9..f6b05464aa5 100644 --- a/grade/report/singleview/tests/behat/bulk_insert_grades.feature +++ b/grade/report/singleview/tests/behat/bulk_insert_grades.feature @@ -33,14 +33,14 @@ Feature: We can bulk insert grades for students in a course Given I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | And I press "Save changes" And I press "Ok" - And I follow "Edit settings" - And I follow "View gradebook" + And I follow "Course 1" + And I go to "View > Grader report" in the course gradebook And I follow "Single view for Test assignment one" Then the field "Grade for james (Student) 1" matches value "50.00" And the field "Override for james (Student) 1" matches value "0" @@ -74,14 +74,14 @@ Feature: We can bulk insert grades for students in a course Given I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment two" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | And I press "Save changes" And I press "Ok" - And I follow "Edit settings" - And I follow "View gradebook" + And I follow "Course 1" + And I go to "View > Grader report" in the course gradebook # And I click on "input[title='Dock Navigation block']" "css_element" # And I click on "input[title='Dock Administration block']" "css_element" And I follow "Single view for Test assignment two" diff --git a/grade/tests/behat/grade_point_maximum.feature b/grade/tests/behat/grade_point_maximum.feature index 823c8eda325..347b9860c3a 100644 --- a/grade/tests/behat/grade_point_maximum.feature +++ b/grade/tests/behat/grade_point_maximum.feature @@ -25,7 +25,7 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Validate that switching the type of grading used correctly disables input form elements When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Point" Then the "Scale" "select" should be disabled @@ -41,12 +41,12 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with a maximum grade point value less than the system maximum When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "point" And I set the field "grade[modgrade_point]" to "600" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration Then the field "grade[modgrade_point]" matches value "600" And the "Scale" "select" should be disabled And I press "Save and return to course" @@ -54,12 +54,12 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with a scale as the grade type When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing" And the "Maximum grade" "field" should be disabled And I press "Save and return to course" @@ -67,18 +67,18 @@ Feature: We can change the grading type and maximum grade point values @javascript Scenario: Create an activity with no grade as the grade type When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "None" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And the "Scale" "select" should be disabled And the "Maximum grade" "field" should be disabled And I press "Save and return to course" Scenario: Create an activity with a maximum grade point value higher than the system maximum When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Point" And I set the field "grade[modgrade_point]" to "20000" @@ -88,7 +88,7 @@ Feature: We can change the grading type and maximum grade point values Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower When I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "point" And I set the field "grade[modgrade_point]" to "600" @@ -100,7 +100,7 @@ Feature: We can change the grading type and maximum grade point values And I am on site homepage And I follow "Course 1" And I follow "Test Assignment 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I press "Save and display" Then I should see "Invalid grade value. This must be an integer between 1 and 100" And I press "Cancel" diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index f4e427a6ab3..36e83376f06 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -44,12 +44,12 @@ Feature: View gradebook when scales are used And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Letterscale" And I press "Save and display" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "A" And I press "Save changes" diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 921ce585317..c818c244b71 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -38,12 +38,12 @@ Feature: View gradebook when single item scales are used And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment one" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "grade[modgrade_type]" to "Scale" And I set the field "grade[modgrade_scale]" to "Singleitem" And I press "Save and display" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "A" And I press "Save changes" diff --git a/grade/tests/behat/grade_to_pass.feature b/grade/tests/behat/grade_to_pass.feature index 2fb29483e16..04d1cbb447a 100644 --- a/grade/tests/behat/grade_to_pass.feature +++ b/grade/tests/behat/grade_to_pass.feature @@ -187,8 +187,7 @@ Feature: We can set the grade to pass value And I set the field "Grade to pass" to "80" And I press "Save changes" And I follow "Course 1" - And I follow "Test Database 1" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Test Database 1" activity And the field "Grade to pass" matches value "80" Scenario: Set an invalid grade to pass for forum activity diff --git a/group/tests/behat/auto_creation.feature b/group/tests/behat/auto_creation.feature index bc928eb433d..e41b32fc9d8 100644 --- a/group/tests/behat/auto_creation.feature +++ b/group/tests/behat/auto_creation.feature @@ -38,8 +38,7 @@ Feature: Automatic creation of groups | suspendedstudent11 | C1 | student | 1 | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration When I press "Auto-create groups" And I expand all fieldsets @@ -165,8 +164,7 @@ Feature: Automatic creation of groups And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration When I press "Auto-create groups" Then I should not see "Include only active enrolments" And I set the field "Group/member count" to "11" diff --git a/group/tests/behat/create_groups.feature b/group/tests/behat/create_groups.feature index 4d07c441215..137aca22f5c 100644 --- a/group/tests/behat/create_groups.feature +++ b/group/tests/behat/create_groups.feature @@ -25,8 +25,7 @@ Feature: Organize students into groups | student3 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I go to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group 1 | @@ -47,7 +46,7 @@ Feature: Organize students into groups And the "members" select box should contain "Student 2" And the "members" select box should contain "Student 3" And the "members" select box should not contain "Student 0" - And I follow "Participants" + And I navigate to course participants And I set the field "Separate groups" to "Group 1" And I should see "Student 0" And I should see "Student 1" @@ -73,8 +72,7 @@ Feature: Organize students into groups And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I go to "Users > Groups" in current page administration When I press "Create group" Then the "idnumber" "field" should be readonly And I set the following fields to these values: @@ -97,8 +95,7 @@ Feature: Organize students into groups And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I go to "Users > Groups" in current page administration When I press "Create group" And I set the following fields to these values: | Group name | Group A | @@ -121,8 +118,7 @@ Feature: Organize students into groups And the "groups" select box should contain "Group B (0)" And I am on site homepage And I follow "Course 2" - And I expand "Users" node - And I follow "Groups" + And I go to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group A | diff --git a/group/tests/behat/delete_groups.feature b/group/tests/behat/delete_groups.feature index 41158de0294..b77d0007c0b 100644 --- a/group/tests/behat/delete_groups.feature +++ b/group/tests/behat/delete_groups.feature @@ -16,8 +16,7 @@ Feature: Automatic deletion of groups and groupings | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group (without ID) | @@ -66,8 +65,7 @@ Feature: Automatic deletion of groups and groupings And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration When I set the field "groups" to "Group (with ID) (0)" Then the "Delete selected group" "button" should be disabled And I set the field "groups" to "Group (without ID) (0)" diff --git a/group/tests/behat/groups_import.feature b/group/tests/behat/groups_import.feature index 51ba389d670..eaea7d4c439 100644 --- a/group/tests/behat/groups_import.feature +++ b/group/tests/behat/groups_import.feature @@ -19,8 +19,7 @@ Feature: Importing of groups and groupings Scenario: Import groups and groupings as teacher Given I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager And I press "Import groups" @@ -44,8 +43,7 @@ Feature: Importing of groups and groupings Scenario: Import groups with idnumber when the user has proper permissions for the idnumber field Given I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager And I press "Import groups" @@ -82,15 +80,13 @@ Feature: Importing of groups and groupings Given I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Permissions" + And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | moodle/course:changeidnumber | Prevent | And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager And I press "Import groups" diff --git a/group/tests/behat/id_uniqueness.feature b/group/tests/behat/id_uniqueness.feature index 50fc619f6b8..14c18c46190 100644 --- a/group/tests/behat/id_uniqueness.feature +++ b/group/tests/behat/id_uniqueness.feature @@ -16,8 +16,7 @@ Feature: Uniqueness of Group ID number | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration Scenario: Group ID number uniqueness Given I press "Create group" diff --git a/group/tests/behat/update_groups.feature b/group/tests/behat/update_groups.feature index e7b428bb225..6da490d0c7f 100644 --- a/group/tests/behat/update_groups.feature +++ b/group/tests/behat/update_groups.feature @@ -16,8 +16,7 @@ Feature: Automatic updating of groups and groupings | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group (without ID) | @@ -73,8 +72,7 @@ Feature: Automatic updating of groups and groupings And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Group (with ID)" When I press "Edit group settings" Then the "idnumber" "field" should be readonly @@ -111,8 +109,7 @@ Feature: Automatic updating of groups and groupings And I log out And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Group (with ID)" And I press "Edit group settings" And I set the following fields to these values: @@ -138,8 +135,7 @@ Feature: Automatic updating of groups and groupings And I should not see "This enrolment key is already used for another group." And I am on homepage And I follow "Course 2" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group A | diff --git a/lib/editor/atto/tests/behat/autosave.feature b/lib/editor/atto/tests/behat/autosave.feature index 7a413eaed5c..fc45d208bda 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -55,7 +55,7 @@ Feature: Atto Autosave And I follow "Manage private files..." And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I follow "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "
Image test
" diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index cc4fe72010c..dd65fd0d193 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -43,20 +43,20 @@ Feature: Using the activity grade form element | scale[modgrade_point] | 100 | | Group mode | No groups | And I follow "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration When I expand all fieldsets Then I should not see "Some grades have already been awarded, so the grade type" And I set the field "scale[modgrade_type]" to "Scale" And I set the field "scale[modgrade_scale]" to "ABCDEF" And I press "Save and display" And I should not see "You cannot change the type, as grades already exist for this item" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I should not see "Some grades have already been awarded, so the grade type" And I set the field "scale[modgrade_scale]" to "Letter scale" And I press "Save and display" And I should not see "You cannot change the scale, as grades already exist for this item" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I should not see "Some grades have already been awarded, so the grade type" And I set the field "scale[modgrade_type]" to "Point" @@ -105,13 +105,14 @@ Feature: Using the activity grade form element And I follow "Test forum name" And I follow "Discussion subject" And I set the field "rating" to "D" - And I click on "Edit settings" "link" in the "Administration" "block" + And I follow "Test forum name" + And I navigate to "Edit settings" in current page administration When I expand all fieldsets Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" # Try saving the form and visiting it back to verify that everything is working ok. And I press "Save and display" And I should not see "When selecting a ratings aggregate type you must also select" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the field "Aggregate type" matches value "Average of ratings" And the field "scale[modgrade_type]" matches value "Scale" @@ -142,7 +143,7 @@ Feature: Using the activity grade form element | grade[modgrade_scale] | ABCDEF | And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "C" And I press "Save changes" @@ -152,7 +153,7 @@ Feature: Using the activity grade form element Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" # Try saving the form and visiting it back to verify everything is working ok. And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the field "grade[modgrade_type]" matches value "Scale" And the field "grade[modgrade_scale]" matches value "ABCDEF" @@ -185,7 +186,8 @@ Feature: Using the activity grade form element And I follow "Discussion subject" And I set the field "rating" to "100" And I press "Rate" - And I click on "Edit settings" "link" in the "Administration" "block" + And I follow "Test forum name" + And I navigate to "Edit settings" in current page administration When I expand all fieldsets 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 I set the field "Maximum grade" to "50" @@ -202,7 +204,7 @@ Feature: Using the activity grade form element | Description | Test assignment description | And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" diff --git a/login/tests/behat/change_password.feature b/login/tests/behat/change_password.feature index 0bddba3dd9f..2b24b35bb1c 100644 --- a/login/tests/behat/change_password.feature +++ b/login/tests/behat/change_password.feature @@ -49,9 +49,7 @@ Feature: Change password And the following "course enrolments" exist: | user | course | role | | testuser | c1 | student | - And I am on site homepage - And I expand "Courses" node - When I follow "Course 1" + When I follow "Log in" And I set the field "Username" to "testuser" And I set the field "Password" to "testuser" And I press "Log in" diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index f08b71d6d35..6f4ea2cf2b3 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 log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 click on "Grade" "link" in the "Submitted for grading" "table_row" And I should see "Page 1 of 3" @@ -127,7 +127,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 click on "Grade" "link" in the "Student 2" "table_row" And I wait until the page is ready @@ -138,5 +138,5 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "View annotated PDF..." in the "student2@example.com" "table_row" diff --git a/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature b/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature index 6409f330caf..227999bdda6 100644 --- a/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature @@ -49,7 +49,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Submitted for grading" "table_row" And I wait until the page is ready And I click on ".navigate-next-button" "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 55a66555d52..b93403e3fd0 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 log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 click on "Grade" "link" in the "Submitted for grading" "table_row" And I should see "Page 1 of 3" diff --git a/mod/assign/feedback/file/tests/behat/feedback_file.feature b/mod/assign/feedback/file/tests/behat/feedback_file.feature index 657d4e837b7..034f36d78fe 100644 --- a/mod/assign/feedback/file/tests/behat/feedback_file.feature +++ b/mod/assign/feedback/file/tests/behat/feedback_file.feature @@ -34,7 +34,7 @@ Feature: In an assignment, teacher can submit feedback files during grading | Maximum number of uploaded files | 2 | | Students submit in groups | Yes | And I follow "Test assignment name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I follow "Expand all" And I set the field "assignfeedback_file_enabled" to "1" And I press "Save and display" diff --git a/mod/assign/tests/behat/allow_another_attempt.feature b/mod/assign/tests/behat/allow_another_attempt.feature index 62d6530350c..de06901bca5 100644 --- a/mod/assign/tests/behat/allow_another_attempt.feature +++ b/mod/assign/tests/behat/allow_another_attempt.feature @@ -38,7 +38,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Allow another attempt | 1 | @@ -55,7 +55,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I should see "I'm the student first submission" @@ -112,7 +112,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should contain "No submission" @@ -142,7 +142,7 @@ Feature: In an assignment, students start a new attempt based on their previous # And I log in as "teacher1" # And I follow "Course 1" # And I follow "Test assignment name" -# And I click on "View all submissions" "link" in the "Administration" "block" +# And I navigate to "View all submissions" in current page administration # And "Student 1" row "Status" column of "generaltable" table should contain "Reopened" # And "Student 2" row "Status" column of "generaltable" table should contain "Reopened" # And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading" @@ -164,6 +164,6 @@ Feature: In an assignment, students start a new attempt based on their previous # And I log in as "teacher1" # And I follow "Course 1" # And I follow "Test assignment name" -# I click on "View all submissions" "link" in the "Administration" "block" +# I navigate to "View all submissions" in current page administration # And I click on "Grade" "link" in the "Student 1" "table_row" #And I should see "This is attempt 2 (3 attempts allowed)" diff --git a/mod/assign/tests/behat/assign_course_reset.feature b/mod/assign/tests/behat/assign_course_reset.feature index 5794f78dc88..4bfb36d7ec2 100644 --- a/mod/assign/tests/behat/assign_course_reset.feature +++ b/mod/assign/tests/behat/assign_course_reset.feature @@ -49,7 +49,7 @@ Feature: Assign reset And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I navigate to "View all submissions" node in "Assignment administration" + And I navigate to "View all submissions" in current page administration And I should see "Submitted for grading" And I navigate to "Reset" node in "Course administration" And I set the following fields to these values: @@ -58,13 +58,13 @@ Feature: Assign reset And I press "Continue" And I follow "Course 1" And I follow "Test assignment name" - And I navigate to "View all submissions" node in "Assignment administration" + And I navigate to "View all submissions" in current page administration Then I should not see "Submitted for grading" @javascript Scenario: Use course reset to remove user overrides. When I follow "Test assignment name" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -83,12 +83,12 @@ Feature: Assign reset And I press "Continue" And I follow "Course 1" And I follow "Test assignment name" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" Scenario: Use course reset to remove group overrides. When I follow "Test assignment name" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -107,5 +107,5 @@ Feature: Assign reset And I press "Continue" And I follow "Course 1" And I follow "Test assignment name" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/assign/tests/behat/assign_group_override.feature b/mod/assign/tests/behat/assign_group_override.feature index f45df2913e8..7757d2def74 100644 --- a/mod/assign/tests/behat/assign_group_override.feature +++ b/mod/assign/tests/behat/assign_group_override.feature @@ -42,7 +42,7 @@ Feature: Assign group override Scenario: Add, modify then delete a group override When I follow "Test assignment name" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -65,7 +65,7 @@ Feature: Assign group override Scenario: Duplicate a user override When I follow "Test assignment name" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -87,7 +87,7 @@ Feature: Assign group override Scenario: Allow a group to have a different due date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 1 | | id_allowsubmissionsfromdate_enabled | 0 | @@ -98,7 +98,7 @@ Feature: Assign group override | duedate[hour] | 08 | | duedate[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -123,7 +123,7 @@ Feature: Assign group override Scenario: Allow a group to have a different cut off date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 0 | | id_allowsubmissionsfromdate_enabled | 0 | @@ -134,7 +134,7 @@ Feature: Assign group override | cutoffdate[hour] | 08 | | cutoffdate[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -159,7 +159,7 @@ Feature: Assign group override Scenario: Allow a group to have a different start date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 0 | | id_allowsubmissionsfromdate_enabled | 1 | @@ -170,7 +170,7 @@ Feature: Assign group override | allowsubmissionsfromdate[hour] | 08 | | allowsubmissionsfromdate[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -197,7 +197,7 @@ Feature: Assign group override @javascript Scenario: Add both a user and group override and verify that both are applied correctly When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 0 | | id_allowsubmissionsfromdate_enabled | 1 | @@ -208,7 +208,7 @@ Feature: Assign group override | allowsubmissionsfromdate[hour] | 08 | | allowsubmissionsfromdate[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Assignment administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -220,7 +220,8 @@ Feature: Assign group override | allowsubmissionsfromdate[minute] | 00 | And I press "Save" And I should see "Wednesday, 1 January 2020, 8:00" - And I navigate to "User overrides" node in "Assignment administration" + And I follow "Test assignment name" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/assign/tests/behat/assign_user_override.feature b/mod/assign/tests/behat/assign_user_override.feature index 781350ca447..0cf35899612 100644 --- a/mod/assign/tests/behat/assign_user_override.feature +++ b/mod/assign/tests/behat/assign_user_override.feature @@ -31,7 +31,7 @@ Feature: Assign user override Scenario: Add, modify then delete a user override When I follow "Test assignment name" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -54,7 +54,7 @@ Feature: Assign user override Scenario: Duplicate a user override When I follow "Test assignment name" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -76,7 +76,7 @@ Feature: Assign user override Scenario: Allow a user to have a different due date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 1 | | id_allowsubmissionsfromdate_enabled | 0 | @@ -87,7 +87,7 @@ Feature: Assign user override | duedate[hour] | 08 | | duedate[minute] | 00 | And I press "Save and display" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -112,7 +112,7 @@ Feature: Assign user override Scenario: Allow a user to have a different cut off date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 0 | | id_allowsubmissionsfromdate_enabled | 0 | @@ -123,7 +123,7 @@ Feature: Assign user override | cutoffdate[hour] | 08 | | cutoffdate[minute] | 00 | And I press "Save and display" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -148,7 +148,7 @@ Feature: Assign user override Scenario: Allow a user to have a different start date When I follow "Test assignment name" - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_duedate_enabled | 0 | | id_allowsubmissionsfromdate_enabled | 1 | @@ -159,7 +159,7 @@ Feature: Assign user override | allowsubmissionsfromdate[hour] | 08 | | allowsubmissionsfromdate[minute] | 00 | And I press "Save and display" - And I navigate to "User overrides" node in "Assignment administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/assign/tests/behat/comment_inline.feature b/mod/assign/tests/behat/comment_inline.feature index 24951cbce01..b6033f2cf49 100644 --- a/mod/assign/tests/behat/comment_inline.feature +++ b/mod/assign/tests/behat/comment_inline.feature @@ -40,7 +40,7 @@ Feature: In an assignment, teachers can edit a students submission inline When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50 | @@ -50,7 +50,7 @@ Feature: In an assignment, teachers can edit a students submission inline And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I should see "50.00" in the "Student 1" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" And I should see "Graded" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/display_error_message_onbadformat.feature b/mod/assign/tests/behat/display_error_message_onbadformat.feature index 456edd850fb..3bc9106ac9c 100644 --- a/mod/assign/tests/behat/display_error_message_onbadformat.feature +++ b/mod/assign/tests/behat/display_error_message_onbadformat.feature @@ -28,7 +28,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I click on "View all submissions" "link" in the "Administration" "block" + Then I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50,,6" And I press "Save changes" @@ -58,7 +58,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I click on "View all submissions" "link" in the "Administration" "block" + Then I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50..6" And I press "Save changes" diff --git a/mod/assign/tests/behat/display_grade.feature b/mod/assign/tests/behat/display_grade.feature index 61bdebeab9e..53eb79fe43d 100644 --- a/mod/assign/tests/behat/display_grade.feature +++ b/mod/assign/tests/behat/display_grade.feature @@ -28,14 +28,14 @@ Feature: Check that the assignment grade can be updated correctly | Description | Test assignment description | | Use marking workflow | Yes | When I follow "Test assignment name" - Then I click on "View all submissions" "link" in the "Administration" "block" + Then I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" @javascript @@ -64,12 +64,12 @@ Feature: Check that the assignment grade can be updated correctly | Students submit in groups | Yes | | Group mode | No groups | When I follow "Test assignment name" - Then I click on "View all submissions" "link" in the "Administration" "block" + Then I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" And I press "Save changes" And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index 087fe9c1079..d8b792b44ce 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -40,7 +40,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 2" "table_row" And I set the following fields to these values: | Grade | 49 | @@ -58,7 +58,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 2" "table_row" And I click on "View a different attempt" "link" And I click on "//div[contains(concat(' ', normalize-space(@class), ' '), ' confirmation-dialogue ')]//input[@value='0']" "xpath_element" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index 33d970763bb..0f374f09694 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -36,18 +36,18 @@ Feature: In an assignment, the administrator can edit students' submissions And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 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 click on "View all submissions" "link" in the "Administration" "block" + 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 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. | And I press "Save changes" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I should see "I have seen the movie chef." diff --git a/mod/assign/tests/behat/filter_by_marker.feature b/mod/assign/tests/behat/filter_by_marker.feature index b80f514de61..8940c153e05 100644 --- a/mod/assign/tests/behat/filter_by_marker.feature +++ b/mod/assign/tests/behat/filter_by_marker.feature @@ -32,7 +32,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned | Use marking workflow | Yes | | Use marking allocation | Yes | And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "allocatedmarker" to "Marker 1" And I press "Save changes" @@ -42,7 +42,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I set the field "markerfilter" to "Marker 1" Then I should see "Student 1" And I should not see "Student 2" diff --git a/mod/assign/tests/behat/grading_status.feature b/mod/assign/tests/behat/grading_status.feature index 1f4c22af0c6..d826ec79c2a 100644 --- a/mod/assign/tests/behat/grading_status.feature +++ b/mod/assign/tests/behat/grading_status.feature @@ -31,7 +31,6 @@ Feature: View the grading status of an assignment And I log out # Add a submission. And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" And I click on ".collapsibleregioncaption" "css_element" And I should see "Not marked" And I follow "Course 1" @@ -42,7 +41,7 @@ Feature: View the grading status of an assignment And I set the following fields to these values: | Online text | I'm the student's first submission | And I press "Save changes" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And ".collapsibleregioncaption" "css_element" should not exist And I should not see "Not marked" And I log out @@ -50,7 +49,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Not marked" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" @@ -60,7 +59,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "In review" in the "Student 1" "table_row" And I log out # View the grading status as a student. @@ -69,7 +68,7 @@ Feature: View the grading status of an assignment And I follow "Test assignment name" And I should see "In review" in the "Grading status" "table_row" And I should not see "Great job! Lol, not really." - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And ".collapsibleregioncaption" "css_element" should not exist And I should not see "In review" And I log out @@ -77,7 +76,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "In review" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Marking workflow state" to "Released" @@ -85,7 +84,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Released" in the "Student 1" "table_row" And I log out # View the grading status as a student. @@ -94,7 +93,7 @@ Feature: View the grading status of an assignment And I follow "Test assignment name" And I should see "Released" in the "Grading status" "table_row" And I should see "Great job! Lol, not really." - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And ".collapsibleregioncaption" "css_element" should not exist And I should not see "Released" And I log out @@ -102,7 +101,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Released" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Marking workflow state" to "In marking" @@ -110,7 +109,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "In marking" in the "Student 1" "table_row" # The grade should also remain displayed as it's stored in the assign DB tables, but the final grade should be empty. And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" @@ -130,7 +129,6 @@ Feature: View the grading status of an assignment And I log out # Add a submission. And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" When I click on ".collapsibleregioncaption" "css_element" Then I should see "Not graded" And I follow "Course 1" @@ -146,7 +144,7 @@ Feature: View the grading status of an assignment And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should not see "Graded" in the "Student 1" "table_row" And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "50" @@ -155,7 +153,7 @@ Feature: View the grading status of an assignment And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Graded" in the "Student 1" "table_row" And I log out # View the grading status as a student. @@ -164,7 +162,7 @@ Feature: View the grading status of an assignment And I follow "Test assignment name" And I should see "Graded" in the "Grading status" "table_row" And I should see "Great job! Lol, not really." - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And ".collapsibleregioncaption" "css_element" should not exist And I should not see "Graded" And I log out diff --git a/mod/assign/tests/behat/grant_extension.feature b/mod/assign/tests/behat/grant_extension.feature index b45e2bba413..ab84038c93c 100644 --- a/mod/assign/tests/behat/grant_extension.feature +++ b/mod/assign/tests/behat/grant_extension.feature @@ -35,7 +35,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Grant extension" And I should see "Student 1 (student1@example.com)" @@ -56,7 +56,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" And I set the field "operation" to "Grant extension" And I click on "Go" "button" confirming the dialogue @@ -88,7 +88,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Grant extension" And I should see "Student 1 (student1@example.com)" @@ -110,7 +110,7 @@ Feature: Grant an extension to an offline student And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" And I set the field "operation" to "Grant extension" And I click on "Go" "button" confirming the dialogue diff --git a/mod/assign/tests/behat/group_submission.feature b/mod/assign/tests/behat/group_submission.feature index dc6a8d6071a..b30e71b01f8 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -35,26 +35,26 @@ Feature: Group assignment submissions | Students submit in groups | Yes | | Group mode | No groups | And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration Then "//tr[contains(., 'Student 0')][contains(., 'Default group')]" "xpath_element" should exist And "//tr[contains(., 'Student 1')][contains(., 'Default group')]" "xpath_element" should exist And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist - And I follow "Edit settings" + And I follow "Test assignment name" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Group mode | Separate groups | And I press "Save and return to course" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Group mode | Separate groups | And I press "Save and display" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I add "Student 0 (student0@example.com)" user to "Group 1" group members And I add "Student 1 (student1@example.com)" user to "Group 1" group members And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist And I should not see "Student 2" @@ -113,7 +113,7 @@ Feature: Group assignment submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading" @@ -130,7 +130,7 @@ Feature: Group assignment submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 952c65b60e6..6f6a230f413 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -27,7 +27,7 @@ Feature: Outcome grading | Name | Test Scale | | Scale | Disappointing, Excellent, Good, Very good, Excellent | And I press "Save changes" - And I follow "Outcomes" + And I navigate to "Outcomes" node in "Site administration > Grades" And I press "Add a new outcome" And I set the following fields to these values: | Full name | Outcome Test | @@ -62,7 +62,7 @@ Feature: Outcome grading When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 0" "table_row" And I set the following fields to these values: | Outcome Test: | Excellent | @@ -70,7 +70,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row" @@ -86,8 +86,7 @@ Feature: Outcome grading | Group 1 | C1 | G1 | And I log in as "teacher1" And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I navigate to "Users > Groups" in current page administration And I add "Student 0 (student0@example.com)" user to "Group 1" group members And I add "Student 1 (student1@example.com)" user to "Group 1" group members And I am on site homepage @@ -112,7 +111,7 @@ Feature: Outcome grading When I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 0" "table_row" And I set the following fields to these values: | Outcome Test: | Excellent | @@ -121,7 +120,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should see "Outcome Test: Excellent" in the "Student 1" "table_row" And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row" @@ -133,7 +132,7 @@ Feature: Outcome grading And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Outcome Test: Excellent" in the "Student 0" "table_row" And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row" And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row" diff --git a/mod/assign/tests/behat/prevent_submission_changes.feature b/mod/assign/tests/behat/prevent_submission_changes.feature index c12760483f7..d6fc08a83ac 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 log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Prevent submission changes" Then I should see "Submission changes not allowed" @@ -59,7 +59,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Allow submission changes" And I should not see "Submission changes not allowed" @@ -98,7 +98,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - When I click on "View all submissions" "link" in the "Administration" "block" + When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" And I click on "Go" "button" confirming the dialogue Then I should see "Submission changes not allowed" in the "Student 1" "table_row" @@ -112,7 +112,7 @@ Feature: Prevent or allow assignment submission changes And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" And I set the field "id_operation" to "Unlock submissions" And I click on "Go" "button" confirming the dialogue diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index 0b4357aa1f7..5305f075265 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -38,7 +38,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I wait until the page is ready And I press "Save changes" @@ -110,7 +110,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 50.0 | @@ -120,7 +120,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I click on "Quick grading" "checkbox" And I set the field "User grade" to "60.0" And I press "Save all quick grading changes" @@ -148,7 +148,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Hide User picture" "link" And I click on "Hide Full name" "link" And I click on "Hide Email address" "link" diff --git a/mod/assign/tests/behat/reopen_locked_submission.feature b/mod/assign/tests/behat/reopen_locked_submission.feature index 63e1638992f..a6ff8283aa9 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -41,7 +41,7 @@ Feature: Submissions are unlocked when a new attempt is given And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Prevent submission changes" And I should see "Submission changes not allowed" @@ -76,7 +76,7 @@ Feature: Submissions are unlocked when a new attempt is given And I am on site homepage And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + 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 follow "Prevent submission changes" And I should see "Submission changes not allowed" diff --git a/mod/assign/tests/behat/rescale_grades.feature b/mod/assign/tests/behat/rescale_grades.feature index 733fd83b4cd..47f57276076 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -26,46 +26,47 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c | Assignment name | Test assignment name | | Description | Test assignment description | And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade out of 100" to "40" And I press "Save changes" And I press "Ok" And I follow "Edit settings" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And "Student 1" row "Grade" column of "generaltable" table should contain "40.00" + And I follow "Test assignment name" Scenario: Update the max grade for an assignment without rescaling existing grades - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Rescale existing grades" to "No" And I set the field "Maximum grade" to "80" When I press "Save and display" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" Scenario: Update an assignment without touching the max grades - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Rescale existing grades" to "No" And I set the field "Maximum grade" to "80" And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I press "Save and display" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Rescale existing grades" to "Yes" And I set the field "Maximum grade" to "80" When I press "Save and display" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" Scenario: Update the max grade for an assignment rescaling existing grades - Given I click on "Edit settings" "link" in the "Administration" "block" + Given I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Rescale existing grades" to "Yes" And I set the field "Maximum grade" to "50" When I press "Save and display" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then "Student 1" row "Grade" column of "generaltable" table should contain "20.00" diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index e68911f7274..f012247e5a6 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -44,7 +44,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Not marked" in the "I'm the student's first submission" "table_row" And I click on "Grade" "link" in the "I'm the student's first submission" "table_row" And I set the field "Grade out of 100" to "50" @@ -54,7 +54,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "In review" in the "I'm the student's first submission" "table_row" @javascript @@ -65,7 +65,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Ready for release" in the "I'm the student's first submission" "table_row" And I click on "Grade" "link" in the "I'm the student's first submission" "table_row" And I set the field "Marking workflow state" to "Released" @@ -73,7 +73,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Released" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" @@ -92,7 +92,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Ready for release" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" @@ -102,7 +102,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Released" in the "Student 1" "table_row" And I log out And I log in as "student1" diff --git a/mod/assign/tests/behat/submission_comments.feature b/mod/assign/tests/behat/submission_comments.feature index 4d8fd4291a1..68a10815273 100644 --- a/mod/assign/tests/behat/submission_comments.feature +++ b/mod/assign/tests/behat/submission_comments.feature @@ -52,7 +52,7 @@ Feature: In an assignment, students can comment in their submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" When I set the following fields to these values: | Grade out of 100 | 50 | @@ -61,7 +61,7 @@ Feature: In an assignment, students can comment in their submissions And I press "Ok" And I click on "Edit settings" "link" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration Then I should see "50.00" in the "Student 1" "table_row" And I should see "I'm the teacher feedback" in the "Student 1" "table_row" @@ -72,7 +72,7 @@ Feature: In an assignment, students can comment in their submissions And I log in as "teacher1" And I follow "Course 1" And I follow "Test assignment name" - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" And I set the following fields to these values: | Grade out of 100 | 0 | diff --git a/mod/assign/tests/behat/submit_without_group.feature b/mod/assign/tests/behat/submit_without_group.feature index af7826bc39c..6c24033cbb4 100644 --- a/mod/assign/tests/behat/submit_without_group.feature +++ b/mod/assign/tests/behat/submit_without_group.feature @@ -90,7 +90,7 @@ Feature: Submit assignment without group And I follow "Allow default group" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Default group" in the "Student 1" "table_row" And I should see "Default group" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" @@ -100,7 +100,7 @@ Feature: Submit assignment without group And I follow "Require group membership" And I should see "0" in the "Groups" "table_row" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Not a member of any group, so unable to make submissions." in the "Student 1" "table_row" And I should see "Not a member of any group, so unable to make submissions." in the "Student 2" "table_row" And I should not see "Submitted for grading" in the "Student 1" "table_row" @@ -110,7 +110,7 @@ Feature: Submit assignment without group And I follow "Require group membership" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Group 1" in the "Student 1" "table_row" And I should see "Group 1" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" @@ -128,5 +128,5 @@ Feature: Submit assignment without group And I follow "Course 3" And I follow "Require group membership" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." - And I click on "View all submissions" "link" in the "Administration" "block" + And I navigate to "View all submissions" in current page administration And I should see "Member of more than one group, so unable to make submissions." in the "Student 3" "table_row" diff --git a/mod/book/tests/behat/create_chapters.feature b/mod/book/tests/behat/create_chapters.feature index 54d4253bdbf..b249fdd3b41 100644 --- a/mod/book/tests/behat/create_chapters.feature +++ b/mod/book/tests/behat/create_chapters.feature @@ -72,7 +72,7 @@ Feature: In a book, create chapters and sub chapters And "Delete chapter \"1. Dummy first chapter\"" "link" should exist in the "Table of contents" "block" And "Hide chapter \"1. Dummy first chapter\"" "link" should exist in the "Table of contents" "block" And "Add new chapter" "link" should exist in the "Table of contents" "block" - When I click on "Turn editing off" "link" in the "Administration" "block" + When I press "Turn editing off" Then "Edit chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" And "Delete chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" And "Hide chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" diff --git a/mod/book/tests/behat/edit_navigation_options.feature b/mod/book/tests/behat/edit_navigation_options.feature index 6fbe4f39119..396ba38dcd7 100644 --- a/mod/book/tests/behat/edit_navigation_options.feature +++ b/mod/book/tests/behat/edit_navigation_options.feature @@ -42,13 +42,13 @@ Feature: In a book, change the navigation options And "Next" "link" should not exist And I click on "2. Test chapter 2" "link" in the "Table of contents" "block" And "Previous" "link" should not exist - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the field "Style of navigation" to "Images" And I press "Save and display" And "//a/child::img[contains(@src, 'nav_next')]" "xpath_element" should exist And I click on "2. Test chapter 2" "link" in the "Table of contents" "block" And "//a/child::img[contains(@src, 'nav_prev')]" "xpath_element" should exist - When I click on "Edit settings" "link" in the "Administration" "block" + When I navigate to "Edit settings" in current page administration And I set the field "Style of navigation" to "Text" And I press "Save and display" Then "Next" "link" should exist diff --git a/mod/book/tests/behat/log_entries.feature b/mod/book/tests/behat/log_entries.feature index af2a9384b59..805cdb08ec9 100644 --- a/mod/book/tests/behat/log_entries.feature +++ b/mod/book/tests/behat/log_entries.feature @@ -33,9 +33,9 @@ Feature: In a book, verify log entries And I press "Save changes" And I click on "Next" "link" And I click on "Previous" "link" - And I click on "Print book" "link" in the "Administration" "block" - And I click on "Generate IMS CP" "link" in the "Administration" "block" - And I click on "Logs" "link" in the "Administration" "block" + And I navigate to "Print book" in current page administration + And I navigate to "Generate IMS CP" in current page administration + And I navigate to "Logs" in current page administration Then I should see "Book exported" And I should see "Book printed" And I should see "Chapter viewed" in the "#report_log_r2_c5" "css_element" diff --git a/mod/chat/tests/behat/chat_course_reset.feature b/mod/chat/tests/behat/chat_course_reset.feature index bbb4a5be90d..02b8536f7dd 100644 --- a/mod/chat/tests/behat/chat_course_reset.feature +++ b/mod/chat/tests/behat/chat_course_reset.feature @@ -31,7 +31,7 @@ Feature: Chat reset | startdate[year] | 2020 | And I press "Save and display" And I follow "Test chat name" - And I navigate to "Edit settings" node in "Chat administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | chattime[day] | 1 | | chattime[month] | January | @@ -50,6 +50,6 @@ Feature: Chat reset And I press "Continue" Then I follow "Course 1" And I follow "Test chat name" - And I navigate to "Edit settings" node in "Chat administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the "chattime[year]" select box should contain "2030" diff --git a/mod/choice/tests/behat/modify_choice.feature b/mod/choice/tests/behat/modify_choice.feature index 75fc6e89a4d..5c6d9daf4fb 100644 --- a/mod/choice/tests/behat/modify_choice.feature +++ b/mod/choice/tests/behat/modify_choice.feature @@ -35,7 +35,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I click on "View 1 responses" "link" in the "Administration" "block" + And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 1" "checkbox" And I select "Delete" from the "With selected" singleselect And "Student 1 Option 1" "checkbox" should not exist @@ -53,7 +53,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I click on "View 1 responses" "link" in the "Administration" "block" + And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 1" "checkbox" And I click on "Student 2 Not answered yet" "checkbox" And I click on "Student 3 Not answered yet" "checkbox" @@ -71,7 +71,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the field "Allow more than one choice to be selected" to "Yes" And I press "Save and return to course" And I log out @@ -84,7 +84,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I click on "View 1 responses" "link" in the "Administration" "block" + And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 2" "checkbox" And I select "Delete" from the "With selected" singleselect And I click on "Student 1 Option 1" "checkbox" @@ -107,7 +107,7 @@ Feature: Teacher can modify choices of the students And I log in as "teacher1" And I follow "Course 1" And I follow "Choice name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Publish results | Always show results to students | | Privacy of results | Publish full results, showing names and their choices | diff --git a/mod/choice/tests/behat/my_home.feature b/mod/choice/tests/behat/my_home.feature index 2ff3cc948cd..5e5d5edc8c6 100644 --- a/mod/choice/tests/behat/my_home.feature +++ b/mod/choice/tests/behat/my_home.feature @@ -39,7 +39,6 @@ Feature: Test the display of the choice module on my home Scenario: View my home as a student before answering the choice Given I log in as "student1" - When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have Choices that need attention" And I should see "Not answered yet" And I log out @@ -51,7 +50,7 @@ Feature: Test the display of the choice module on my home And I should see "Your selection: Option 1" And I should see "Your choice has been saved" And "Save my choice" "button" should not exist - When I click on "Dashboard" "link" in the "Navigation" "block" + When I follow "Dashboard" Then I should not see "You have Choices that need attention" And I log out @@ -64,7 +63,6 @@ Feature: Test the display of the choice module on my home And "Save my choice" "button" should not exist And I log out When I log in as "teacher1" - And I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have Choices that need attention" And I should see "View 1 responses" And I log out diff --git a/mod/choice/tests/behat/remove_choice_options.feature b/mod/choice/tests/behat/remove_choice_options.feature index 965fae488ab..1d1c6dececf 100644 --- a/mod/choice/tests/behat/remove_choice_options.feature +++ b/mod/choice/tests/behat/remove_choice_options.feature @@ -44,7 +44,7 @@ Feature: Update a choice activity removing options And I follow "Course 1" And I follow "Choice name" And I should see "View 2 responses" - And I navigate to "Edit settings" node in "Choice administration" + And I navigate to "Edit settings" in current page administration And I set the field "option[2]" to "" And I press "Save and display" Then I should see "View 1 responses" diff --git a/mod/feedback/tests/behat/anonymous.feature b/mod/feedback/tests/behat/anonymous.feature index 499bf056cfc..f344d00dc7c 100644 --- a/mod/feedback/tests/behat/anonymous.feature +++ b/mod/feedback/tests/behat/anonymous.feature @@ -23,12 +23,12 @@ Feature: Anonymous feedback | user | course | role | | manager | Acceptance test site | manager | And the following "activities" exist: - | activity | name | course | idnumber | anonymous | publish_stats | - | feedback | Site feedback | Acceptance test site | feedback0 | 1 | 1 | - | feedback | Course feedback | C1 | feedback1 | 1 | 1 | + | activity | name | course | idnumber | anonymous | publish_stats | section | + | feedback | Site feedback | Acceptance test site | feedback0 | 1 | 1 | 1 | + | feedback | Course feedback | C1 | feedback1 | 1 | 1 | 0 | When I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" + And I follow "Site feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | @@ -48,7 +48,7 @@ Feature: Anonymous feedback Scenario: Complete anonymous feedback on the front page as an authenticated user And I log in as "user1" And I am on site homepage - When I navigate to "Site feedback" node in "Site pages" + When I follow "Site feedback" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -69,7 +69,7 @@ Feature: Anonymous feedback And I log out And I log in as "user1" And I am on site homepage - When I navigate to "Site feedback" node in "Site pages" + When I follow "Site feedback" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -81,7 +81,7 @@ Feature: Anonymous feedback And I log out And I log in as "user2" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" + And I follow "Site feedback" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -100,8 +100,8 @@ Feature: Anonymous feedback And I log out And I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" - And I click on "Show responses" "link" in the "Administration" "block" + And I follow "Site feedback" + And I navigate to "Show responses" in current page administration And I should not see "Username" And I should see "Anonymous entries (2)" And I follow "Response number: 1" @@ -165,8 +165,8 @@ Feature: Anonymous feedback And I should see "1 (50.00 %)" in the "No" "table_row" And I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" - And I click on "Show responses" "link" in the "Administration" "block" + And I follow "Site feedback" + And I navigate to "Show responses" in current page administration And I should see "Anonymous entries (2)" And I follow "Response number: 1" And I should see "Response number: 1 (Anonymous)" @@ -225,7 +225,7 @@ Feature: Anonymous feedback And I should see "Do you like this course?" And I press "Continue" And I should not see "Answer the questions..." - And I click on "Show responses" "link" in the "Administration" "block" + And I navigate to "Show responses" in current page administration And I should not see "Username" And I should see "Anonymous entries (2)" And I follow "Response number: 1" diff --git a/mod/feedback/tests/behat/coursemapping.feature b/mod/feedback/tests/behat/coursemapping.feature index dc2bee3d538..a07988ecf74 100644 --- a/mod/feedback/tests/behat/coursemapping.feature +++ b/mod/feedback/tests/behat/coursemapping.feature @@ -31,12 +31,12 @@ Feature: Mapping courses in a feedback | user | course | role | | manager | Acceptance test site | manager | And the following "activities" exist: - | activity | name | course | idnumber | anonymous | publish_stats | - | feedback | Course feedback | Acceptance test site | feedback0 | 1 | 1 | - | feedback | Another feedback | C1 | feedback1 | 1 | 1 | + | activity | name | course | idnumber | anonymous | publish_stats | section | + | feedback | Course feedback | Acceptance test site | feedback0 | 1 | 1 | 1 | + | feedback | Another feedback | C1 | feedback1 | 1 | 1 | 0 | When I log in as "manager" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" + And I follow "Course feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | @@ -77,7 +77,7 @@ Feature: Mapping courses in a feedback Scenario: Site feedback is not mapped to any course And I log in as "user1" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" + And I follow "Course feedback" And I follow "Answer the questions..." And I should see "Acceptance test site" in the ".feedback_form" "css_element" And I set the following fields to these values: @@ -112,9 +112,9 @@ Feature: Mapping courses in a feedback And I log out And I log in as "manager" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" + And I follow "Course feedback" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback And I should see "1 (33.33 %)" in the "option a" "table_row" @@ -138,7 +138,7 @@ Feature: Mapping courses in a feedback Scenario: Site feedback is mapped to courses And I log in as "manager" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" + And I follow "Course feedback" And I follow "Map feedback to courses" And I set the field "Courses" to "Course 2" And I set the field "Courses" to "Course 3" @@ -147,7 +147,7 @@ Feature: Mapping courses in a feedback And I log in as "user1" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" + And I follow "Course feedback" And I should see "You can only access this feedback from a course" And I should not see "Answer the questions..." @@ -196,8 +196,8 @@ Feature: Mapping courses in a feedback And I log out And I log in as "manager" And I am on site homepage - And I navigate to "Course feedback" node in "Site pages" - And I click on "Analysis" "link" in the "Administration" "block" + And I follow "Course feedback" + And I navigate to "Analysis" in current page administration And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback And I should see "0" in the "option a" "table_row" @@ -237,7 +237,7 @@ Feature: Mapping courses in a feedback And I turn editing mode on And I add the "Feedback" block And I add the "Main menu" block - And I click on "Delete" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'Course feedback')]" "xpath_element" + And I click on "Delete" "link" in the "Course feedback" activity And I press "Yes" And I follow "Turn editing off" And I am on site homepage diff --git a/mod/feedback/tests/behat/groups.feature b/mod/feedback/tests/behat/groups.feature index b5cbd15340c..de3bd2f5431 100644 --- a/mod/feedback/tests/behat/groups.feature +++ b/mod/feedback/tests/behat/groups.feature @@ -46,13 +46,13 @@ Feature: Feedbacks in courses with groups | user | course | role | | manager | Acceptance test site | manager | And the following "activities" exist: - | activity | name | course | idnumber | anonymous | publish_stats | groupmode | - | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 | - | feedback | Course feedback | C1 | feedback1 | 2 | 1 | 1 | - | feedback | Course anon feedback | C1 | feedback2 | 1 | 1 | 1 | + | activity | name | course | idnumber | anonymous | publish_stats | groupmode | section | + | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 | 1 | + | feedback | Course feedback | C1 | feedback1 | 2 | 1 | 1 | 0 | + | feedback | Course anon feedback | C1 | feedback2 | 1 | 1 | 1 | 0 | When I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" + And I follow "Site feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | @@ -139,7 +139,7 @@ Feature: Feedbacks in courses with groups And I log in as "teacher" And I follow "Course 1" And I follow "Course feedback" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback And I should see "2 (28.57 %)" in the "Yes of course" "table_row" @@ -249,7 +249,7 @@ Feature: Feedbacks in courses with groups And I log in as "teacher" And I follow "Course 1" And I follow "Course anon feedback" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback And I should see "2 (28.57 %)" in the "Yes of course" "table_row" diff --git a/mod/feedback/tests/behat/multichoice.feature b/mod/feedback/tests/behat/multichoice.feature index 84773eaa6e6..02fd332b585 100644 --- a/mod/feedback/tests/behat/multichoice.feature +++ b/mod/feedback/tests/behat/multichoice.feature @@ -141,7 +141,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -162,7 +162,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I click on "Analysis" "link" in the "Administration" "block" + And I follow "Analysis" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should not see "%" in the "option b" "table_row" @@ -285,7 +285,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -306,7 +306,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I click on "Analysis" "link" in the "Administration" "block" + And I follow "Analysis" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should see "1 (100.00 %)" in the "option b" "table_row" @@ -408,7 +408,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 3" And I show chart data for the "multichoice1" feedback @@ -429,7 +429,7 @@ Feature: Testing multichoice questions in feedback And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" And I press "Save changes to question" - And I click on "Analysis" "link" in the "Administration" "block" + And I follow "Analysis" And I show chart data for the "multichoice1" feedback And I should see "1 (100.00 %)" in the "option a" "table_row" And I should not see "%" in the "option b" "table_row" diff --git a/mod/feedback/tests/behat/non_anonymous.feature b/mod/feedback/tests/behat/non_anonymous.feature index ef2cf7f4961..5d20e74e086 100644 --- a/mod/feedback/tests/behat/non_anonymous.feature +++ b/mod/feedback/tests/behat/non_anonymous.feature @@ -23,12 +23,12 @@ Feature: Non anonymous feedback | user | course | role | | manager | Acceptance test site | manager | And the following "activities" exist: - | activity | name | course | idnumber | anonymous | publish_stats | - | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | - | feedback | Course feedback | C1 | feedback1 | 2 | 1 | + | activity | name | course | idnumber | anonymous | publish_stats | section | + | feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 | + | feedback | Course feedback | C1 | feedback1 | 2 | 1 | 0 | When I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" + And I follow "Site feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | @@ -48,7 +48,7 @@ Feature: Non anonymous feedback Scenario: Complete non anonymous feedback on the front page as an authenticated user And I log in as "user1" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" + And I follow "Site feedback" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -69,7 +69,7 @@ Feature: Non anonymous feedback And I log out And I log in as "user1" And I am on site homepage - When I navigate to "Site feedback" node in "Site pages" + When I follow "Site feedback" And I follow "Answer the questions..." And I should see "Do you like our site?" And I set the following fields to these values: @@ -78,7 +78,7 @@ Feature: Non anonymous feedback And I log out And I log in as "user2" And I am on site homepage - When I navigate to "Site feedback" node in "Site pages" + When I follow "Site feedback" And I follow "Answer the questions..." And I set the following fields to these values: | Not at all | 1 | @@ -95,8 +95,8 @@ Feature: Non anonymous feedback And I log out And I log in as "manager" And I am on site homepage - And I navigate to "Site feedback" node in "Site pages" - And I click on "Show responses" "link" in the "Administration" "block" + And I follow "Site feedback" + And I navigate to "Show responses" in current page administration And I should see "Username" And I should see "Non anonymous entries (2)" And I should not see "Anonymous entries" @@ -152,7 +152,7 @@ Feature: Non anonymous feedback And I should see "Do you like this course?" And I press "Continue" And I should not see "Answer the questions..." - And I click on "Show responses" "link" in the "Administration" "block" + And I navigate to "Show responses" in current page administration And I should see "Non anonymous entries (2)" And I should not see "Anonymous" And I click on "," "link" in the "Username 1" "table_row" diff --git a/mod/feedback/tests/behat/question_types.feature b/mod/feedback/tests/behat/question_types.feature index ab60b34f459..1ceb5ad04e3 100644 --- a/mod/feedback/tests/behat/question_types.feature +++ b/mod/feedback/tests/behat/question_types.feature @@ -99,14 +99,14 @@ Feature: Test creating different types of feedback questions for anonymous feedb When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 8" And I log out And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "C1" in the "(info)" "table" And I should see "my long answer" in the "(longertext)" "table" And I should see "lots of feedbacks" in the "(longertext)" "table" diff --git a/mod/feedback/tests/behat/question_types_non_anon.feature b/mod/feedback/tests/behat/question_types_non_anon.feature index b107d5c57bb..954f8007c54 100644 --- a/mod/feedback/tests/behat/question_types_non_anon.feature +++ b/mod/feedback/tests/behat/question_types_non_anon.feature @@ -103,14 +103,14 @@ Feature: Test creating different types of feedback questions for non-anonymous f When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 9" And I log out And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I click on "Analysis" "link" in the "Administration" "block" + And I navigate to "Analysis" in current page administration And I should see "C1" in the "(info)" "table" And I should see "my long answer" in the "(longertext)" "table" And I should see "lots of feedbacks" in the "(longertext)" "table" diff --git a/mod/feedback/tests/behat/show_nonrespondents.feature b/mod/feedback/tests/behat/show_nonrespondents.feature index 33dd3e70383..2a09884d83b 100644 --- a/mod/feedback/tests/behat/show_nonrespondents.feature +++ b/mod/feedback/tests/behat/show_nonrespondents.feature @@ -66,7 +66,7 @@ Feature: Show users who have not responded to the feedback survey And I log in as "teacher1" And I follow "Course 1" And I follow "Frogs" - And I click on "Show non-respondents" "link" in the "Administration" "block" + And I navigate to "Show non-respondents" in current page administration # Should only show student 2; not student 1 (they did it) or 3 (not in grouping). Then I should see "Student 2" diff --git a/mod/forum/tests/behat/completion_condition_number_discussions.feature b/mod/forum/tests/behat/completion_condition_number_discussions.feature index 1089efe124e..7182bb251a8 100644 --- a/mod/forum/tests/behat/completion_condition_number_discussions.feature +++ b/mod/forum/tests/behat/completion_condition_number_discussions.feature @@ -19,7 +19,7 @@ Feature: Set a certain number of discussions as a completion condition for a for And I log in as "teacher1" And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" diff --git a/mod/forum/tests/behat/discussion_subscriptions.feature b/mod/forum/tests/behat/discussion_subscriptions.feature index e3cb9314ce5..aa8b6d5c115 100644 --- a/mod/forum/tests/behat/discussion_subscriptions.feature +++ b/mod/forum/tests/behat/discussion_subscriptions.feature @@ -138,7 +138,7 @@ Feature: A user can control their own subscription preferences for a discussion And I am on site homepage And I follow "Course 1" And I follow "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Subscription mode | Auto subscription | And I press "Save and return to course" @@ -184,7 +184,7 @@ Feature: A user can control their own subscription preferences for a discussion And I am on site homepage And I follow "Course 1" And I follow "Test forum name" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Subscription mode | Auto subscription | And I press "Save and return to course" @@ -320,36 +320,39 @@ Feature: A user can control their own subscription preferences for a discussion And I log out And I log in as "student1" And I follow "Course 1" - And I follow "Test forum name" - When I follow "Test post subject one" - Then I should see "Subscribe to this forum" - And I should see "Subscribe to this discussion" - And I follow "Subscribe to this forum" - And I should see "Student One will be notified of new posts in 'Test forum name'" + When I follow "Test forum name" + Then "Subscribe to this forum" "link" should exist in current page administration And I follow "Test post subject one" - And I should see "Unsubscribe from this forum" - And I should see "Unsubscribe from this discussion" - And I follow "Unsubscribe from this discussion" + And "You are not subscribed to this discussion. Click to subscribe" "link" should exist + 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 + And I follow "Test post subject one" + And "You are subscribed to this discussion. Click to unsubscribe" "link" should exist + And I follow "You are subscribed to this discussion. Click to unsubscribe" And I should see "Student One will NOT be notified of new posts in 'Test post subject one' of 'Test forum name'" And I follow "Test post subject one" - And I should see "Unsubscribe from this forum" - And I should see "Subscribe to this discussion" - And I follow "Unsubscribe from this forum" + #And I should see "Unsubscribe from this forum" + And "You are not subscribed to this discussion. Click to subscribe" "link" should exist + And I follow "Test forum name" + And I navigate to "Unsubscribe from this forum" in current page administration And I should see "Student One will NOT be notified of new posts in 'Test forum name'" + And "Subscribe to this forum" "link" should exist in current page administration And I follow "Test post subject one" - And I should see "Subscribe to this forum" - And I should see "Subscribe to this discussion" - And I follow "Subscribe to this discussion" + And "You are not subscribed to this discussion. Click to subscribe" "link" should exist + 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 I should see "Subscribe to this forum" - And I should see "Unsubscribe from this discussion" - And I follow "Subscribe to this forum" + And "You are subscribed to this discussion. Click to unsubscribe" "link" should exist + 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 And I follow "Test post subject one" - And I should see "Unsubscribe from this forum" - And I should see "Unsubscribe from this discussion" - And I follow "Unsubscribe from this forum" + And "You are subscribed to this discussion. Click to unsubscribe" "link" should exist + And I follow "Test forum name" + And I navigate to "Unsubscribe from this forum" in current page administration And I should see "Student One will NOT be notified of new posts in 'Test forum name'" + And "Subscribe to this forum" "link" should exist in current page administration And I follow "Test post subject one" - And I should see "Subscribe to this forum" - And I should see "Subscribe to this discussion" + And "You are not subscribed to this discussion. Click to subscribe" "link" should exist diff --git a/mod/forum/tests/behat/edit_post_student.feature b/mod/forum/tests/behat/edit_post_student.feature index d73f74b0982..4b7bbbcce6a 100644 --- a/mod/forum/tests/behat/edit_post_student.feature +++ b/mod/forum/tests/behat/edit_post_student.feature @@ -44,9 +44,7 @@ Feature: Students can edit or delete their forum posts within a set time limit Scenario: Time limit expires Given I log out And I log in as "admin" - And I expand "Site administration" node - And I expand "Security" node - And I follow "Site policies" + And I navigate to "Security > Site policies" in site administration And I set the field "Maximum time to edit posts" to "1 minutes" And I press "Save changes" And I am on site homepage diff --git a/mod/forum/tests/behat/forum_subscriptions_availability.feature b/mod/forum/tests/behat/forum_subscriptions_availability.feature index a6c880b5b4e..06c8292368c 100644 --- a/mod/forum/tests/behat/forum_subscriptions_availability.feature +++ b/mod/forum/tests/behat/forum_subscriptions_availability.feature @@ -46,18 +46,19 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Description | Test forum description | | Subscription mode | Forced subscription | And I follow "Forced Forum 1" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration Then I should see "Student 1" And I should see "Teacher Teacher" And I should see "Student 2" And I should see "Student 3" - And I click on "Edit settings" "link" in the "Administration" "block" + And I follow "Forced Forum 1" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I click on "Add restriction..." "button" And I click on "Grouping" "button" in the "Add restriction..." "dialogue" And I set the field with xpath "//select[@name='id']" to "Grouping 1" And I press "Save and display" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration And I should see "Student 1" And I should see "Teacher Teacher" And I should not see "Student 2" @@ -71,7 +72,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Subscription mode | Forced subscription | | Visible | Show | And I follow "Forced Forum 2" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration Then I should see "Teacher Teacher" And I should see "Student 1" And I should see "Student 2" @@ -86,7 +87,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Subscription mode | Forced subscription | | Visible | Hide | And I follow "Forced Forum 2" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration Then I should see "Teacher Teacher" And I should not see "Student 1" And I should not see "Student 2" @@ -100,18 +101,19 @@ Feature: As a teacher I need to see an accurate list of subscribed users | Description | Test forum description | | Subscription mode | Auto subscription | And I follow "Forced Forum 1" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration Then I should see "Student 1" And I should see "Teacher Teacher" And I should see "Student 2" And I should see "Student 3" - And I click on "Edit settings" "link" in the "Administration" "block" + And I follow "Forced Forum 1" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I click on "Add restriction..." "button" And I click on "Grouping" "button" in the "Add restriction..." "dialogue" And I set the field with xpath "//select[@name='id']" to "Grouping 1" And I press "Save and display" - And I click on "Show/edit current subscribers" "link" in the "Administration" "block" + And I navigate to "Show/edit current subscribers" in current page administration And I should see "Student 1" And I should see "Teacher Teacher" And I should not see "Student 2" diff --git a/mod/glossary/tests/behat/categories.feature b/mod/glossary/tests/behat/categories.feature index cd8c16e21e3..80fb0349214 100644 --- a/mod/glossary/tests/behat/categories.feature +++ b/mod/glossary/tests/behat/categories.feature @@ -25,10 +25,7 @@ Feature: Glossary entries can be organised in categories | label | name | check autolinking of CategoryAutoLinks and CategoryNoLinks text | C1 | label1 | # Log in as admin and enable autolinking filter And I log in as "admin" - And I expand "Site administration" node - And I expand "Plugins" node - And I expand "Filters" node - And I follow "Manage filters" + And I navigate to "Plugins > Filters > Manage filters" in site administration And I click on "On" "option" in the "Glossary auto-linking" "table_row" And I log out # Log in as a teacher and make sure nothing is yet autolinked diff --git a/mod/lesson/tests/behat/completion_condition_end_reached.feature b/mod/lesson/tests/behat/completion_condition_end_reached.feature index 55aafb048c1..adc657b4d5c 100644 --- a/mod/lesson/tests/behat/completion_condition_end_reached.feature +++ b/mod/lesson/tests/behat/completion_condition_end_reached.feature @@ -19,7 +19,7 @@ Feature: Set end of lesson reached as a completion condition for a lesson And I log in as "teacher1" And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" diff --git a/mod/lesson/tests/behat/completion_condition_time_spent.feature b/mod/lesson/tests/behat/completion_condition_time_spent.feature index b5338785758..eb7abb37d2a 100644 --- a/mod/lesson/tests/behat/completion_condition_time_spent.feature +++ b/mod/lesson/tests/behat/completion_condition_time_spent.feature @@ -19,7 +19,7 @@ Feature: Set time spent as a completion condition for a lesson And I log in as "teacher1" And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" diff --git a/mod/lesson/tests/behat/lesson_complete_report.feature b/mod/lesson/tests/behat/lesson_complete_report.feature index b4f810e509d..a204fa38baa 100644 --- a/mod/lesson/tests/behat/lesson_complete_report.feature +++ b/mod/lesson/tests/behat/lesson_complete_report.feature @@ -48,7 +48,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_jumpto_1 | This page | And I press "Save page" When I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Complete report" Then I should see "No attempts have been made on this lesson" @@ -92,7 +92,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Complete report" And I should see "Lesson has been started, but not yet completed" @@ -164,7 +164,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Complete report" And I should see "Grade: 50.00 / 100.00" @@ -200,7 +200,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Complete report" And I should see "Completed" diff --git a/mod/lesson/tests/behat/lesson_course_reset.feature b/mod/lesson/tests/behat/lesson_course_reset.feature index e3fc2aad934..620c1d1cb05 100644 --- a/mod/lesson/tests/behat/lesson_course_reset.feature +++ b/mod/lesson/tests/behat/lesson_course_reset.feature @@ -58,7 +58,7 @@ Feature: Lesson reset And I log in as "teacher1" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "Overview" node in "Lesson administration > Reports" + And I navigate to "Reports > Overview" in current page administration And I should see "Sam1 Student1" And I navigate to "Reset" node in "Course administration" And I set the following fields to these values: @@ -67,13 +67,13 @@ Feature: Lesson reset And I press "Continue" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "Overview" node in "Lesson administration > Reports" + And I navigate to "Reports > Overview" in current page administration Then I should see "No attempts have been made on this lesson" @javascript Scenario: Use course reset to remove user overrides. When I follow "Test lesson name" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -87,12 +87,12 @@ Feature: Lesson reset And I press "Continue" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" Scenario: Use course reset to remove group overrides. When I follow "Test lesson name" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -106,5 +106,5 @@ Feature: Lesson reset And I press "Continue" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/lesson/tests/behat/lesson_group_override.feature b/mod/lesson/tests/behat/lesson_group_override.feature index 412bdbe005f..3bf4ddc2b76 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -52,7 +52,7 @@ Feature: Lesson user override Scenario: Add, modify then delete a group override When I follow "Test lesson name" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -75,7 +75,7 @@ Feature: Lesson user override Scenario: Duplicate a user override When I follow "Test lesson name" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -97,11 +97,11 @@ Feature: Lesson user override Scenario: Allow a single group to have re-take the lesson When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 0 | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -136,12 +136,12 @@ Feature: Lesson user override Scenario: Allow a single group to have a different password When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Password protected lesson | Yes | | id_password | moodle_rules | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -181,7 +181,7 @@ Feature: Lesson user override Scenario: Allow a group to have a different due date When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_deadline_enabled | 1 | | deadline[day] | 1 | @@ -190,7 +190,7 @@ Feature: Lesson user override | deadline[hour] | 08 | | deadline[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -216,7 +216,7 @@ Feature: Lesson user override Scenario: Allow a group to have a different start date When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_available_enabled | 1 | | available[day] | 1 | @@ -225,7 +225,7 @@ Feature: Lesson user override | available[hour] | 08 | | available[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -251,11 +251,11 @@ Feature: Lesson user override Scenario: Allow a single group to have multiple attempts at each question When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 1 | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -291,7 +291,7 @@ Feature: Lesson user override @javascript Scenario: Add both a user and group override and verify that both are applied correctly When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_available_enabled | 1 | | available[day] | 1 | @@ -300,7 +300,8 @@ Feature: Lesson user override | available[hour] | 08 | | available[minute] | 00 | And I press "Save and display" - And I navigate to "Group overrides" node in "Lesson administration" + And I follow "Test lesson name" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -312,7 +313,8 @@ Feature: Lesson user override | available[minute] | 00 | And I press "Save" And I should see "Wednesday, 1 January 2020, 8:00" - And I navigate to "User overrides" node in "Lesson administration" + And I follow "Test lesson name" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature index 6d3fb7a0bec..19af6acefdf 100644 --- a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature +++ b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature @@ -140,6 +140,5 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons And I should see "Your score is 2 (out of 3)." And I log out And I log in as "teacher1" - When I click on "Dashboard" "link" in the "Navigation" "block" Then I should see "You have lessons that are due" And I should see "3 attempts" diff --git a/mod/lesson/tests/behat/lesson_outline_report.feature b/mod/lesson/tests/behat/lesson_outline_report.feature index f92d54d7a47..9450e2f722b 100644 --- a/mod/lesson/tests/behat/lesson_outline_report.feature +++ b/mod/lesson/tests/behat/lesson_outline_report.feature @@ -48,7 +48,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_jumpto_1 | This page | And I press "Save page" When I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Outline report" Then I should see "No attempts have been made on this lesson" @@ -92,7 +92,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Outline report" And I should see "Lesson has been started, but not yet completed" @@ -144,7 +144,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Outline report" And I should see "Grade: 100.00 / 100.00" @@ -177,7 +177,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I log out Then I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Student 1" And I follow "Outline report" And I should see "Completed" diff --git a/mod/lesson/tests/behat/lesson_practice.feature b/mod/lesson/tests/behat/lesson_practice.feature index 49900ff0a38..6b7f4c9812e 100644 --- a/mod/lesson/tests/behat/lesson_practice.feature +++ b/mod/lesson/tests/behat/lesson_practice.feature @@ -36,7 +36,7 @@ Feature: Practice mode in a lesson activity Scenario: Non-practice lesson records grades in the gradebook Given I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Name | Non-practice lesson | | Description | This lesson will affect your course grade | @@ -56,7 +56,7 @@ Feature: Practice mode in a lesson activity Scenario: Practice lesson doesn't record grades in the gradebook Given I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Name | Practice lesson | | Description | This lesson will NOT affect your course grade | @@ -76,7 +76,7 @@ Feature: Practice mode in a lesson activity Scenario: Practice lesson with scale doesn't record grades in the gradebook Given I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Name | Practice lesson with scale | | Description | This lesson will NOT affect your course grade | diff --git a/mod/lesson/tests/behat/lesson_student_dashboard.feature b/mod/lesson/tests/behat/lesson_student_dashboard.feature index b47f5a5e64e..67c93a9e56b 100644 --- a/mod/lesson/tests/behat/lesson_student_dashboard.feature +++ b/mod/lesson/tests/behat/lesson_student_dashboard.feature @@ -66,13 +66,13 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Submit" And I press "Continue" And I should see "Congratulations - end of lesson reached" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "You have lessons that are due" And I should see "Completed, You can re-attempt this lesson" Scenario: A completed lesson with only questions that does not allow multiple attempts Given I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 0 | And I press "Save and display" @@ -117,7 +117,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Submit" And I press "Continue" And I should see "Congratulations - end of lesson reached" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should not see "You have lessons that are due" Scenario: A completed lesson with only content pages that allows multiple attempts @@ -146,13 +146,13 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Next page" And I should see "Second page contents" And I press "End of lesson" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "You have lessons that are due" And I should see "Completed, You can re-attempt this lesson" Scenario: A completed lesson with only content pages that does not allow multiple attempts Given I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 0 | And I press "Save and display" @@ -180,7 +180,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Next page" And I should see "Second page contents" And I press "End of lesson" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should not see "You have lessons that are due" Scenario: An incomplete lesson with only questions. @@ -220,7 +220,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | False | 1 | And I press "Submit" And I press "Continue" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "You have lessons that are due" And I should see "Lesson has been started, but not yet completed" @@ -249,7 +249,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I should see "First page contents" And I press "Next page" And I should see "Second page contents" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "You have lessons that are due" And I should see "Lesson has been started, but not yet completed" @@ -282,8 +282,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_jumpto_1 | This page | And I press "Save page" And I log out - And I log in as "student1" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I log in as "student1" Then I should see "You have lessons that are due" And I should see "No attempts have been made on this lesson" @@ -306,8 +305,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_jumpto_1 | End of lesson | And I press "Save page" And I log out - And I log in as "student1" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I log in as "student1" Then I should see "You have lessons that are due" And I should see "No attempts have been made on this lesson" @@ -334,6 +332,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_answer_editor_0 | True | | id_answer_editor_1 | False | And I press "Save page" + And I follow "Course 1" And I follow "Test lesson name 2" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -344,7 +343,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_answer_editor_0 | True | | id_answer_editor_1 | False | And I press "Save page" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I follow "Course 2" And I follow "Test lesson name 3" And I follow "Add a question page" @@ -373,14 +372,14 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I set the following fields to these values: | True | 1 | And I press "Submit" - And I click on "Dashboard" "link" in the "Navigation" "block" + And I am on homepage And I follow "Course 2" And I follow "Test lesson name 3" And I should see "D035 M00d13 r0x0rz j00 b0x0rs?" And I set the following fields to these values: | True | 1 | And I press "Submit" - When I click on "Dashboard" "link" in the "Navigation" "block" + When I am on homepage Then I should see "You have lessons that are due" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' coursebox ' ) and contains(normalize-space(.), 'Course 1')]/div[contains( normalize-space(.), 'You have lessons that are due ' )]" "xpath_element" And I should see "You have lessons that are due" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' coursebox ' ) and contains(normalize-space(.), 'Course 2')]/div[contains( normalize-space(.), 'You have lessons that are due ' )]" "xpath_element" And I should see "Lesson has been started, but not yet completed" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' overview ' ) and descendant-or-self::a[.='Test lesson name 3']]" "xpath_element" diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index 2267d382f76..197383ce05e 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -46,7 +46,7 @@ Feature: Lesson user override @javascript Scenario: Add, modify then delete a user override When I follow "Test lesson name" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -69,7 +69,7 @@ Feature: Lesson user override Scenario: Duplicate a user override When I follow "Test lesson name" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -91,11 +91,11 @@ Feature: Lesson user override Scenario: Allow a single user to have re-take the lesson When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 0 | And I press "Save and display" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -130,13 +130,13 @@ Feature: Lesson user override Scenario: Allow a single user to have a different password When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Password protected lesson | Yes | | id_password | moodle_rules | And I wait until the page is ready And I press "Save and display" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -176,7 +176,7 @@ Feature: Lesson user override Scenario: Allow a user to have a different due date When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_deadline_enabled | 1 | | deadline[day] | 1 | @@ -185,7 +185,7 @@ Feature: Lesson user override | deadline[hour] | 08 | | deadline[minute] | 00 | And I press "Save and display" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -211,7 +211,7 @@ Feature: Lesson user override Scenario: Allow a user to have a different start date When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_available_enabled | 1 | | available[day] | 1 | @@ -220,7 +220,7 @@ Feature: Lesson user override | available[hour] | 08 | | available[minute] | 00 | And I press "Save and display" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -246,11 +246,11 @@ Feature: Lesson user override Scenario: Allow a single user to have multiple attempts at each question When I follow "Test lesson name" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Re-takes allowed | 1 | And I press "Save and display" - And I navigate to "User overrides" node in "Lesson administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | diff --git a/mod/lesson/tests/behat/link_to_gradebook.feature b/mod/lesson/tests/behat/link_to_gradebook.feature index d7a4874081a..dc4728bf4a8 100644 --- a/mod/lesson/tests/behat/link_to_gradebook.feature +++ b/mod/lesson/tests/behat/link_to_gradebook.feature @@ -55,7 +55,7 @@ Feature: link to gradebook on the end of lesson page Scenario: No link to gradebook for non graded lesson Given I follow "Test lesson" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Type | None | And I press "Save and display" @@ -70,7 +70,7 @@ Feature: link to gradebook on the end of lesson page Scenario: No link to gradebook for practice lesson Given I follow "Test lesson" - And I navigate to "Edit settings" node in "Lesson administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Practice lesson | Yes | And I press "Save and display" @@ -85,7 +85,7 @@ Feature: link to gradebook on the end of lesson page Scenario: No link if Show gradebook to student disabled Given I follow "Course 1" - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Show gradebook to students | No | And I press "Save and display" diff --git a/mod/quiz/report/grading/tests/behat/grading.feature b/mod/quiz/report/grading/tests/behat/grading.feature index 90899d44d4f..7ea807d0a64 100644 --- a/mod/quiz/report/grading/tests/behat/grading.feature +++ b/mod/quiz/report/grading/tests/behat/grading.feature @@ -33,7 +33,7 @@ Feature: Basic use of the Manual grading report # Check report shows nothing when there are no attempts. And I follow "Course 1" And I follow "Quiz 1" - When I navigate to "Manual grading" node in "Quiz administration > Results" + When I navigate to "Results > Manual grading" in current page administration Then I should see "Manual grading" And I should see "Quiz 1" And I should see "Nothing to display" @@ -60,7 +60,7 @@ Feature: Basic use of the Manual grading report And I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I navigate to "Manual grading" node in "Quiz administration > Results" + And I navigate to "Results > Manual grading" in current page administration And I should see "Manual grading" And I follow "Also show questions that have been graded automatically" And I should see "Short answer 001" diff --git a/mod/quiz/report/overview/tests/behat/basic.feature b/mod/quiz/report/overview/tests/behat/basic.feature index 4fb6c9e3e86..a61f2aee781 100644 --- a/mod/quiz/report/overview/tests/behat/basic.feature +++ b/mod/quiz/report/overview/tests/behat/basic.feature @@ -63,7 +63,7 @@ Feature: Basic use of the Grades report When I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I navigate to "Grades" node in "Quiz administration > Results" + And I navigate to "Results > Grades" in current page administration Then I should see "Attempts: 2" # Check student1's grade And I should see "25.00" in the "S1 Student1" "table_row" diff --git a/mod/quiz/tests/behat/attempt_redo_questions.feature b/mod/quiz/tests/behat/attempt_redo_questions.feature index 5fcda3c7a9c..a03b9cd4f66 100644 --- a/mod/quiz/tests/behat/attempt_redo_questions.feature +++ b/mod/quiz/tests/behat/attempt_redo_questions.feature @@ -92,7 +92,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a And I switch to the main window And the state of "First question" question is shown as "Not answered" And I should not see "Submit" in the ".history" "css_element" - And I navigate to "Statistics" node in "Quiz administration > Results" + And I navigate to "Results > Statistics" in current page administration And I follow "TF1" And "False" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%" And "True" row "Frequency" column of "quizresponseanalysis" table should contain "0.00%" diff --git a/mod/quiz/tests/behat/backup.feature b/mod/quiz/tests/behat/backup.feature index 5d8c75665ac..69b1bbc74da 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -32,7 +32,7 @@ Feature: Backup and restore of quizzes And I duplicate "Quiz 1" activity editing the new copy with: | Name | Quiz 2 | And I follow "Quiz 2" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then I should see "TF1" And I should see "TF2" @@ -46,6 +46,6 @@ Feature: Backup and restore of quizzes And I press "Save changes" And I restore "moodle_28_quiz.mbz" backup into "Course 1" course using this options: And I follow "Restored Moodle 2.8 quiz" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then I should see "TF1" And I should see "TF2" diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index 624cf04cd0c..eecc26e7c82 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -20,7 +20,7 @@ Feature: Edit quiz page - adding things And I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I navigate to "Edit quiz" node in "Quiz administration" + And I navigate to "Edit quiz" in current page administration Then I should see "Editing quiz: Quiz 1" @javascript @@ -192,7 +192,7 @@ Feature: Edit quiz page - adding things # Add Essay 03 from question bank. And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I open the "last" add to quiz menu And I follow "from question bank" And I click on "Add to quiz" "link" in the "Essay 03" "table_row" diff --git a/mod/quiz/tests/behat/editing_move_by_click.feature b/mod/quiz/tests/behat/editing_move_by_click.feature index a14a67db169..0001b7e2367 100644 --- a/mod/quiz/tests/behat/editing_move_by_click.feature +++ b/mod/quiz/tests/behat/editing_move_by_click.feature @@ -33,7 +33,7 @@ Feature: Edit quiz page - drag-and-drop And I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration @javascript Scenario: Re-order questions by clicking on the move icon. diff --git a/mod/quiz/tests/behat/editing_remove_question.feature b/mod/quiz/tests/behat/editing_remove_question.feature index c97e5105a1b..19f7b8efffe 100644 --- a/mod/quiz/tests/behat/editing_remove_question.feature +++ b/mod/quiz/tests/behat/editing_remove_question.feature @@ -36,7 +36,7 @@ Feature: Edit quiz page - remove questions | Question A | 1 | | Question B | 1 | | Question C | 2 | - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration # Confirm the starting point. Then I should see "Question A" on quiz page "1" @@ -81,7 +81,7 @@ Feature: Edit quiz page - remove questions | heading | firstslot | shuffle | | Heading 1 | 1 | 1 | | Heading 2 | 2 | 1 | - When I click on "Edit quiz" "link" in the "Administration" "block" + When I navigate to "Edit quiz" in current page administration Then "Delete" "link" in the "Question A" "list_item" should not be visible Then "Delete" "link" in the "Question B" "list_item" should be visible Then "Delete" "link" in the "Question C" "list_item" should be visible @@ -94,6 +94,6 @@ Feature: Edit quiz page - remove questions And quiz "Quiz 1" contains the following questions: | question | page | | Question A | 1 | - When I click on "Edit quiz" "link" in the "Administration" "block" + When I navigate to "Edit quiz" in current page administration And I delete "Question A" in the quiz by clicking the delete icon Then I should see "Questions: 0" diff --git a/mod/quiz/tests/behat/editing_repaginate.feature b/mod/quiz/tests/behat/editing_repaginate.feature index 63dab9aa3c6..859c55d1a78 100644 --- a/mod/quiz/tests/behat/editing_repaginate.feature +++ b/mod/quiz/tests/behat/editing_repaginate.feature @@ -21,7 +21,7 @@ Feature: Edit quiz page - pagination When I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration @javascript Scenario: Repaginate questions with N question(s) per page as well as clicking diff --git a/mod/quiz/tests/behat/editing_require_previous.feature b/mod/quiz/tests/behat/editing_require_previous.feature index 61bff4ce121..cc235531baf 100644 --- a/mod/quiz/tests/behat/editing_require_previous.feature +++ b/mod/quiz/tests/behat/editing_require_previous.feature @@ -32,7 +32,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" should not be visible # The text "be attempted" is used as a relatively unique string in both the add and remove links. @@ -51,7 +51,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @javascript @@ -69,7 +69,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @javascript @@ -89,7 +89,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration When I follow "No restriction on when question 2 can be attempted • Click to change" Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible @@ -111,7 +111,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration When I follow "Question 3 cannot be attempted until the previous question 2 has been completed • Click to change" Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible @@ -133,7 +133,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible Then "be attempted" "link" in the "TF2" "list_item" should not be visible @@ -155,7 +155,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | Section 1 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -177,7 +177,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | Section 2 | 2 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -195,7 +195,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF2 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @javascript @@ -213,7 +213,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible @javascript @@ -231,7 +231,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible @javascript @@ -251,7 +251,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF3 | 1 | 1 | And I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration When I move "Question 1" to "After Question 3" in the quiz by clicking the move icon Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible diff --git a/mod/quiz/tests/behat/editing_section_headings.feature b/mod/quiz/tests/behat/editing_section_headings.feature index 67a2ffc2978..5ae7dfcd038 100644 --- a/mod/quiz/tests/behat/editing_section_headings.feature +++ b/mod/quiz/tests/behat/editing_section_headings.feature @@ -37,7 +37,7 @@ Feature: Edit quiz page - section headings | TF3 | 3 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then I should see "Shuffle" @javascript @@ -47,7 +47,7 @@ Feature: Edit quiz page - section headings | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I change quiz section heading "" to "This is section one" Then I should see "This is section one" @@ -76,7 +76,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I change quiz section heading "" to "This is section one" And I change quiz section heading "Heading 2" to "This is section two" Then I should see "This is section one" @@ -107,7 +107,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration When I change quiz section heading "Heading 1" to "" Then I should not see "Heading 1" And I should see "Heading 2" @@ -145,7 +145,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I follow "Remove heading 'Heading 2'" And I should see "Are you sure you want to remove the 'Heading 2' section heading?" And I click on "Yes" "button" in the "Confirm" "dialogue" @@ -173,7 +173,7 @@ Feature: Edit quiz page - section headings | Heading 2 | 2 | 0 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I change quiz section heading "Heading 2" to "Edited heading" Then I should see "Edited heading" And "Edit heading 'Edited heading'" "link" should be visible @@ -207,7 +207,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 5 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I move "TF5" to "After Question 2" in the quiz by clicking the move icon Then I should see "TF5" on quiz page "2" @@ -239,7 +239,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 5 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I move "TF1" to "After Question 3" in the quiz by clicking the move icon Then I should see "TF1" on quiz page "2" @@ -265,7 +265,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration Then "Remove heading 'Heading 1'" "link" should not exist And "Remove heading 'Heading 2'" "link" should exist And "Remove heading 'Heading 3'" "link" should exist @@ -292,7 +292,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 0 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I click on shuffle for section "Heading 1" on the quiz edit page And I click on shuffle for section "Heading 2" on the quiz edit page Then shuffle for section "Heading 1" should be "On" on the quiz edit page @@ -320,7 +320,7 @@ Feature: Edit quiz page - section headings | Heading 3 | 3 | 1 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I click on shuffle for section "Heading 1" on the quiz edit page And I click on shuffle for section "Heading 2" on the quiz edit page Then shuffle for section "Heading 1" should be "Off" on the quiz edit page @@ -346,7 +346,7 @@ Feature: Edit quiz page - section headings | TF3 | 2 | When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + 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" Then "a new section heading" "link" in the "Page 1" "list_item" should not be visible @@ -381,7 +381,7 @@ Feature: Edit quiz page - section headings When I follow "Course 1" And I follow "Quiz 1" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration And I click on the "Remove" page break icon after question "TF1" And I open the "Page 2" add to quiz menu And I choose "a new section heading" in the open action menu diff --git a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature index 453e6374d62..a25a765eb85 100644 --- a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature @@ -61,12 +61,13 @@ Feature: In order to create a quiz that awards marks the way I want And I should not see "2.000" And I should not see "3.000" And I should not see "Total of marks: 5.000" - When I follow "Edit settings" + And I follow "Quiz 1" + When I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Decimal places in grades | 3 | | Decimal places in question grades | 5 | And I press "Save and display" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration # Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places. Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist And I should see "2.00000" diff --git a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature index 4dc007e56a1..f92b3700595 100644 --- a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature @@ -37,7 +37,7 @@ Feature: In order to create a quiz that awards marks the way I want And I log in as "teacher1" And I follow "Course 1" And I follow "Quiz 1" - And I navigate to "Edit quiz" node in "Quiz administration" + And I navigate to "Edit quiz" in current page administration @javascript Scenario: Set the max mark for a question. @@ -73,12 +73,13 @@ Feature: In order to create a quiz that awards marks the way I want And I should not see "2.000" And I should not see "3.000" And I should not see "Total of marks: 5.000" - When I follow "Edit settings" + And I follow "Quiz 1" + When I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Decimal places in grades | 3 | | Decimal places in question grades | 5 | And I press "Save and display" - And I click on "Edit quiz" "link" in the "Administration" "block" + And I navigate to "Edit quiz" in current page administration # Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places. Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist And I should see "2.00000" diff --git a/mod/quiz/tests/behat/quiz_reset.feature b/mod/quiz/tests/behat/quiz_reset.feature index bf620d820fb..6e7434a9edf 100644 --- a/mod/quiz/tests/behat/quiz_reset.feature +++ b/mod/quiz/tests/behat/quiz_reset.feature @@ -51,7 +51,7 @@ Feature: Quiz reset And I press "Continue" And I follow "Course 1" And I follow "Test quiz name" - And I navigate to "Results" node in "Quiz administration" + And I navigate to "Results" in current page administration Then I should see "Attempts: 0" @javascript @@ -59,7 +59,7 @@ Feature: Quiz reset When I log in as "teacher1" And I follow "Course 1" And I follow "Test quiz name" - And I navigate to "User overrides" node in "Quiz administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | @@ -73,14 +73,14 @@ Feature: Quiz reset And I press "Continue" And I follow "Course 1" And I follow "Test quiz name" - And I navigate to "User overrides" node in "Quiz administration" + And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" Scenario: Use course reset to remove group overrides. When I log in as "teacher1" And I follow "Course 1" And I follow "Test quiz name" - And I navigate to "Group overrides" node in "Quiz administration" + And I navigate to "Group overrides" in current page administration And I press "Add group override" And I set the following fields to these values: | Override group | Group 1 | @@ -94,5 +94,5 @@ Scenario: Use course reset to remove group overrides. And I press "Continue" And I follow "Course 1" And I follow "Test quiz name" - And I navigate to "Group overrides" node in "Quiz administration" + And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/quiz/tests/behat/settings_form_fields_disableif.feature b/mod/quiz/tests/behat/settings_form_fields_disableif.feature index 431a0fc5e38..6b4604d6ce4 100644 --- a/mod/quiz/tests/behat/settings_form_fields_disableif.feature +++ b/mod/quiz/tests/behat/settings_form_fields_disableif.feature @@ -52,13 +52,14 @@ Feature: Settings form fields disabled if not required # And the "id_delay2_enabled" "field" should be enabled When I press "Save and display" - And I navigate to "User overrides" node in "Quiz administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student1 | | Attempts allowed | 3 | And I press "Save" - And I navigate to "Edit settings" node in "Quiz administration" + And I follow "Test quiz" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Attempts allowed" to "1" Then the "Grading method" "field" should be enabled @@ -67,11 +68,12 @@ Feature: Settings form fields disabled if not required And the "id_delay2_enabled" "field" should be enabled When I press "Save and display" - And I navigate to "User overrides" node in "Quiz administration" + And I navigate to "User overrides" in current page administration And I click on "Edit" "link" in the "region-main" "region" And I set the field "Attempts allowed" to "2" And I press "Save" - And I navigate to "Edit settings" node in "Quiz administration" + And I follow "Test quiz" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Attempts allowed" to "1" Then the "Grading method" "field" should be enabled @@ -80,13 +82,14 @@ Feature: Settings form fields disabled if not required And the "id_delay2_enabled" "field" should be disabled When I press "Save and display" - And I navigate to "User overrides" node in "Quiz administration" + And I navigate to "User overrides" in current page administration And I press "Add user override" And I set the following fields to these values: | Override user | Student2 | | Attempts allowed | Unlimited | And I press "Save" - And I navigate to "Edit settings" node in "Quiz administration" + And I follow "Test quiz" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Attempts allowed" to "1" Then the "Grading method" "field" should be enabled diff --git a/mod/scorm/tests/behat/completion_condition_require_status.feature b/mod/scorm/tests/behat/completion_condition_require_status.feature index b92186c6620..9d3e4ad22c7 100644 --- a/mod/scorm/tests/behat/completion_condition_require_status.feature +++ b/mod/scorm/tests/behat/completion_condition_require_status.feature @@ -21,7 +21,7 @@ Feature: Scorm multi-sco completion When I log in as "teacher1" And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" @@ -57,7 +57,7 @@ Feature: Scorm multi-sco completion When I log in as "teacher1" And I follow "Course 1" And I turn editing mode on - And I click on "Edit settings" "link" in the "Administration" "block" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" diff --git a/mod/wiki/tests/behat/edit_tags.feature b/mod/wiki/tests/behat/edit_tags.feature index c36897866ab..c10d1fa4e61 100644 --- a/mod/wiki/tests/behat/edit_tags.feature +++ b/mod/wiki/tests/behat/edit_tags.feature @@ -47,9 +47,7 @@ Feature: Edited wiki pages handle tags correctly @javascript Scenario: Wiki page edition of standard tags works as expected Given I log in as "admin" - And I expand "Site administration" node - And I expand "Appearance" node - And I follow "Manage tags" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I follow "Add standard tags" And I set the field "Enter comma-separated list of new tags" to "OT1, OT2, OT3" diff --git a/mod/workshop/tests/behat/delete_submission.feature b/mod/workshop/tests/behat/delete_submission.feature index a23c1df1df1..fa6f3bf2fb4 100644 --- a/mod/workshop/tests/behat/delete_submission.feature +++ b/mod/workshop/tests/behat/delete_submission.feature @@ -60,7 +60,7 @@ Feature: Workshop submission removal Given I log in as "student1" And I follow "Course1" And I follow "TestWorkshop" - When I follow "My submission" + When I follow "Submission1" Then I should see "Submission1" And "Delete submission" "button" should exist And I click on "Delete submission" "button" @@ -78,7 +78,7 @@ Feature: Workshop submission removal And I log in as "student1" And I follow "Course1" And I follow "TestWorkshop" - When I follow "My submission" + When I follow "Submission1" Then I should see "Submission1" And "Delete submission" "button" should not exist @@ -86,7 +86,7 @@ Feature: Workshop submission removal Given I log in as "student2" And I follow "Course1" And I follow "TestWorkshop" - When I follow "My submission" + When I follow "Submission2" Then I should see "Submission2" And "Delete submission" "button" should not exist diff --git a/mod/workshop/tests/behat/embedded_images.feature b/mod/workshop/tests/behat/embedded_images.feature index 29fa1d2f4dd..e69e3dfc555 100644 --- a/mod/workshop/tests/behat/embedded_images.feature +++ b/mod/workshop/tests/behat/embedded_images.feature @@ -27,7 +27,7 @@ Feature: Teachers can embed images into instructions and conclusion fields | Workshop name | Workshop with embedded images | And I follow "Workshop with embedded images" # Embed the image into Instructions for submission. - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Instructions for submission" to "Image test
" And I select the text in the "Instructions for submission" Atto editor @@ -40,7 +40,7 @@ Feature: Teachers can embed images into instructions and conclusion fields And I click on "Save image" "button" And I press "Save and display" # Embed the image into Instructions for assessment. - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Instructions for assessment" to "Image test
" And I select the text in the "Instructions for assessment" Atto editor @@ -53,7 +53,7 @@ Feature: Teachers can embed images into instructions and conclusion fields And I click on "Save image" "button" And I press "Save and display" # Embed the image into Conclusion. - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Conclusion" to "Image test
" And I select the text in the "Conclusion" Atto editor diff --git a/mod/workshop/tests/behat/export_submission.feature b/mod/workshop/tests/behat/export_submission.feature index 88a3037465c..8ef837e3c2e 100644 --- a/mod/workshop/tests/behat/export_submission.feature +++ b/mod/workshop/tests/behat/export_submission.feature @@ -25,10 +25,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I log in as "admin" And the following config values are set as admin: | enableportfolios | 1 | - And I expand "Site administration" node - And I expand "Plugins" node - And I expand "Portfolios" node - And I follow "Manage portfolios" + And I navigate to "Plugins > Portfolios > Manage portfolios" in site administration And I set portfolio instance "File download" to "Enabled and visible" And I click on "Save" "button" And I log out @@ -77,7 +74,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio Given I log in as "student1" And I follow "Course1" And I follow "TestWorkshop" - When I follow "My submission" + When I follow "Submission1" Then I should see "Submission1" And "Export this page" "button" should exist And I click on "Export this page" "button" @@ -109,6 +106,6 @@ Feature: Exporting workshop submissions and assessments to a portfolio When I log in as "student1" And I follow "Course1" And I follow "TestWorkshop" - And I follow "My submission" + And I follow "Submission1" Then I should see "Submission1" And "Export this page" "button" should not exist diff --git a/mod/workshop/tests/behat/grade_to_pass.feature b/mod/workshop/tests/behat/grade_to_pass.feature index da72a7a3ece..a2c536cb92c 100644 --- a/mod/workshop/tests/behat/grade_to_pass.feature +++ b/mod/workshop/tests/behat/grade_to_pass.feature @@ -26,7 +26,7 @@ Feature: Setting grades to pass via workshop editing form | Assessment grade to pass | 10.5 | Then I should not see "Adding a new Workshop" And I follow "Awesome workshop" - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And the field "Submission grade to pass" matches value "45.00" And the field "Assessment grade to pass" matches value "10.50" @@ -41,7 +41,7 @@ Feature: Setting grades to pass via workshop editing form | Assessment grade to pass | | Then I should not see "Adding a new Workshop" And I follow "Another awesome workshop" - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And the field "Submission grade to pass" matches value "0.00" And the field "Assessment grade to pass" matches value "0.00" @@ -78,7 +78,7 @@ Feature: Setting grades to pass via workshop editing form | Assessment grade to pass | 0.000 | And I should not see "Adding a new Workshop" And I follow "Super awesome workshop" - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And the field "Submission grade to pass" matches value "59.99" And the field "Assessment grade to pass" matches value "0.00" When I set the field "Submission grade to pass" to "" @@ -86,6 +86,6 @@ Feature: Setting grades to pass via workshop editing form And I press "Save and display" Then I should not see "Adding a new Workshop" And I follow "Super awesome workshop" - And I navigate to "Edit settings" node in "Workshop administration" + And I navigate to "Edit settings" in current page administration And the field "Submission grade to pass" matches value "0.00" And the field "Assessment grade to pass" matches value "0.00" diff --git a/my/tests/behat/add_blocks.feature b/my/tests/behat/add_blocks.feature index 6fcdbb0568f..fd612d18c2b 100644 --- a/my/tests/behat/add_blocks.feature +++ b/my/tests/behat/add_blocks.feature @@ -17,7 +17,6 @@ Feature: Add blocks to dashboard page | student1 | C1 | student | | student2 | C1 | student | And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" Scenario: Add blocks to page When I press "Customise this page" diff --git a/my/tests/behat/reset_page.feature b/my/tests/behat/reset_page.feature index 56889d2bdae..707fb9b09fa 100644 --- a/my/tests/behat/reset_page.feature +++ b/my/tests/behat/reset_page.feature @@ -17,7 +17,6 @@ Feature: Reset dashboard page to default | student1 | C1 | student | | student2 | C1 | student | And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" Scenario: Add blocks to page and reset When I press "Customise this page" diff --git a/my/tests/behat/restrict_available_blocks.feature b/my/tests/behat/restrict_available_blocks.feature index 9b32a56f490..abe88f0c9c1 100644 --- a/my/tests/behat/restrict_available_blocks.feature +++ b/my/tests/behat/restrict_available_blocks.feature @@ -18,7 +18,6 @@ Feature: Restrict which blocks can be added to Dashboard Scenario: The comments block can be added to Dashboard by default And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" And I press "Customise this page" Then the add block selector should contain "Comments" block And the add block selector should contain "Courses" block @@ -33,7 +32,6 @@ Feature: Restrict which blocks can be added to Dashboard | block/html:myaddinstance | Prohibit | And I log out And I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" And I press "Customise this page" Then the add block selector should not contain "Comments" block And the add block selector should not contain "Courses" block diff --git a/question/format/xml/tests/behat/import_export.feature b/question/format/xml/tests/behat/import_export.feature index 18dcc9bd740..5df470726c0 100644 --- a/question/format/xml/tests/behat/import_export.feature +++ b/question/format/xml/tests/behat/import_export.feature @@ -34,6 +34,7 @@ Feature: Test importing questions from Moodle XML format. # Now export again. And I navigate to "Export" node in "Course administration > Question bank" And I set the field "id_format_xml" to "1" + And I set the field "Export category" to "TrueFalse" And I press "Export questions to file" And following "click here" should download between "57000" and "58000" bytes diff --git a/report/log/tests/behat/filter_log.feature b/report/log/tests/behat/filter_log.feature index 96d25f44fca..3170a82ab30 100644 --- a/report/log/tests/behat/filter_log.feature +++ b/report/log/tests/behat/filter_log.feature @@ -25,7 +25,7 @@ Feature: In a report, admin can filter log data | loglegacy | 1 | logstore_legacy | And I follow "Home" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" @@ -45,7 +45,7 @@ Feature: In a report, admin can filter log data @javascript Scenario: Filter log report for standard log reader Given I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" @@ -68,8 +68,7 @@ Feature: In a report, admin can filter log data And I follow "Course 1" And I follow "Home" And I follow "Course 1" - And I expand "Users" node - And I follow "Enrolled users" + And I go to "Users > Enrolled users" in current page administration And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" diff --git a/report/log/tests/behat/filter_log_actions.feature b/report/log/tests/behat/filter_log_actions.feature index ac602ed8d57..39bde8cad3f 100644 --- a/report/log/tests/behat/filter_log_actions.feature +++ b/report/log/tests/behat/filter_log_actions.feature @@ -21,7 +21,7 @@ Feature: In a report, admin can filter log data by action # View Action. And I follow "Test assignment 1" # Update Action. - And I navigate to "Edit settings" node in "Assignment administration" + And I navigate to "Edit settings" in current page administration And I press "Save and return to course" # Delete Action. And I delete "Test assignment 1" activity diff --git a/report/log/tests/behat/user_log.feature b/report/log/tests/behat/user_log.feature index 354c94af047..1e3f80ee0c2 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -38,7 +38,7 @@ Feature: User can view activity log. Scenario: View Todays' and all log report for user Given I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 1" When I follow "Today's logs" And I should see "Assignment: Test assignment name" @@ -54,7 +54,7 @@ Feature: User can view activity log. And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 1" When I follow "Today's logs" And I should see "No log reader enabled" diff --git a/tag/tests/behat/delete_tag.feature b/tag/tests/behat/delete_tag.feature index bda3dc487d0..a4275f3aeac 100644 --- a/tag/tests/behat/delete_tag.feature +++ b/tag/tests/behat/delete_tag.feature @@ -23,7 +23,7 @@ Feature: Manager is able to delete tags And I click on "Delete" "link" in the "Dog" "table_row" And I should see "Tag(s) deleted" Then I should not see "Dog" - And I navigate to "Participants" node in "Site pages" + And I follow "Cat" And I follow "User 1" And I should see "Cat" And I should not see "Dog" @@ -40,7 +40,7 @@ Feature: Manager is able to delete tags Then I should see "Tag(s) deleted" And I should not see "Dog" And I should not see "Neverusedtag" - And I navigate to "Participants" node in "Site pages" + And I follow "Cat" And I follow "User 1" And I should see "Cat" And I should not see "Dog" @@ -63,7 +63,7 @@ Feature: Manager is able to delete tags And I should not see "Dog" And I follow "Default collection" And I should not see "Dog" - And I navigate to "Participants" node in "Site pages" + And I follow "Cat" And I follow "User 1" And I should see "Cat" And I should not see "Dog" @@ -97,7 +97,7 @@ Feature: Manager is able to delete tags And I follow "Default collection" And I should not see "Dog" And I should not see "Neverusedtag" - And I navigate to "Participants" node in "Site pages" + And I follow "Cat" And I follow "User 1" And I should see "Cat" And I should not see "Dog" diff --git a/theme/boost/tests/behat/regionmainsettingsmenu.feature b/theme/boost/tests/behat/regionmainsettingsmenu.feature index db0df430b98..654582f2528 100644 --- a/theme/boost/tests/behat/regionmainsettingsmenu.feature +++ b/theme/boost/tests/behat/regionmainsettingsmenu.feature @@ -27,7 +27,7 @@ Feature: Region main settings menu And I click on "#region-main-settings-menu [role=button]" "css_element" And I choose "Edit settings" in the open action menu And I should see "Updating: Choice" - And I follow "Participants" + And I navigate to course participants And I click on "#region-main-settings-menu [role=button]" "css_element" And I choose "Enrolment methods" in the open action menu And I should see "Enrolment methods" diff --git a/user/tests/behat/edituserpassword.feature b/user/tests/behat/edituserpassword.feature index ee48f3f4b37..44d7e740294 100644 --- a/user/tests/behat/edituserpassword.feature +++ b/user/tests/behat/edituserpassword.feature @@ -7,7 +7,6 @@ Feature: Enable/disable password field based on authentication selected. @javascript Scenario: Verify the password field is enabled/disabled based on authentication selected, in user edit advanced page. Given I log in as "admin" - And I click on "Dashboard" "link" in the "Navigation" "block" When I navigate to "Add a new user" node in "Site administration > Users > Accounts" Then the "New password" "field" should be enabled And I set the field "auth" to "Web services authentication" diff --git a/user/tests/behat/filter_idnumber.feature b/user/tests/behat/filter_idnumber.feature index ca655ab96df..2acdc2e8ab2 100644 --- a/user/tests/behat/filter_idnumber.feature +++ b/user/tests/behat/filter_idnumber.feature @@ -12,13 +12,7 @@ Feature: Filter users by idnumber | student2 | Student2 | 1 | student2@example.com | 2000000 | | student3 | Student3 | 1 | student3@example.com | 3000000 | And I log in as "admin" - And I am on site homepage - And I expand "Site administration" node - # Front page settings also has a "Users" node. - And I expand "Users" node - And I expand "Users" node - And I expand "Accounts" node - When I follow "Browse list of users" + And I navigate to "Users > Accounts > Browse list of users" in site administration @javascript Scenario: Filtering id numbers - with case "is empty" diff --git a/user/tests/behat/view_full_profile.feature b/user/tests/behat/view_full_profile.feature index 2d2228cd96a..a26b3e78ced 100644 --- a/user/tests/behat/view_full_profile.feature +++ b/user/tests/behat/view_full_profile.feature @@ -26,17 +26,18 @@ Feature: Access to full profiles of users When I log in as "student1" And I follow "Course 1" # Another student's full profile is not visible - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 2" Then I should not see "Full profile" # Teacher's full profile is visible - And I navigate to "Participants" node in "My courses > C1" + And I follow "Course 1" + And I navigate to course participants And I follow "Teacher 1" And I follow "Full profile" And I should see "First access to site" # Own full profile is visible And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I click on "Student 1" "link" in the "#participants" "css_element" And I follow "Full profile" And I should see "First access to site" @@ -47,7 +48,7 @@ Feature: Access to full profiles of users | forceloginforprofiles | 0 | When I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 2" And I follow "Full profile" Then I should see "First access to site" @@ -59,7 +60,7 @@ Feature: Access to full profiles of users And I log out When I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 2" And I follow "Full profile" Then I should see "First access to site" @@ -107,8 +108,7 @@ Feature: Access to full profiles of users And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I expand "Users" node - And I follow "Groups" + And I go to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: | Group name | Group 1 | diff --git a/user/tests/behat/view_participants.feature b/user/tests/behat/view_participants.feature index 34393ca4177..5ff52829419 100644 --- a/user/tests/behat/view_participants.feature +++ b/user/tests/behat/view_participants.feature @@ -58,7 +58,7 @@ Feature: View course participants Scenario: Use select and deselect all buttons Given I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants When I press "Select all" Then the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1" And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1" @@ -110,7 +110,7 @@ Feature: View course participants | student20 | C1 | student | When I log in as "teacher1" And I follow "Course 1" - And I follow "Participants" + And I navigate to course participants And I follow "Surname" And I press "Select all users on this page" Then I should not see "Student 9" diff --git a/user/tests/behat/view_preferences_page.feature b/user/tests/behat/view_preferences_page.feature index b8cd4c9d242..3c67d27c098 100644 --- a/user/tests/behat/view_preferences_page.feature +++ b/user/tests/behat/view_preferences_page.feature @@ -28,13 +28,13 @@ Feature: Access to preferences page Scenario: A student and teacher with normal permissions can not view another user's permissions page. Given I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "My courses > C1" + And I navigate to course participants And I follow "Student 2" And I should not see "Preferences" in the "region-main" "region" And I log out And I log in as "teacher1" And I follow "Course 1" - When I navigate to "Participants" node in "My courses > C1" + When I navigate to course participants And I follow "Student 2" Then I should not see "Preferences" in the "region-main" "region" @@ -42,14 +42,14 @@ Feature: Access to preferences page Given I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Participants" node in "Courses > C1" + And I navigate to course participants And I follow "Student 2" And I should see "Preferences" in the "region-main" "region" And I log out And I log in as "manager1" And I am on site homepage And I follow "Course 1" - When I navigate to "Participants" node in "Courses > C1" + When I navigate to course participants And I follow "Student 2" Then I should see "Preferences" in the "region-main" "region"