From 02fda279edca93b68af54f8f4d87890ff7543bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20D=C3=A9niz=20Falc=C3=B3n?= Date: Mon, 20 Aug 2018 12:53:26 +0100 Subject: [PATCH] MDL-57281 behat: deprecated step definition I navigate to node in Definition step deprecated and affected tests modified. --- ...e_multiple_accounts_use_same_email.feature | 4 +- .../tests/behat/manage_conditions.feature | 4 +- .../behat/tests/behat/data_generators.feature | 2 +- .../tests/behat/get_and_set_fields.feature | 6 +- .../tool/behat/tests/behat/list_steps.feature | 2 +- .../tests/behat/add_filetypes.feature | 18 ++-- .../tests/behat/httpsreplace.feature | 4 +- .../tests/behat/manage_langpacks.feature | 16 ++-- .../tool/monitor/tests/behat/disabled.feature | 2 +- admin/tool/monitor/tests/behat/rule.feature | 22 ++--- .../monitor/tests/behat/subscription.feature | 8 +- admin/tool/policy/tests/behat/consent.feature | 4 +- .../tests/behat/backup_user_data.feature | 2 +- .../tests/behat/basic_functionality.feature | 8 +- .../task/tests/behat/clear_fail_delay.feature | 2 +- .../task/tests/behat/manage_tasks.feature | 2 +- .../task/tests/behat/run_task_now.feature | 6 +- .../uploadcourse/tests/behat/create.feature | 2 +- .../uploadcourse/tests/behat/update.feature | 2 +- .../tests/behat/upload_users.feature | 10 +-- .../tests/behat/behat_tool_usertours.php | 11 +-- .../validateagedigitalconsentmap.feature | 2 +- .../tests/behat/conditional_bug.feature | 2 +- .../tests/behat/availability_profile.feature | 4 +- .../util/ui/tests/behat/import_groups.feature | 4 +- .../behat/restore_moodle2_courses.feature | 26 +++--- .../restore_moodle2_courses_settings.feature | 8 +- badges/tests/behat/add_badge.feature | 7 +- badges/tests/behat/award_badge.feature | 28 +++--- badges/tests/behat/criteria_cohort.feature | 24 ++--- badges/tests/behat/criteria_profile.feature | 2 +- badges/tests/behat/role_visibility.feature | 4 +- .../tests/behat/bookmark_admin_pages.feature | 8 +- .../tests/behat/block_badges_course.feature | 5 +- .../behat/block_badges_dashboard.feature | 2 +- .../behat/block_badges_frontpage.feature | 4 +- .../behat/block_blog_menu_frontpage.feature | 2 +- .../behat/block_blog_recent_frontpage.feature | 8 +- .../tests/behat/block_calendar_month.feature | 4 +- .../block_calendar_upcoming_frontpage.feature | 2 +- .../behat/block_comment_frontpage.feature | 2 +- .../behat/block_completionstatus.feature | 4 +- ...mpletionstatus_activity_completion.feature | 4 +- ...lock_completionstatus_manual_other.feature | 10 +-- ...block_completionstatus_manual_self.feature | 2 +- .../behat/block_course_list_frontpage.feature | 8 +- .../block_course_summary_frontpage.feature | 2 +- blocks/login/tests/behat/login_block.feature | 2 +- .../behat/block_myprofile_frontpage.feature | 2 +- .../tests/behat/expand_courses_node.feature | 2 +- .../block_online_users_frontpage.feature | 8 +- .../block_participants_frontpage.feature | 2 +- .../block_private_files_frontpage.feature | 2 +- .../behat/block_search_forums_course.feature | 2 +- .../block_search_forums_frontpage.feature | 2 +- .../tests/behat/add_url.feature | 2 +- .../tests/behat/edit_activities.feature | 6 +- .../configuring_tag_flickr_block.feature | 3 +- .../configure_block_throughout_site.feature | 2 +- blog/tests/behat/blog_visibility.feature | 2 +- blog/tests/behat/comment.feature | 12 ++- blog/tests/behat/delete.feature | 4 +- calendar/tests/behat/category_events.feature | 18 +++- .../behat/access_visible_cohorts.feature | 20 +++-- cohort/tests/behat/add_cohort.feature | 2 +- cohort/tests/behat/behat_cohort.php | 7 +- .../tests/behat/upload_cohort_users.feature | 2 +- cohort/tests/behat/upload_cohorts.feature | 12 +-- cohort/tests/behat/view_cohorts.feature | 4 +- completion/tests/behat/behat_completion.php | 5 +- .../behat/enable_manual_complete_mark.feature | 1 - course/tests/behat/behat_course.php | 8 +- course/tests/behat/coursetags.feature | 10 ++- course/tests/behat/keyholder.feature | 4 +- .../tests/behat/max_number_sections.feature | 2 +- course/tests/behat/role_renaming.feature | 2 +- enrol/guest/tests/behat/guest_access.feature | 4 +- enrol/lti/tests/behat/basic_settings.feature | 6 +- enrol/lti/tests/behat/index_page.feature | 5 +- enrol/meta/tests/behat/enrol_meta.feature | 18 ++-- enrol/self/tests/behat/key_holder.feature | 4 +- enrol/tests/behat/behat_enrol.php | 12 +-- enrol/tests/behat/enrol_user.feature | 5 +- enrol/tests/behat/role_visibility.feature | 4 +- .../tests/behat/add_custom_file_type.feature | 2 +- files/tests/behat/course_files.feature | 4 +- grade/tests/behat/grade_UI_settings.feature | 6 +- grade/tests/behat/grade_average.feature | 3 +- .../behat/grade_category_validation.feature | 2 +- grade/tests/behat/grade_hidden_items.feature | 4 +- .../tests/behat/grade_item_validation.feature | 2 +- .../tests/behat/grade_letter_logging.feature | 2 +- grade/tests/behat/grade_point_maximum.feature | 4 +- grade/tests/behat/grade_scales.feature | 2 +- .../behat/grade_scales_aggregation.feature | 2 +- .../tests/behat/grade_scales_logging.feature | 4 +- .../behat/grade_single_item_scales.feature | 2 +- group/tests/behat/overview.feature | 2 +- group/tests/behat/role_visibility.feature | 4 +- lib/editor/atto/tests/behat/autosave.feature | 20 ++--- .../tests/behat/modgrade_validation.feature | 6 +- lib/tests/behat/alpha_chooser.feature | 4 +- lib/tests/behat/behat_deprecated.php | 27 ++++++ lib/tests/behat/behat_navigation.php | 24 ----- lib/tests/behat/behat_permissions.php | 16 ++-- lib/tests/behat/timezone.feature | 2 +- lib/upgrade.txt | 12 +++ .../videojs/tests/behat/modules.feature | 2 +- .../update_messaging_preferences.feature | 4 +- .../editpdf/tests/behat/annotate_pdf.feature | 3 +- .../tests/behat/assign_course_reset.feature | 11 ++- .../tests/behat/outcome_grading.feature | 6 +- mod/assign/tests/behat/quickgrading.feature | 4 +- .../tests/behat/chat_calendar_events.feature | 14 ++- .../tests/behat/chat_course_reset.feature | 5 +- mod/data/tests/behat/behat_mod_data.php | 4 +- mod/forum/tests/behat/advanced_search.feature | 2 +- .../tests/behat/lesson_course_reset.feature | 9 +- mod/lti/tests/behat/addtool.feature | 2 +- mod/lti/tests/behat/backup_restore.feature | 6 +- mod/lti/tests/behat/contentitem.feature | 4 +- .../behat/contentitemregistration.feature | 2 +- mod/lti/tests/behat/toolconfigure.feature | 2 +- mod/quiz/tests/behat/backup.feature | 2 +- mod/quiz/tests/behat/behat_mod_quiz.php | 2 +- ...completion_condition_attempts_used.feature | 2 +- ...completion_condition_passing_grade.feature | 2 +- mod/quiz/tests/behat/editing_add.feature | 4 +- .../editing_add_from_question_bank.feature | 2 +- .../tests/behat/editing_add_random.feature | 2 +- mod/quiz/tests/behat/quiz_reset.feature | 8 +- .../reset_wiki_comments_tags_files.feature | 3 +- my/tests/behat/reset_all_pages.feature | 8 +- .../gift/tests/behat/import_export.feature | 4 +- .../format/webct/tests/behat/import.feature | 2 +- .../tests/behat/importcalculated.feature | 2 +- .../xml/tests/behat/import_export.feature | 10 +-- question/tests/behat/copy_questions.feature | 2 +- question/tests/behat/delete_questions.feature | 5 +- question/tests/behat/edit_questions.feature | 2 +- .../edit_questions_standard_tags.feature | 2 +- .../behat/filter_questions_by_tag.feature | 2 +- .../behat/move_question_categories.feature | 4 +- question/tests/behat/preview_question.feature | 2 +- .../tests/behat/question_categories.feature | 12 +-- question/tests/behat/sort_questions.feature | 2 +- .../ddimageortext/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../ddimageortext/tests/behat/edit.feature | 2 +- .../ddimageortext/tests/behat/export.feature | 2 +- .../ddimageortext/tests/behat/import.feature | 2 +- .../ddimageortext/tests/behat/preview.feature | 2 +- .../type/ddmarker/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/ddmarker/tests/behat/edit.feature | 2 +- .../type/ddmarker/tests/behat/export.feature | 2 +- .../type/ddmarker/tests/behat/import.feature | 2 +- .../type/ddmarker/tests/behat/preview.feature | 2 +- question/type/ddwtos/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- question/type/ddwtos/tests/behat/edit.feature | 2 +- .../type/ddwtos/tests/behat/export.feature | 2 +- .../type/ddwtos/tests/behat/import.feature | 2 +- .../type/ddwtos/tests/behat/preview.feature | 2 +- .../type/description/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/description/tests/behat/edit.feature | 2 +- .../description/tests/behat/export.feature | 2 +- .../description/tests/behat/import.feature | 2 +- .../description/tests/behat/preview.feature | 2 +- question/type/essay/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- question/type/essay/tests/behat/edit.feature | 2 +- .../type/essay/tests/behat/export.feature | 2 +- .../type/essay/tests/behat/import.feature | 2 +- .../type/essay/tests/behat/preview.feature | 2 +- .../gapselect/tests/behat/basic_test.feature | 4 +- .../gapselect/tests/behat/import_test.feature | 4 +- question/type/match/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- question/type/match/tests/behat/edit.feature | 2 +- .../type/match/tests/behat/export.feature | 2 +- .../type/match/tests/behat/import.feature | 2 +- .../type/match/tests/behat/preview.feature | 2 +- .../type/multichoice/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/multichoice/tests/behat/edit.feature | 2 +- .../multichoice/tests/behat/export.feature | 2 +- .../multichoice/tests/behat/import.feature | 2 +- .../multichoice/tests/behat/preview.feature | 2 +- .../type/shortanswer/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/shortanswer/tests/behat/edit.feature | 2 +- .../shortanswer/tests/behat/export.feature | 2 +- .../shortanswer/tests/behat/import.feature | 2 +- .../shortanswer/tests/behat/preview.feature | 2 +- .../type/truefalse/tests/behat/add.feature | 2 +- .../tests/behat/backup_and_restore.feature | 2 +- .../type/truefalse/tests/behat/edit.feature | 2 +- .../type/truefalse/tests/behat/export.feature | 2 +- .../type/truefalse/tests/behat/import.feature | 2 +- .../truefalse/tests/behat/preview.feature | 2 +- .../eventlist/tests/behat/mainsection.feature | 4 +- report/log/tests/behat/filter_log.feature | 10 +-- .../tests/behat/filter_log_actions.feature | 12 +-- report/log/tests/behat/user_log.feature | 2 +- .../tests/behat/loglive_report.feature | 8 +- report/outline/tests/behat/filter.feature | 8 +- report/outline/tests/behat/outline.feature | 22 ++--- report/outline/tests/behat/user.feature | 6 +- .../tests/behat/filter_participation.feature | 12 +-- .../tests/behat/message_participants.feature | 4 +- .../behat/activity_completion_report.feature | 6 +- tag/tests/behat/collections.feature | 12 +-- tag/tests/behat/delete_tag.feature | 8 +- tag/tests/behat/edit_tag.feature | 21 +++-- tag/tests/behat/flag_tags.feature | 13 ++- tag/tests/behat/standard_tags.feature | 10 +-- tag/tests/behat/tagindex.feature | 6 +- .../behat_theme_boost_behat_deprecated.php | 90 +++++++++++++++++++ .../behat_theme_boost_behat_mod_quiz.php | 3 +- .../behat_theme_boost_behat_navigation.php | 30 ------- user/tests/behat/addnewuser.feature | 4 +- .../tests/behat/custom_profile_fields.feature | 4 +- user/tests/behat/delete_users.feature | 8 +- user/tests/behat/edit_user_enrolment.feature | 2 +- user/tests/behat/edituserpassword.feature | 2 +- user/tests/behat/enrol_cohort_list.feature | 4 +- user/tests/behat/name_fields.feature | 2 +- user/tests/behat/table_sorting.feature | 4 +- .../tests/behat/user_grade_navigation.feature | 4 +- user/tests/behat/view_full_profile.feature | 6 +- .../tests/behat/view_preferences_page.feature | 4 +- 233 files changed, 711 insertions(+), 581 deletions(-) create mode 100644 theme/boost/tests/behat/behat_theme_boost_behat_deprecated.php diff --git a/admin/tests/behat/enable_multiple_accounts_use_same_email.feature b/admin/tests/behat/enable_multiple_accounts_use_same_email.feature index 30d21b97125..65dffa37bad 100644 --- a/admin/tests/behat/enable_multiple_accounts_use_same_email.feature +++ b/admin/tests/behat/enable_multiple_accounts_use_same_email.feature @@ -10,7 +10,7 @@ Feature: Enable multiple accounts to have the same email address Scenario: Enable registration of multiple accounts with the same email address Given the following config values are set as admin: | allowaccountssameemail | 1 | - When I navigate to "Add a new user" node in "Site administration>Users>Accounts" + When I navigate to "Users > Accounts > Add a new user" in site administration And I set the following fields to these values: | Username | testmultiemailuser1 | | Choose an authentication method | Manual accounts | @@ -35,7 +35,7 @@ Feature: Enable multiple accounts to have the same email address Scenario: Disable registration of multiple accounts with the same email address Given the following config values are set as admin: | allowaccountssameemail | 0 | - When I navigate to "Add a new user" node in "Site administration>Users>Accounts" + When I navigate to "Users > Accounts > Add a new user" in site administration And I set the following fields to these values: | Username | testmultiemailuser1 | | Choose an authentication method | Manual accounts | diff --git a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature index 97b5b20b8e2..8fef761c017 100644 --- a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature +++ b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature @@ -20,7 +20,7 @@ Feature: Manage availability conditions And the following config values are set as admin: | enableavailability | 1 | And I am on homepage - And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" + And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration # Having clicked on it, I should also see the list of plugins. And I should see "Restriction by date" @@ -34,7 +34,7 @@ Feature: Manage availability conditions | Course 1 | C1 | topics | And I log in as "admin" And I am on site homepage - When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" + When I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration # Check the icon is there (it should be a Hide icon, meaning is currently visible). Then "Hide" "icon" should exist in the "Restriction by date" "table_row" diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 0e621041d0a..f078fabf11f 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -286,7 +286,7 @@ Feature: Set up contextual data for tests | student1 | CHSB | | student1 | CHC | When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Cohorts" in site administration Then the following should exist in the "cohorts" table: | Name | Cohort size | | System cohort A | 1 | 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 62a6fe84c94..9ade5e05930 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -34,7 +34,7 @@ Feature: Verify that all form fields values can be get and set | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | And I log in as "admin" And I am on "Course 1" course homepage - And I navigate to "Reset" node in "Course administration" + And I navigate to "Reset" in current page administration # Select (multi-select) - Checking "the select box should contain". And I expand all fieldsets And the "Unenrol users" select box should contain "No roles" @@ -131,12 +131,12 @@ Feature: Verify that all form fields values can be get and set And the field "two" matches value "" # Check if field xpath set/match works. And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number" And the field with xpath "//input[@name='idnumber']" matches value "Course id number" And the field with xpath "//input[@name='idnumber']" does not match value "" And I press "Save and display" - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And the field "Course ID number" matches value "Course id number" Scenario: with JS disabled all form fields getters and setters works as expected diff --git a/admin/tool/behat/tests/behat/list_steps.feature b/admin/tool/behat/tests/behat/list_steps.feature index 708a0e71cee..2df5363d075 100644 --- a/admin/tool/behat/tests/behat/list_steps.feature +++ b/admin/tool/behat/tests/behat/list_steps.feature @@ -7,7 +7,7 @@ Feature: List the system steps definitions Background: Given I am on homepage And I log in as "admin" - And I navigate to "Acceptance testing" node in "Site administration > Development" + And I navigate to "Development > Acceptance testing" in site administration @javascript Scenario: Accessing the list diff --git a/admin/tool/filetypes/tests/behat/add_filetypes.feature b/admin/tool/filetypes/tests/behat/add_filetypes.feature index 5c464bacaa9..90e8d21adcc 100644 --- a/admin/tool/filetypes/tests/behat/add_filetypes.feature +++ b/admin/tool/filetypes/tests/behat/add_filetypes.feature @@ -6,7 +6,7 @@ Feature: Add customised file types Scenario: Add a new file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration And I press "Add" # Try setting all the form fields, not just the optional ones. And I set the following fields to these values: @@ -24,7 +24,7 @@ Feature: Add customised file types Scenario: Update an existing file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration When I click on "Edit 7z" "link" And I set the following fields to these values: | Extension | doc | @@ -37,7 +37,7 @@ Feature: Add customised file types Scenario: Change the text option (was buggy) Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration When I click on "Edit 7z" "link" And I set the following fields to these values: | Description type | Custom description specified in this form | @@ -51,7 +51,7 @@ Feature: Add customised file types Scenario: Try to select a text option without entering a value. Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration When I click on "Edit dmg" "link" And I set the field "Description type" to "Custom description" And I press "Save changes" @@ -66,7 +66,7 @@ Feature: Add customised file types Scenario: Delete an existing file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration When I click on "Delete 7z" "link" Then I should see "Are you absolutely sure you want to remove .7z?" And I press "Yes" @@ -74,7 +74,7 @@ Feature: Add customised file types Scenario: Delete a custom file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration And I press "Add" And I set the following fields to these values: | Extension | frog | @@ -86,7 +86,7 @@ Feature: Add customised file types Scenario: Revert changes to deleted file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration When I click on "Delete 7z" "link" And I press "Yes" And I follow "Restore 7z to Moodle defaults" @@ -95,7 +95,7 @@ Feature: Add customised file types Scenario: Revert changes to updated file type Given I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration And I click on "Edit 7z" "link" And I set the following fields to these values: | Type groups | document | @@ -110,7 +110,7 @@ Feature: Add customised file types | fullname | shortname | | Course 1 | C1 | And I log in as "admin" - And I navigate to "File types" node in "Site administration > Server" + And I navigate to "Server > File types" in site administration And I press "Add" And I set the following fields to these values: | Extension | frog | diff --git a/admin/tool/httpsreplace/tests/behat/httpsreplace.feature b/admin/tool/httpsreplace/tests/behat/httpsreplace.feature index 0b79d8ba5f2..76e77e0f8f7 100644 --- a/admin/tool/httpsreplace/tests/behat/httpsreplace.feature +++ b/admin/tool/httpsreplace/tests/behat/httpsreplace.feature @@ -13,14 +13,14 @@ Feature: View the httpsreplace report @javascript Scenario: Go to the HTTPS replace report screen. Make sure broken domains are reported. - When I navigate to "HTTP security" node in "Site administration > Security" + When I navigate to "Security > HTTP security" in site administration And I follow "HTTPS conversion tool" And I press "Continue" Then I should see "intentionally.unavailable" @javascript Scenario: Use the find and replace tool. - When I navigate to "HTTP security" node in "Site administration > Security" + When I navigate to "Security > HTTP security" in site administration And I follow "HTTPS conversion tool" And I press "Continue" And I set the field "I understand the risks of this operation" to "1" diff --git a/admin/tool/langimport/tests/behat/manage_langpacks.feature b/admin/tool/langimport/tests/behat/manage_langpacks.feature index e1b91707f08..63fcc5377fa 100644 --- a/admin/tool/langimport/tests/behat/manage_langpacks.feature +++ b/admin/tool/langimport/tests/behat/manage_langpacks.feature @@ -11,29 +11,29 @@ Feature: Manage language packs Scenario: Install language pack Given I log in as "admin" - And I navigate to "Language packs" node in "Site administration > Language" + And I navigate to "Language > Language packs" in site administration When I set the field "Available language packs" to "en_ar" And I press "Install selected language pack(s)" Then I should see "Language pack 'en_ar' was successfully installed" And the "Installed language packs" select box should contain "en_ar" - And I navigate to "Live logs" node in "Site administration > Reports" + And I navigate to "Reports > Live logs" in site administration And I should see "The language pack 'en_ar' was installed." And I log out Scenario: Update language pack Given outdated langpack 'en_ar' is installed And I log in as "admin" - And I navigate to "Language packs" node in "Site administration > Language" + And I navigate to "Language > Language packs" in site administration When I press "Update all installed language packs" Then I should see "Language pack 'en_ar' was successfully updated" And I should see "Language pack update completed" - And I navigate to "Live logs" node in "Site administration > Reports" + And I navigate to "Reports > Live logs" in site administration And I should see "The language pack 'en_ar' was updated." And I log out Scenario: Try to uninstall language pack Given I log in as "admin" - And I navigate to "Language packs" node in "Site administration > Language" + And I navigate to "Language > Language packs" in site administration And I set the field "Available language packs" to "en_ar" And I press "Install selected language pack(s)" When I set the field "Installed language packs" to "en_ar" @@ -42,17 +42,17 @@ Feature: Manage language packs Then I should see "Language pack 'en_ar' was uninstalled" And the "Installed language packs" select box should not contain "en_ar" And the "Available language packs" select box should contain "en_ar" - And I navigate to "Live logs" node in "Site administration > Reports" + And I navigate to "Reports > Live logs" in site administration And I should see "The language pack 'en_ar' was removed." And I should see "Language pack uninstalled" And I log out Scenario: Try to uninstall English language pack Given I log in as "admin" - And I navigate to "Language packs" node in "Site administration > Language" + And I navigate to "Language > Language packs" in site administration When I set the field "Installed language packs" to "en" And I press "Uninstall selected language pack(s)" Then I should see "The English language pack cannot be uninstalled." - And I navigate to "Live logs" node in "Site administration > Reports" + And I navigate to "Reports > Live logs" in site administration And I should not see "Language pack uninstalled" And I log out diff --git a/admin/tool/monitor/tests/behat/disabled.feature b/admin/tool/monitor/tests/behat/disabled.feature index 01c76197ff0..d027a0f3793 100644 --- a/admin/tool/monitor/tests/behat/disabled.feature +++ b/admin/tool/monitor/tests/behat/disabled.feature @@ -6,7 +6,7 @@ Feature: Enable/disable managment of the event monitor Scenario: Tool is disabled by default. Given I log in as "admin" - When I navigate to "Event monitoring rules" node in "Site administration > Reports" + When I navigate to "Reports > Event monitoring rules" in site administration Then I should see "Event monitoring is currently disabled" And I should see "Enable" And I should not see "Add a new rule" diff --git a/admin/tool/monitor/tests/behat/rule.feature b/admin/tool/monitor/tests/behat/rule.feature index de818df25a3..822cf9672f4 100644 --- a/admin/tool/monitor/tests/behat/rule.feature +++ b/admin/tool/monitor/tests/behat/rule.feature @@ -15,10 +15,10 @@ Feature: tool_monitor_rule | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration And I click on "Enable" "link" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration And I press "Add a new rule" And I set the following fields to these values: | name | New rule course level | @@ -29,7 +29,7 @@ Feature: tool_monitor_rule | minutes | 1 | | Notification message | The forum post was created. {modulelink} | And I press "Save changes" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration And I press "Add a new rule" And I set the following fields to these values: | name | New rule site level | @@ -45,7 +45,7 @@ Feature: tool_monitor_rule Scenario: Add a rule on course level Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration When I press "Add a new rule" And I set the following fields to these values: | name | New rule | @@ -65,7 +65,7 @@ Feature: tool_monitor_rule Scenario: Delete a rule on course level Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration When I click on "Delete rule" "link" Then I should see "Are you sure you want to delete the rule \"New rule course level\"?" And I press "Continue" @@ -75,7 +75,7 @@ Feature: tool_monitor_rule Scenario: Edit a rule on course level Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration When I click on "Edit rule" "link" And I set the following fields to these values: | name | New rule quiz | @@ -94,7 +94,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on course level Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration When I click on "Duplicate rule" "link" in the "New rule course level" "table_row" Then I should see "Rule successfully duplicated" And "#toolmonitorrules_r1" "css_element" should appear before "#toolmonitorrules_r2" "css_element" @@ -106,7 +106,7 @@ Feature: tool_monitor_rule Scenario: Add a rule on site level Given I log in as "admin" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration When I press "Add a new rule" And I set the following fields to these values: | name | New rule | @@ -125,7 +125,7 @@ Feature: tool_monitor_rule Scenario: Delete a rule on site level Given I log in as "admin" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration When I click on "Delete rule" "link" Then I should see "Are you sure you want to delete the rule \"New rule site level\"?" And I press "Continue" @@ -134,7 +134,7 @@ Feature: tool_monitor_rule Scenario: Edit a rule on site level Given I log in as "admin" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration When I click on "Edit rule" "link" And I set the following fields to these values: | name | New Rule Quiz | @@ -153,7 +153,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on site level Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration When I click on "Duplicate rule" "link" in the "New rule site level" "table_row" Then I should see "Rule successfully duplicated" And "#toolmonitorrules_r2" "css_element" should appear after "#toolmonitorrules_r1" "css_element" diff --git a/admin/tool/monitor/tests/behat/subscription.feature b/admin/tool/monitor/tests/behat/subscription.feature index 2766705faaa..9b74a68cdbb 100644 --- a/admin/tool/monitor/tests/behat/subscription.feature +++ b/admin/tool/monitor/tests/behat/subscription.feature @@ -20,10 +20,10 @@ Feature: tool_monitor_subscriptions | teacher2 | C1 | teacher | | teacher2 | C2 | editingteacher | And I log in as "admin" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration And I click on "Enable" "link" And I am on "Course 1" course homepage - And I navigate to "Event monitoring rules" node in "Course administration > Reports" + And I navigate to "Reports > Event monitoring rules" in current page administration And I press "Add a new rule" And I set the following fields to these values: | name | New rule course level | @@ -34,7 +34,7 @@ Feature: tool_monitor_subscriptions | minutes | 1 | | Notification message | The course was viewed. {modulelink} | And I press "Save changes" - And I navigate to "Event monitoring rules" node in "Site administration > Reports" + And I navigate to "Reports > Event monitoring rules" in site administration And I press "Add a new rule" And I set the following fields to these values: | name | New rule site level | @@ -45,7 +45,7 @@ Feature: tool_monitor_subscriptions | minutes | 1 | | Notification message | The course was viewed. {modulelink} | And I press "Save changes" - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I follow "Non-editing teacher" And I press "Edit" And I click on "tool/monitor:managerules" "checkbox" diff --git a/admin/tool/policy/tests/behat/consent.feature b/admin/tool/policy/tests/behat/consent.feature index 2b9b026bc8d..a0065c18cf4 100644 --- a/admin/tool/policy/tests/behat/consent.feature +++ b/admin/tool/policy/tests/behat/consent.feature @@ -364,7 +364,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign And I log out # Create new policy document. And I log in as "admin" - And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies" + And I navigate to "Users > Privacy and policies > Manage policies" in site administration And I should see "Policies and agreements" And I should see "New policy" And I follow "New policy" @@ -419,7 +419,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign And I log out # Create new version of the policy document. And I log in as "admin" - And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies" + And I navigate to "Users > Privacy and policies > Manage policies" in site administration When I follow "Actions" Then I should see "View" And I should see "Edit" diff --git a/admin/tool/recyclebin/tests/behat/backup_user_data.feature b/admin/tool/recyclebin/tests/behat/backup_user_data.feature index 7df1cb2b866..90af9cb5921 100644 --- a/admin/tool/recyclebin/tests/behat/backup_user_data.feature +++ b/admin/tool/recyclebin/tests/behat/backup_user_data.feature @@ -57,7 +57,7 @@ Feature: Backup user data And I am on "Course 1" course homepage with editing mode on And I delete "Quiz 1" activity And I run all adhoc tasks - And I navigate to "Recycle bin" node in "Course administration" + And I navigate to "Recycle bin" in current page administration And I should see "Quiz 1" And I click on "Restore" "link" in the "region-main" "region" And I log out diff --git a/admin/tool/recyclebin/tests/behat/basic_functionality.feature b/admin/tool/recyclebin/tests/behat/basic_functionality.feature index 679a0cf23f0..5edb0432067 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -48,7 +48,7 @@ Feature: Basic recycle bin functionality | Assignment name | Test assign | | Description | Test | And I delete "Test assign" activity - When I navigate to "Recycle bin" node in "Course administration" + When I navigate to "Recycle bin" in current page administration Then I should see "Test assign" And I should see "Contents will be permanently deleted after 7 days" And I click on "Restore" "link" in the "region-main" "region" @@ -77,7 +77,7 @@ Feature: Basic recycle bin functionality And I go to the courses management page And I should see "Course 2" in the "#course-listing" "css_element" And I am on "Course 2" course homepage - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And I follow "Overview" And "Student 1" "text" should exist in the "Group A" "table_row" And "Student 2" "text" should exist in the "Group A" "table_row" @@ -92,7 +92,7 @@ Feature: Basic recycle bin functionality | Description | Test | And I delete "Test assign" activity And I run all adhoc tasks - And I navigate to "Recycle bin" node in "Course administration" + And I navigate to "Recycle bin" in current page administration When I click on "Delete" "link" Then I should see "Are you sure you want to delete the selected item from the recycle bin?" And I press "Cancel" @@ -115,7 +115,7 @@ Feature: Basic recycle bin functionality And I delete "Test assign 1" activity And I delete "Test assign 2" activity And I run all adhoc tasks - And I navigate to "Recycle bin" node in "Course administration" + And I navigate to "Recycle bin" in current page administration And I should see "Test assign 1" And I should see "Test assign 2" When I click on "Delete all" "link" diff --git a/admin/tool/task/tests/behat/clear_fail_delay.feature b/admin/tool/task/tests/behat/clear_fail_delay.feature index 474468d42c4..bfa0e8db35e 100644 --- a/admin/tool/task/tests/behat/clear_fail_delay.feature +++ b/admin/tool/task/tests/behat/clear_fail_delay.feature @@ -7,7 +7,7 @@ Feature: Clear scheduled task fail delay Background: Given the scheduled task "\core\task\send_new_user_passwords_task" has a fail delay of "60" seconds And I log in as "admin" - And I navigate to "Scheduled tasks" node in "Site administration > Server" + And I navigate to "Server > Scheduled tasks" in site administration Scenario: Clear fail delay When I click on "Clear" "text" in the "Send new user passwords" "table_row" diff --git a/admin/tool/task/tests/behat/manage_tasks.feature b/admin/tool/task/tests/behat/manage_tasks.feature index 73fc27dd61b..1f0a9df976e 100644 --- a/admin/tool/task/tests/behat/manage_tasks.feature +++ b/admin/tool/task/tests/behat/manage_tasks.feature @@ -6,7 +6,7 @@ Feature: Manage scheduled tasks Background: Given I log in as "admin" - And I navigate to "Scheduled tasks" node in "Site administration > Server" + And I navigate to "Server > Scheduled tasks" in site administration Scenario: Disable scheduled task When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row" diff --git a/admin/tool/task/tests/behat/run_task_now.feature b/admin/tool/task/tests/behat/run_task_now.feature index 4740732084b..ed8ff3ee5b6 100644 --- a/admin/tool/task/tests/behat/run_task_now.feature +++ b/admin/tool/task/tests/behat/run_task_now.feature @@ -6,7 +6,7 @@ Feature: Run tasks from web interface Scenario: Run a task Given I log in as "admin" - When I navigate to "Scheduled tasks" node in "Site administration > Server" + When I navigate to "Server > Scheduled tasks" in site administration Then I should see "Never" in the "Log table cleanup" "table_row" And I click on "Run now" "text" in the "Log table cleanup" "table_row" @@ -21,7 +21,7 @@ Feature: Run tasks from web interface Scenario: Cancel running a task Given I log in as "admin" - When I navigate to "Scheduled tasks" node in "Site administration > Server" + When I navigate to "Server > Scheduled tasks" in site administration And I click on "Run now" "text" in the "Log table cleanup" "table_row" And I press "Cancel" # Confirm we're back on the scheduled tasks page by looking for the table. @@ -31,5 +31,5 @@ Feature: Run tasks from web interface Given the following config values are set as admin: | enablerunnow | 0 | tool_task | When I log in as "admin" - And I navigate to "Scheduled tasks" node in "Site administration > Server" + And I navigate to "Server > Scheduled tasks" in site administration Then I should not see "Run now" diff --git a/admin/tool/uploadcourse/tests/behat/create.feature b/admin/tool/uploadcourse/tests/behat/create.feature index b1e26f3f4d7..9fbfa01fd2f 100644 --- a/admin/tool/uploadcourse/tests/behat/create.feature +++ b/admin/tool/uploadcourse/tests/behat/create.feature @@ -9,7 +9,7 @@ Feature: An admin can create courses using a CSV file | fullname | shortname | category | | First course | C1 | 0 | And I log in as "admin" - And I navigate to "Upload courses" node in "Site administration > Courses" + And I navigate to "Courses > Upload courses" in site administration @javascript Scenario: Creation of unexisting courses diff --git a/admin/tool/uploadcourse/tests/behat/update.feature b/admin/tool/uploadcourse/tests/behat/update.feature index 73d23947b49..dbdbef52c33 100644 --- a/admin/tool/uploadcourse/tests/behat/update.feature +++ b/admin/tool/uploadcourse/tests/behat/update.feature @@ -9,7 +9,7 @@ Feature: An admin can update courses using a CSV file | fullname | shortname | category | | Some random name | C1 | 0 | And I log in as "admin" - And I navigate to "Upload courses" node in "Site administration > Courses" + And I navigate to "Courses > Upload courses" in site administration @javascript Scenario: Updating a course fullname diff --git a/admin/tool/uploaduser/tests/behat/upload_users.feature b/admin/tool/uploaduser/tests/behat/upload_users.feature index 1ee26f45ca2..e7d88a37786 100644 --- a/admin/tool/uploaduser/tests/behat/upload_users.feature +++ b/admin/tool/uploaduser/tests/behat/upload_users.feature @@ -14,7 +14,7 @@ Feature: Upload users | Section 1 | math102 | S1 | | Section 3 | math102 | S3 | And I log in as "admin" - And I navigate to "Upload users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Upload users" in site administration When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager And I press "Upload users" Then I should see "Upload users preview" @@ -48,7 +48,7 @@ Feature: Upload users | Section 1 | math102 | S1 | | Section 3 | math102 | S3 | And I log in as "admin" - And I navigate to "Upload users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Upload users" in site administration When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager And I press "Upload users" And I set the following fields to these values: @@ -67,19 +67,19 @@ Feature: Upload users Scenario: Upload users with custom profile fields # Create user profile field. Given I log in as "admin" - And I navigate to "User profile fields" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > User profile fields" in site administration And I set the field "datatype" to "Text area" And I set the following fields to these values: | Short name | superfield | | Name | Super field | And I click on "Save changes" "button" # Upload users. - When I navigate to "Upload users" node in "Site administration > Users > Accounts" + When I navigate to "Users > Accounts > Upload users" in site administration And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager And I press "Upload users" And I press "Upload users" # Check that users were created and the superfield is filled. - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "Tom Jones" And I should see "Super field" And I should see "The big guy" diff --git a/admin/tool/usertours/tests/behat/behat_tool_usertours.php b/admin/tool/usertours/tests/behat/behat_tool_usertours.php index b08bc14fadd..ef00bd2f7a0 100644 --- a/admin/tool/usertours/tests/behat/behat_tool_usertours.php +++ b/admin/tool/usertours/tests/behat/behat_tool_usertours.php @@ -90,12 +90,9 @@ class behat_tool_usertours extends behat_base { * @Given /^I open the User tour settings page$/ */ public function i_open_the_user_tour_settings_page() { - $this->execute('behat_navigation::i_navigate_to_node_in', [ - get_string('usertours', 'tool_usertours'), - implode(' > ', [ - get_string('administrationsite', 'moodle'), - get_string('appearance', 'admin'), - ]) - ]); + $this->execute('behat_navigation::i_navigate_to_in_site_administration', + get_string('appearance', 'admin') . ' > ' . + get_string('usertours', 'tool_usertours') + ); } } diff --git a/auth/tests/behat/validateagedigitalconsentmap.feature b/auth/tests/behat/validateagedigitalconsentmap.feature index 7381991045f..2eefea984b4 100644 --- a/auth/tests/behat/validateagedigitalconsentmap.feature +++ b/auth/tests/behat/validateagedigitalconsentmap.feature @@ -6,7 +6,7 @@ Feature: Test validation of 'Age of digital consent' setting. Background: Given I log in as "admin" - And I navigate to "Privacy settings" node in "Site administration > Users > Privacy and policies" + And I navigate to "Users > Privacy and policies > Privacy settings" in site administration Scenario: Admin provides valid value for 'Age of digital consent'. Given I set the field "s__agedigitalconsentmap" to multiline: diff --git a/availability/condition/completion/tests/behat/conditional_bug.feature b/availability/condition/completion/tests/behat/conditional_bug.feature index f0b80941f86..918251efaef 100644 --- a/availability/condition/completion/tests/behat/conditional_bug.feature +++ b/availability/condition/completion/tests/behat/conditional_bug.feature @@ -20,7 +20,7 @@ Feature: Confirm that conditions on completion no longer cause a bug # Set up course. Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "Enable completion tracking" to "Yes" And I press "Save and display" diff --git a/availability/condition/profile/tests/behat/availability_profile.feature b/availability/condition/profile/tests/behat/availability_profile.feature index 682f59f761f..816e1fe73a8 100644 --- a/availability/condition/profile/tests/behat/availability_profile.feature +++ b/availability/condition/profile/tests/behat/availability_profile.feature @@ -64,7 +64,7 @@ Feature: availability_profile Scenario: Test with custom user profile field # Add custom field. Given I log in as "admin" - And I navigate to "User profile fields" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > User profile fields" in site administration And I set the field "datatype" to "Text input" And I set the following fields to these values: | Short name | superfield | @@ -72,7 +72,7 @@ Feature: availability_profile And I click on "Save changes" "button" # Set field value for user. - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I click on ".icon[title=Edit]" "css_element" in the "s@example.com" "table_row" And I expand all fieldsets And I set the field "Super field" to "Bananaman" diff --git a/backup/util/ui/tests/behat/import_groups.feature b/backup/util/ui/tests/behat/import_groups.feature index 32ff5d1904e..3330fca8ae3 100644 --- a/backup/util/ui/tests/behat/import_groups.feature +++ b/backup/util/ui/tests/behat/import_groups.feature @@ -30,7 +30,7 @@ Feature: Option to include groups and groupings when importing a course to anoth Scenario: Include groups and groupings when importing a course to another course Given I import "Course 1" course into "Course 2" course using this options: | Initial | Include groups and groupings | 1 | - When I navigate to "Groups" node in "Course administration > Users" + When I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" And I follow "Groupings" @@ -40,7 +40,7 @@ Feature: Option to include groups and groupings when importing a course to anoth Scenario: Do not include groups and groupings when importing a course to another course Given I import "Course 1" course into "Course 2" course using this options: | Initial | Include groups and groupings | 0 | - When I navigate to "Groups" node in "Course administration > Users" + When I navigate to "Users > Groups" in current page administration Then I should not see "Group 1" And I should not see "Group 2" And I follow "Groupings" diff --git a/backup/util/ui/tests/behat/restore_moodle2_courses.feature b/backup/util/ui/tests/behat/restore_moodle2_courses.feature index d34b8d5358b..bd24b1517ec 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -42,7 +42,7 @@ Feature: Restore Moodle 2 course backups And I should see "Test forum name" And I should see "Topic 15" And I should not see "Topic 16" - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the field "id_format" matches value "Topics format" And I press "Cancel" @@ -66,7 +66,7 @@ Feature: Restore Moodle 2 course backups And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum post backup name | | Description | Test forum post backup description | - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: | Schema | Section 3 | 0 | Then I should see "Course 1" @@ -82,7 +82,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 navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the field "id_format" matches value "Topics format" And I set the following fields to these values: @@ -94,14 +94,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 navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page 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 navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And the field "id_format" matches value "Social format" And I press "Cancel" @@ -118,7 +118,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 navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Course layout" matches value "Show one section per page" @@ -144,7 +144,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 | No | - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Course short name" matches value "C2" @@ -170,10 +170,10 @@ Feature: Restore Moodle 2 course backups | Initial | Include enrolled users | 0 | | Confirmation | Filename | test_backup.mbz | And I am on "Course 2" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: | Schema | Overwrite course configuration | Yes | - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Course layout" matches value "Show one section per page" @@ -199,10 +199,10 @@ Feature: Restore Moodle 2 course backups | Initial | Include enrolled users | 0 | | Confirmation | Filename | test_backup.mbz | And I am on "Course 2" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: | Schema | Overwrite course configuration | No | - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Course short name" matches value "C2" @@ -228,10 +228,10 @@ Feature: Restore Moodle 2 course backups | Initial | Include enrolled users | 0 | | Confirmation | Filename | test_backup.mbz | And I am on "Course 4" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: | Schema | Overwrite course configuration | No | - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets Then the field "id_format" matches value "Topics format" And the field "Course short name" matches value "C4" diff --git a/backup/util/ui/tests/behat/restore_moodle2_courses_settings.feature b/backup/util/ui/tests/behat/restore_moodle2_courses_settings.feature index b8519571a5d..d4cf46911e2 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses_settings.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses_settings.feature @@ -96,11 +96,11 @@ Feature: Restore Moodle 2 course backups with different user data settings @javascript Scenario: Restore a backup with user data with site config for including users set to 0 - Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups" + Given I navigate to "Courses > Backups > General restore defaults" in site administration And I set the field "s_restore_restore_general_users" to "" And I press "Save changes" And I am on "Course 1" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration # "User data" marks the user data field for the section # "-" marks the user data field for the data activity And I restore "test_backup.mbz" backup into a new course using this options: @@ -113,11 +113,11 @@ Feature: Restore Moodle 2 course backups with different user data settings @javascript Scenario: Restore a backup with user data with local and site config config for including users set to 0 - Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups" + Given I navigate to "Courses > Backups > General restore defaults" in site administration And I set the field "s_restore_restore_general_users" to "" And I press "Save changes" And I am on "Course 1" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration When I restore "test_backup.mbz" backup into a new course using this options: | Settings | Include enrolled users | 0 | Then I should see "Test database name" diff --git a/badges/tests/behat/add_badge.feature b/badges/tests/behat/add_badge.feature index d228bbc549a..4a3c1c2f5ef 100644 --- a/badges/tests/behat/add_badge.feature +++ b/badges/tests/behat/add_badge.feature @@ -10,7 +10,7 @@ Feature: Add badges to the system @javascript Scenario: Setting badges settings - Given I navigate to "Badges settings" node in "Site administration > Badges" + Given I navigate to "Badges > Badges settings" in site administration And I set the field "Default badge issuer name" to "Test Badge Site" And I set the field "Default badge issuer contact details" to "testuser@example.com" And I press "Save changes" @@ -24,12 +24,13 @@ Feature: Add badges to the system And I press "Customise this page" # TODO MDL-57120 site "Badges" link not accessible without navigation block. And I add the "Navigation" block if not present - Given I navigate to "Site badges" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + Given I click on "Site badges" "link" in the "Navigation" "block" Then I should see "There are no badges available." @javascript @_file_upload Scenario: Add a badge - Given I navigate to "Add a new badge" node in "Site administration > Badges" + Given I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Test badge with 'apostrophe' and other friends (<>&@#) | | Description | Test badge description | diff --git a/badges/tests/behat/award_badge.feature b/badges/tests/behat/award_badge.feature index cd64b325b72..79ae7956e60 100644 --- a/badges/tests/behat/award_badge.feature +++ b/badges/tests/behat/award_badge.feature @@ -20,7 +20,7 @@ Feature: Award badges And I log in as "teacher1" And I am on "Course 1" course homepage # Create course badge 1. - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 1 | @@ -37,7 +37,8 @@ Feature: Award badges And I press "Enable access" And I press "Continue" # Badge #2 - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I am on "Course 1" course homepage + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 2 | @@ -72,7 +73,7 @@ Feature: Award badges @javascript Scenario: Award profile badge Given I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Profile Badge | | Description | Test badge description | @@ -110,7 +111,7 @@ Feature: Award badges | teacher | teacher | 1 | teacher1@example.com | | student | student | 1 | student1@example.com | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -152,7 +153,7 @@ Feature: Award badges | student2 | C1 | student | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | @@ -194,7 +195,7 @@ Feature: Award badges | student1 | C1 | student | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + 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" @@ -204,7 +205,7 @@ Feature: Award badges | Description | Submit your online text | | id_completion | 1 | And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | @@ -243,7 +244,7 @@ Feature: Award badges | student1 | C1 | student | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + 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" @@ -253,13 +254,13 @@ Feature: Award badges | Description | Submit your online text | | assignsubmission_onlinetext_enabled | 1 | | id_completion | 1 | - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I set the field "id_overall_aggregation" to "2" And I click on "Condition: Activity completion" "link" And I set the field "Assignment - Test assignment name" to "1" And I press "Save changes" And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | @@ -309,7 +310,7 @@ Feature: Award badges And I log in as "teacher1" And I am on "Course 1" course homepage # Create course badge 1. - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 1 | @@ -334,7 +335,8 @@ Feature: Award badges And I follow "Recipients (1)" Then I should see "Recipients (1)" # Add course badge 2. - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I am on "Course 1" course homepage + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge 2 | @@ -391,7 +393,7 @@ Feature: Award badges | student2 | C1 | student | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | diff --git a/badges/tests/behat/criteria_cohort.feature b/badges/tests/behat/criteria_cohort.feature index 6f5f8163e51..e4971440ea8 100644 --- a/badges/tests/behat/criteria_cohort.feature +++ b/badges/tests/behat/criteria_cohort.feature @@ -19,7 +19,7 @@ Feature: Award badges based on cohort | user1 | CH1 | | user2 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -55,7 +55,7 @@ Feature: Award badges based on cohort | user2 | CH1 | | user2 | CH3 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -96,7 +96,7 @@ Feature: Award badges based on cohort | user3 | CH2 | | user3 | CH3 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -133,7 +133,7 @@ Feature: Award badges based on cohort | user1 | CH1 | | user2 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -184,7 +184,7 @@ Feature: Award badges based on cohort | user2 | CH2 | | user3 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -241,7 +241,7 @@ Feature: Award badges based on cohort | user2 | CH2 | | user2 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -298,7 +298,7 @@ Feature: Award badges based on cohort | user2 | CH1 | | user3 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | @@ -356,7 +356,7 @@ Feature: Award badges based on cohort | user1 | CH2 | | user2 | CH2 | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge 1 | | Description | Site badge description | @@ -369,7 +369,7 @@ Feature: Award badges based on cohort And I press "Enable access" When I press "Continue" And I should see "Recipients (1)" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge 2 | | Description | Site badge description | @@ -411,7 +411,7 @@ Feature: Award badges based on cohort | user2 | Second | User | second@example.com | | user3 | Third | User | third@example.com | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge 1 | | Description | Site badge description | @@ -426,7 +426,7 @@ Feature: Award badges based on cohort And I press "Enable access" When I press "Continue" And I should see "Recipients (0)" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge 2 | | Description | Site badge description | @@ -440,7 +440,7 @@ Feature: Award badges based on cohort And I press "Save" And I press "Enable access" And I press "Continue" - Then I navigate to "Cohorts" node in "Site administration > Users > Accounts" + Then I navigate to "Users > Accounts >Cohorts" in site administration And I add "First User (first@example.com)" user to "CH1" cohort members And I add "First User (first@example.com)" user to "CH2" cohort members And I add "Second User (second@example.com)" user to "CH2" cohort members diff --git a/badges/tests/behat/criteria_profile.feature b/badges/tests/behat/criteria_profile.feature index abdb166a477..14cc5b517e6 100644 --- a/badges/tests/behat/criteria_profile.feature +++ b/badges/tests/behat/criteria_profile.feature @@ -10,7 +10,7 @@ Feature: Award badges based on user profile field | username | firstname | lastname | email | | user1 | First | User | first@example.com | And I log in as "admin" - And I navigate to "Add a new badge" node in "Site administration > Badges" + And I navigate to "Badges > Add a new badge" in site administration And I set the following fields to these values: | Name | Site Badge | | Description | Site badge description | diff --git a/badges/tests/behat/role_visibility.feature b/badges/tests/behat/role_visibility.feature index bb3a49da943..e89489b5530 100644 --- a/badges/tests/behat/role_visibility.feature +++ b/badges/tests/behat/role_visibility.feature @@ -21,7 +21,7 @@ Feature: Test role visibility for the badge administration page Scenario: Check the default roles are visible Given I log in as "manager1" And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | @@ -37,7 +37,7 @@ Feature: Test role visibility for the badge administration page Scenario: Check hidden roles are not visible Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I follow "Add a new badge" And I set the following fields to these values: | Name | Course Badge | diff --git a/blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature b/blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature index 1574fe8dc32..faa02a46328 100644 --- a/blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature +++ b/blocks/admin_bookmarks/tests/behat/bookmark_admin_pages.feature @@ -6,14 +6,14 @@ Feature: Add a bookmarks to an admin pages Background: Given I log in as "admin" - And I navigate to "Scheduled tasks" node in "Site administration > Server" + And I navigate to "Server > Scheduled tasks" in site administration And I click on "Bookmark this page" "link" in the "Admin bookmarks" "block" And I log out # Test bookmark functionality using the "User profile fields" page as our bookmark. Scenario: Admin page can be bookmarked Given I log in as "admin" - And I navigate to "User profile fields" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > User profile fields" in site administration When I click on "Bookmark this page" "link" in the "Admin bookmarks" "block" Then I should see "User profile fields" in the "Admin bookmarks" "block" # See the existing bookmark is there too. @@ -21,14 +21,14 @@ Feature: Add a bookmarks to an admin pages Scenario: Admin page can be accessed through bookmarks block Given I log in as "admin" - And I navigate to "Notifications" node in "Site administration" + And I navigate to "Notifications" in site administration And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" # Verify that we are on the right page. Then I should see "Scheduled tasks" in the "h1" "css_element" Scenario: Admin page can be removed from bookmarks Given I log in as "admin" - And I navigate to "Notifications" node in "Site administration" + And I navigate to "Notifications" in site administration And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" When I click on "Unbookmark this page" "link" in the "Admin bookmarks" "block" Then I should see "Bookmark deleted" diff --git a/blocks/badges/tests/behat/block_badges_course.feature b/blocks/badges/tests/behat/block_badges_course.feature index 33fe576425c..cc739afb96e 100644 --- a/blocks/badges/tests/behat/block_badges_course.feature +++ b/blocks/badges/tests/behat/block_badges_course.feature @@ -17,7 +17,7 @@ Feature: Enable Block Badges in a course And I log in as "teacher1" And I am on "Course 1" course homepage # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | @@ -34,7 +34,8 @@ Feature: Enable Block Badges in a course And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" And I press "Award badge" # Issue Badge 2 of 2 - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I am on "Course 1" course homepage + And I navigate to "Badges > Add a new badge" in current page administration And I set the following fields to these values: | id_name | Badge 2 | | id_description | Badge 2 | diff --git a/blocks/badges/tests/behat/block_badges_dashboard.feature b/blocks/badges/tests/behat/block_badges_dashboard.feature index 2928bf3508f..45d10c71070 100644 --- a/blocks/badges/tests/behat/block_badges_dashboard.feature +++ b/blocks/badges/tests/behat/block_badges_dashboard.feature @@ -17,7 +17,7 @@ Feature: Enable Block Badges on the dashboard and view awarded badges And I log in as "teacher1" And I am on "Course 1" course homepage # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | diff --git a/blocks/badges/tests/behat/block_badges_frontpage.feature b/blocks/badges/tests/behat/block_badges_frontpage.feature index d1daf80c63b..89a99deb78d 100644 --- a/blocks/badges/tests/behat/block_badges_frontpage.feature +++ b/blocks/badges/tests/behat/block_badges_frontpage.feature @@ -16,13 +16,13 @@ Feature: Enable Block Badges on the frontpage and view awarded badges | teacher1 | C1 | editingteacher | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Latest badges" block And I log out And I log in as "teacher1" And I am on "Course 1" course homepage # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Course administration > Badges" + And I navigate to "Badges > Add a new badge" in current page administration And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | diff --git a/blocks/blog_menu/tests/behat/block_blog_menu_frontpage.feature b/blocks/blog_menu/tests/behat/block_blog_menu_frontpage.feature index 3c2936ad46d..8e1df8263f3 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_frontpage.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_frontpage.feature @@ -10,7 +10,7 @@ Feature: Enable Block blog menu on the frontpage | student1 | Student | 1 | student1@example.com | S1 | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Blog menu" block And I log out diff --git a/blocks/blog_recent/tests/behat/block_blog_recent_frontpage.feature b/blocks/blog_recent/tests/behat/block_blog_recent_frontpage.feature index 3b838dfa2ed..38640424a0b 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent_frontpage.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent_frontpage.feature @@ -10,7 +10,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent | student1 | Student | 1 | student1@example.com | S1 | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Recent blog entries" block # TODO MDL-57120 site "Blogs" link not accessible without navigation block. And I add the "Navigation" block if not present @@ -19,7 +19,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent Scenario: Students use the recent blog entries block to view blogs Given I log in as "student1" And I am on site homepage - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | @@ -35,7 +35,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent Scenario: Students only see a few entries in the recent blog entries block Given I log in as "student1" And I am on site homepage - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Add a new entry" # Blog 1 of 5 And I set the following fields to these values: @@ -89,7 +89,7 @@ Feature: Feature: Students can use the recent blog entries block to view recent Then I log out And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I configure the "Recent blog entries" block And I set the following fields to these values: | id_config_numberofrecentblogentries | 2 | diff --git a/blocks/calendar_month/tests/behat/block_calendar_month.feature b/blocks/calendar_month/tests/behat/block_calendar_month.feature index bc3434643b6..f8f159753c5 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month.feature @@ -129,7 +129,7 @@ Feature: Enable the calendar block in a course and test it's functionality | student2 | G2 | When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_groupmode | Separate groups | | id_groupmodeforce | Yes | @@ -167,7 +167,7 @@ Feature: Enable the calendar block in a course and test it's functionality | student2 | G2 | When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | id_groupmode | Separate groups | | id_groupmodeforce | Yes | diff --git a/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_frontpage.feature b/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_frontpage.feature index 448b71050d4..dd31e37cac4 100644 --- a/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_frontpage.feature +++ b/blocks/calendar_upcoming/tests/behat/block_calendar_upcoming_frontpage.feature @@ -16,7 +16,7 @@ Feature: View a site event on the frontpage | id_eventtype | Site | | id_name | My Site Event | And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Upcoming events" block And I log out When I log in as "teacher1" diff --git a/blocks/comments/tests/behat/block_comment_frontpage.feature b/blocks/comments/tests/behat/block_comment_frontpage.feature index 5d949ab2816..6b883f2cad4 100644 --- a/blocks/comments/tests/behat/block_comment_frontpage.feature +++ b/blocks/comments/tests/behat/block_comment_frontpage.feature @@ -10,7 +10,7 @@ Feature: Enable Block comments on the frontpage and view comments | teacher1 | Teacher | 1 | teacher1@example.com | T1 | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Comments" block And I follow "Show comments" And I add "I'm a comment from admin" comment to comments block diff --git a/blocks/completionstatus/tests/behat/block_completionstatus.feature b/blocks/completionstatus/tests/behat/block_completionstatus.feature index f5e24a149d8..318be30b9ee 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus.feature @@ -20,7 +20,7 @@ Feature: Enable Block Completion in a course Scenario: Add the block to a the course where completion is disabled Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | No | And I press "Save and display" @@ -46,7 +46,7 @@ Feature: Enable Block Completion in a course | Require view | 1 | And I press "Save and return to course" When I add the "Course completion status" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | Test page name | 1 | diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature index d41fe98ae3d..397afe0d0ac 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature @@ -30,7 +30,7 @@ Feature: Enable Block Completion in a course using activity completion | Require view | 1 | And I press "Save and return to course" And I add the "Course completion status" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | Test page name | 1 | @@ -51,7 +51,7 @@ Feature: Enable Block Completion in a course using activity completion | Require view | 1 | And I press "Save and return to course" And I add the "Course completion status" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | Test page name | 1 | diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature index c0219148769..ebe242faa8c 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature @@ -23,7 +23,7 @@ Feature: Enable Block Completion in a course using manual completion by others Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | Teacher | 1 | @@ -36,7 +36,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Course completion" node in "Course administration > Reports" + And I navigate to "Reports > Course completion" in current page administration And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record # should be created before the task runs. @@ -55,7 +55,7 @@ Feature: Enable Block Completion in a course using manual completion by others Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | Teacher | 1 | @@ -71,7 +71,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Course completion" node in "Course administration > Reports" + And I navigate to "Reports > Course completion" in current page administration And I follow "Click to mark user complete" And I log out And I log in as "student1" @@ -85,7 +85,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher2" And I am on "Course 1" course homepage - And I navigate to "Course completion" node in "Course administration > Reports" + And I navigate to "Reports > Course completion" in current page administration And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record # should be created before the task runs. diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature index d9b73c5eeb9..32a30ef6eef 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature @@ -20,7 +20,7 @@ Feature: Enable Block Completion in a course using manual self completion And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block And I add the "Self completion" block - And I navigate to "Course completion" node in "Course administration" + And I navigate to "Course completion" in current page administration And I expand all fieldsets And I set the following fields to these values: | id_criteria_self | 1 | diff --git a/blocks/course_list/tests/behat/block_course_list_frontpage.feature b/blocks/course_list/tests/behat/block_course_list_frontpage.feature index b10cf27e1cc..93dfa54ec97 100644 --- a/blocks/course_list/tests/behat/block_course_list_frontpage.feature +++ b/blocks/course_list/tests/behat/block_course_list_frontpage.feature @@ -28,7 +28,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents Scenario: Add the course list block on the frontpage and navigate to the course listing Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Courses" block And I log out When I log in as "teacher1" @@ -43,7 +43,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents Scenario: Add the course list block on the frontpage page and navigate to another course Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Courses" block And I log out When I log in as "teacher1" @@ -58,7 +58,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents Scenario: Add the course list block on the frontpage page and view as an admin Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration When I add the "Courses" block Then I should see "Miscellaneous" in the "Course categories" "block" And I should see "Category 1" in the "Course categories" "block" @@ -72,7 +72,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents Scenario: Add the course list block on the frontpage page and view as a guest Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Courses" block And I log out When I log in as "guest" diff --git a/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature b/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature index a48fb70fc86..ac91d6de2ea 100644 --- a/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature +++ b/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature @@ -9,7 +9,7 @@ Feature: Course summary block used on the frontpage And I am on site homepage And I turn editing mode on And I add the "Course/site summary" block - And I navigate to "Edit settings" node in "Front page settings" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | summary | Proved the summary block works! | And I press "Save changes" diff --git a/blocks/login/tests/behat/login_block.feature b/blocks/login/tests/behat/login_block.feature index caaa06bc89c..2f86023f056 100644 --- a/blocks/login/tests/behat/login_block.feature +++ b/blocks/login/tests/behat/login_block.feature @@ -10,7 +10,7 @@ Feature: Login from a block | testuser | testpass | Test | User | student1@example.com | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Login" block Scenario: Login block visible to non-logged in users diff --git a/blocks/myprofile/tests/behat/block_myprofile_frontpage.feature b/blocks/myprofile/tests/behat/block_myprofile_frontpage.feature index 5b14df39959..1e6707848d6 100644 --- a/blocks/myprofile/tests/behat/block_myprofile_frontpage.feature +++ b/blocks/myprofile/tests/behat/block_myprofile_frontpage.feature @@ -10,7 +10,7 @@ Feature: The logged in user block allows users to view their profile information | teacher1 | Teacher | One | teacher1@example.com | T1 | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Logged in user" block And I log out diff --git a/blocks/navigation/tests/behat/expand_courses_node.feature b/blocks/navigation/tests/behat/expand_courses_node.feature index 683c34ad41a..b63a587a188 100644 --- a/blocks/navigation/tests/behat/expand_courses_node.feature +++ b/blocks/navigation/tests/behat/expand_courses_node.feature @@ -46,7 +46,7 @@ Feature: Expand the courses nodes within the navigation block And I press "Save changes" And I turn editing mode off And I am on "Course 2" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I click on "Edit" "link" in the "Guest access" "table_row" And I set the following fields to these values: | Allow guest access | Yes | diff --git a/blocks/online_users/tests/behat/block_online_users_frontpage.feature b/blocks/online_users/tests/behat/block_online_users_frontpage.feature index 0c5bbddaf9e..097c9e7f49a 100644 --- a/blocks/online_users/tests/behat/block_online_users_frontpage.feature +++ b/blocks/online_users/tests/behat/block_online_users_frontpage.feature @@ -13,7 +13,7 @@ Feature: The online users block allow you to see who is currently online on fron Scenario: View the online users block on the front page and see myself Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration When I add the "Online users" block Then I should see "Admin User" in the "Online users" "block" And I should see "1 online user" in the "Online users" "block" @@ -21,7 +21,7 @@ Feature: The online users block allow you to see who is currently online on fron Scenario: View the online users block on the front page as a logged in user Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Online users" block And I log out And I log in as "student2" @@ -36,7 +36,7 @@ Feature: The online users block allow you to see who is currently online on fron Scenario: View the online users block on the front page as a guest Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Online users" block And I log out And I log in as "student2" @@ -54,7 +54,7 @@ Feature: The online users block allow you to see who is currently online on fron Scenario: Hide/show user's online status from/to other users in the online users block on front page Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Online users" block And I log out When I log in as "student1" diff --git a/blocks/participants/tests/behat/block_participants_frontpage.feature b/blocks/participants/tests/behat/block_participants_frontpage.feature index 93b6a5758ac..3e47bd2def9 100644 --- a/blocks/participants/tests/behat/block_participants_frontpage.feature +++ b/blocks/participants/tests/behat/block_participants_frontpage.feature @@ -10,7 +10,7 @@ Feature: People Block used on frontpage | student1 | Sam | Student | student1@example.com | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "People" block And I log out diff --git a/blocks/private_files/tests/behat/block_private_files_frontpage.feature b/blocks/private_files/tests/behat/block_private_files_frontpage.feature index 7816060b0cb..0e79d0a911a 100644 --- a/blocks/private_files/tests/behat/block_private_files_frontpage.feature +++ b/blocks/private_files/tests/behat/block_private_files_frontpage.feature @@ -13,7 +13,7 @@ Feature: The private files block allows users to store files privately in moodle | teacher1 | Teacher | 1 | teacher1@example.com | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Private files" block And I log out 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 e2e37d27dc6..dfdeb6f53ed 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_course.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_course.feature @@ -18,7 +18,7 @@ Feature: The search forums block allows users to search for forum posts on cours | student1 | C1 | student | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "id_newsitems" to "1" And I press "Save and display" And I turn editing mode on diff --git a/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature b/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature index 1f76d15c458..53f3ba95767 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_frontpage.feature @@ -10,7 +10,7 @@ Feature: The search forums block allows users to search for forum posts on front | student1 | Student | 1 | student1@example.com | S1 | And I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Search forums" block And I log out diff --git a/blocks/site_main_menu/tests/behat/add_url.feature b/blocks/site_main_menu/tests/behat/add_url.feature index a9cfb61f388..dbd6386272a 100644 --- a/blocks/site_main_menu/tests/behat/add_url.feature +++ b/blocks/site_main_menu/tests/behat/add_url.feature @@ -8,7 +8,7 @@ Feature: Add URL to main menu block Scenario: Add a URL in menu block and ensure it appears Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Main menu" block When I add a "URL" to section "0" and I fill the form with: | Name | google | diff --git a/blocks/site_main_menu/tests/behat/edit_activities.feature b/blocks/site_main_menu/tests/behat/edit_activities.feature index c577b9f1412..3b5d632dfed 100644 --- a/blocks/site_main_menu/tests/behat/edit_activities.feature +++ b/blocks/site_main_menu/tests/behat/edit_activities.feature @@ -8,7 +8,7 @@ Feature: Edit activities in main menu block Scenario: Edit name of acitivity in-place in site main menu block Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Main menu" block When I add a "Forum" to section "0" and I fill the form with: | Forum name | My forum name | @@ -27,7 +27,7 @@ Feature: Edit activities in main menu block And I set the following administration settings values: | allowstealth | 1 | And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration And I add the "Main menu" block When I add a "Forum" to section "0" and I fill the form with: | Forum name | Visible forum | @@ -60,7 +60,7 @@ Feature: Edit activities in main menu block And the field "Availability" matches value "Make available but not shown on course page" And I press "Save and return to course" And "My forum name" activity in site main menu block should be available but hidden from course page - And I navigate to "Turn editing off" node in "Front page settings" + And I navigate to "Turn editing off" in current page administration And "My forum name" activity in site main menu block should be available but hidden from course page And I log out And I should not see "My forum name" in the "Main menu" "block" diff --git a/blocks/tag_flickr/tests/behat/configuring_tag_flickr_block.feature b/blocks/tag_flickr/tests/behat/configuring_tag_flickr_block.feature index f213f66a047..c9278270013 100644 --- a/blocks/tag_flickr/tests/behat/configuring_tag_flickr_block.feature +++ b/blocks/tag_flickr/tests/behat/configuring_tag_flickr_block.feature @@ -10,7 +10,8 @@ Feature: Adding and configuring Flickr block And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I add the "Flickr" block And I configure the "Flickr" block Then I should see "Flickr block title" diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index 84fefa77ed1..3df500dc851 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -20,7 +20,7 @@ Feature: Add and configure blocks throughout the site | manager1 | Acceptance test site | manager | # Allow at least one role assignment in the block context: And I log in as "admin" - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I follow "Edit Non-editing teacher role" And I set the following fields to these values: | Block | 1 | diff --git a/blog/tests/behat/blog_visibility.feature b/blog/tests/behat/blog_visibility.feature index f4bae300fc0..ce213bd8871 100644 --- a/blog/tests/behat/blog_visibility.feature +++ b/blog/tests/behat/blog_visibility.feature @@ -18,7 +18,7 @@ Feature: Blogs can be set to be only visible by the author. | testuser2 | C1 | student | And I log in as "admin" And I am on site homepage - And I navigate to "Blog" node in "Site administration > Appearance" + And I navigate to "Appearance > Blog" in site administration And I set the following fields to these values: | Blog visibility | Users can only see their own blog | And I press "Save changes" diff --git a/blog/tests/behat/comment.feature b/blog/tests/behat/comment.feature index 86099b009c1..456ac5d77cf 100644 --- a/blog/tests/behat/comment.feature +++ b/blog/tests/behat/comment.feature @@ -20,7 +20,8 @@ Feature: Comment on a blog entry And I press "Save changes" And I log out And I log in as "testuser" - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | Blog post from user 1 | @@ -32,7 +33,8 @@ Feature: Comment on a blog entry Scenario: Commenting on my own blog entry Given I am on site homepage And I log in as "testuser" - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Blog post from user 1" And I should see "User 1 blog post content" And I follow "Comments (0)" @@ -47,7 +49,8 @@ Feature: Comment on a blog entry Scenario: Deleting my own comment Given I am on site homepage And I log in as "testuser" - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Blog post from user 1" And I should see "User 1 blog post content" And I follow "Comments (0)" @@ -67,7 +70,8 @@ Feature: Comment on a blog entry Given I am on site homepage And I log in as "testuser2" And I am on site homepage - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Blog post from user 1" When I follow "Comments (0)" And I set the field "content" to "$My own >nasty< \"string\"!" diff --git a/blog/tests/behat/delete.feature b/blog/tests/behat/delete.feature index 950577ba8a9..01198204071 100644 --- a/blog/tests/behat/delete.feature +++ b/blog/tests/behat/delete.feature @@ -19,7 +19,7 @@ Feature: Delete a blog entry And I press "Save changes" And I log out And I log in as "testuser" - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site blogs" "link" in the "Navigation" "block" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | Blog post one | @@ -31,7 +31,7 @@ Feature: Delete a blog entry | Blog entry body | User 1 blog post content | And I press "Save changes" And I am on site homepage - And I navigate to "Site blogs" node in "Site pages" + And I click on "Site blogs" "link" in the "Navigation" "block" Scenario: Delete blog post results in post deleted Given I follow "Blog post one" diff --git a/calendar/tests/behat/category_events.feature b/calendar/tests/behat/category_events.feature index 17a45387d32..5382c8fc9c7 100644 --- a/calendar/tests/behat/category_events.feature +++ b/calendar/tests/behat/category_events.feature @@ -67,7 +67,11 @@ Feature: Course Category Events @javascript Scenario: Manager of a Category can see all child and parent events in their category Given I log in as "managera" - When I navigate to "Calendar" node in "Site pages" + And I press "Customise this page" + # TODO MDL-57120 site "Tags" link not accessible without navigation block. + When I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Calendar" "link" in the "Navigation" "block" Then I should see "FA event" And I should see "DA1 event" And I should see "DA2 event" @@ -76,7 +80,11 @@ Feature: Course Category Events And I should not see "DB2 event" And I log out Given I log in as "managerb" - When I navigate to "Calendar" node in "Site pages" + And I press "Customise this page" + # TODO MDL-57120 site "Tags" link not accessible without navigation block. + When I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Calendar" "link" in the "Navigation" "block" Then I should see "FB event" And I should see "DB1 event" And I should see "DB2 event" @@ -87,7 +95,11 @@ Feature: Course Category Events @javascript Scenario: Users enrolled in a course can see all child and parent events in their category Given I log in as "student1" - When I navigate to "Calendar" node in "Site pages" + And I press "Customise this page" + # TODO MDL-57120 site "Tags" link not accessible without navigation block. + When I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Calendar" "link" in the "Navigation" "block" Then I should see "FA event" And I should see "DA1 event" And I should see "DA2 event" diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index 203673be0bf..5ee8c959cff 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -48,7 +48,7 @@ Feature: Access visible and hidden cohorts Scenario: Teacher can see visible cohorts defined in the above contexts When I log in as "teacher" And I am on "Course 1" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I select "Cohort sync" from the "Add method" singleselect And I open the autocomplete suggestions list Then "Cohort in category 1" "autocomplete_suggestions" should exist @@ -61,10 +61,10 @@ Feature: Access visible and hidden cohorts And I set the field "Cohort" to "System cohort" And I press "Add method" And I am on "Course 1" course homepage - And I navigate to "Enrolled users" node in "Course administration > Users" + And I navigate to "Users > Enrolled users" in current page administration And I should see "student@example.com" And I am on "Course 1" course homepage - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And I press "Auto-create groups" And the "Select members from cohort" select box should contain "Cohort in category 1" And the "Select members from cohort" select box should contain "System cohort" @@ -78,7 +78,7 @@ Feature: Access visible and hidden cohorts Scenario: System manager can see all cohorts defined in the above contexts When I log in as "user1" And I am on "Course 1" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I select "Cohort sync" from the "Add method" singleselect And I open the autocomplete suggestions list Then "Cohort in category 1" "autocomplete_suggestions" should exist @@ -90,9 +90,10 @@ Feature: Access visible and hidden cohorts And "System empty cohort" "autocomplete_suggestions" should exist And I set the field "Cohort" to "System cohort" And I press "Add method" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 1" course homepage + And I navigate to "Users > Enrolled users" in current page administration And I should see "student@example.com" - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And I press "Auto-create groups" And the "Select members from cohort" select box should contain "Cohort in category 1" And the "Select members from cohort" select box should contain "System cohort" @@ -106,7 +107,7 @@ Feature: Access visible and hidden cohorts Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above When I log in as "user2" And I am on "Course 1" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I select "Cohort sync" from the "Add method" singleselect And I open the autocomplete suggestions list Then "Cohort in category 1" "autocomplete_suggestions" should exist @@ -118,9 +119,10 @@ Feature: Access visible and hidden cohorts And "System empty cohort" "autocomplete_suggestions" should exist And I set the field "Cohort" to "System cohort" And I press "Add method" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 1" course homepage + And I navigate to "Users > Enrolled users" in current page administration And I should see "student@example.com" - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And I press "Auto-create groups" And the "Select members from cohort" select box should contain "Cohort in category 1" And the "Select members from cohort" select box should contain "System cohort" diff --git a/cohort/tests/behat/add_cohort.feature b/cohort/tests/behat/add_cohort.feature index 7d21b9877bf..1a5955da067 100644 --- a/cohort/tests/behat/add_cohort.feature +++ b/cohort/tests/behat/add_cohort.feature @@ -12,7 +12,7 @@ Feature: Add cohorts of users | user3 | Third | User | third@example.com | | user4 | Forth | User | forth@example.com | And I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Add new cohort" And I set the following fields to these values: | Name | Test cohort name | diff --git a/cohort/tests/behat/behat_cohort.php b/cohort/tests/behat/behat_cohort.php index aad2b9c1b2f..1c375db32cf 100644 --- a/cohort/tests/behat/behat_cohort.php +++ b/cohort/tests/behat/behat_cohort.php @@ -50,13 +50,12 @@ class behat_cohort extends behat_base { if (!$this->getSession()->getPage()->find('css', 'input#cohort_search_q')) { // With JS enabled we should expand a few tree nodes. - $parentnodes = get_string('administrationsite') . ' > ' . - get_string('users', 'admin') . ' > ' . + $parentnodes = get_string('users', 'admin') . ' > ' . get_string('accounts', 'admin'); $this->execute("behat_general::i_am_on_homepage"); - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('cohorts', 'cohort'), $parentnodes) + $this->execute("behat_navigation::i_navigate_to_in_site_administration", + $parentnodes . ' > ' . get_string('cohorts', 'cohort') ); } diff --git a/cohort/tests/behat/upload_cohort_users.feature b/cohort/tests/behat/upload_cohort_users.feature index 1b1edb4086a..77d7f91e5a6 100644 --- a/cohort/tests/behat/upload_cohort_users.feature +++ b/cohort/tests/behat/upload_cohort_users.feature @@ -21,7 +21,7 @@ Feature: Upload users to a cohort And I am on "Course 2" course homepage And I add "Cohort sync" enrolment method with: | Cohort | Cohort 2 | - When I navigate to "Upload users" node in "Site administration > Users > Accounts" + When I navigate to "Users > Accounts > Upload users" in site administration And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager And I press "Upload users" And I press "Upload users" diff --git a/cohort/tests/behat/upload_cohorts.feature b/cohort/tests/behat/upload_cohorts.feature index 2cc5074d2a2..73ef61d2304 100644 --- a/cohort/tests/behat/upload_cohorts.feature +++ b/cohort/tests/behat/upload_cohorts.feature @@ -14,7 +14,7 @@ Feature: A privileged user can create cohorts using a CSV file @javascript Scenario: Upload cohorts with default System context as admin When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager And I click on "Preview" "button" @@ -53,7 +53,7 @@ Feature: A privileged user can create cohorts using a CSV file @javascript @_file_upload Scenario: Upload cohorts with default category context as admin When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager And I set the field "Default context" to "Cat 1 / Cat 3" @@ -70,7 +70,7 @@ Feature: A privileged user can create cohorts using a CSV file And I should see "Uploaded 6 cohorts" And I press "Continue" And I should see "Category: Cat 3: available cohorts (3)" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "All cohorts" And the following should exist in the "cohorts" table: | Category | Name | Cohort ID | Description | Cohort size | Source | @@ -113,7 +113,7 @@ Feature: A privileged user can create cohorts using a CSV file | name | idnumber | | Cohort | cohortid2 | When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager And I click on "Preview" "button" @@ -131,7 +131,7 @@ Feature: A privileged user can create cohorts using a CSV file @javascript @_file_upload Scenario: Upload cohorts with different ways of specifying context When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts2.csv" file to "File" filemanager And I click on "Preview" "button" @@ -165,7 +165,7 @@ Feature: A privileged user can create cohorts using a CSV file @javascript @_file_upload Scenario: Upload cohorts with theme When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Upload cohorts" And I upload "cohort/tests/fixtures/uploadcohorts4.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 f9707017aaf..b901cc23cf5 100644 --- a/cohort/tests/behat/view_cohorts.feature +++ b/cohort/tests/behat/view_cohorts.feature @@ -29,7 +29,7 @@ Feature: View cohort list Scenario: Admin can see system cohorts and all cohorts When I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration Then I should see "System cohort" And I should not see "Cohort in category" And I follow "All cohorts" @@ -41,7 +41,7 @@ Feature: View cohort list Scenario: Manager can see system cohorts and all cohorts When I log in as "user1" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration Then I should see "System cohort" And I should not see "Cohort in category" And I follow "All cohorts" diff --git a/completion/tests/behat/behat_completion.php b/completion/tests/behat/behat_completion.php index 61582abe2b0..296f92e4ae3 100644 --- a/completion/tests/behat/behat_completion.php +++ b/completion/tests/behat/behat_completion.php @@ -84,9 +84,10 @@ class behat_completion extends behat_base { */ public function go_to_the_current_course_activity_completion_report() { $completionnode = get_string('pluginname', 'report_progress'); - $reportsnode = get_string('courseadministration') . ' > ' . get_string('reports'); + $reportsnode = get_string('reports'); - $this->execute("behat_navigation::i_navigate_to_node_in", array($completionnode, $reportsnode)); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", + $reportsnode . ' > ' . $completionnode); } /** diff --git a/completion/tests/behat/enable_manual_complete_mark.feature b/completion/tests/behat/enable_manual_complete_mark.feature index 6ba1be43405..f6b08268298 100644 --- a/completion/tests/behat/enable_manual_complete_mark.feature +++ b/completion/tests/behat/enable_manual_complete_mark.feature @@ -36,5 +36,4 @@ Feature: Allow students to manually mark an activity as complete And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Reports > Activity completion" in current page administration And "Student First" user has completed "Test forum name" activity diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index 52f4354e367..48b56090de4 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -135,14 +135,14 @@ class behat_course extends behat_base { */ public function i_go_to_the_courses_management_page() { - $parentnodes = get_string('administrationsite') . ' > ' . get_string('courses', 'admin'); + $parentnodes = get_string('courses', 'admin'); // Go to home page. $this->execute("behat_general::i_am_on_homepage"); - // Navigate to course management page via navigation block. - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('coursemgmt', 'admin'), $parentnodes) + // Navigate to course management via system administration. + $this->execute("behat_navigation::i_navigate_to_in_site_administration", + array($parentnodes . ' > ' . get_string('coursemgmt', 'admin')) ); } diff --git a/course/tests/behat/coursetags.feature b/course/tests/behat/coursetags.feature index 62ccbeda6b2..0883b524732 100644 --- a/course/tests/behat/coursetags.feature +++ b/course/tests/behat/coursetags.feature @@ -34,14 +34,14 @@ Feature: Tagging courses Scenario: Set course tags using the course edit form When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page 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 am on "Course 2" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Tags | Mathematics, Geometry | And I press "Save and display" @@ -50,7 +50,8 @@ Feature: Tagging courses And I press "Customise this page" # TODO MDL-57120 "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Mathematics" Then I should see "Course 1" And I should see "Course 2" @@ -86,7 +87,8 @@ Feature: Tagging courses And I press "Customise this page" # TODO MDL-57120 "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Mathematics" Then I should see "Course 1" And I should see "Course 2" diff --git a/course/tests/behat/keyholder.feature b/course/tests/behat/keyholder.feature index 41e4570c742..604f8940479 100644 --- a/course/tests/behat/keyholder.feature +++ b/course/tests/behat/keyholder.feature @@ -8,7 +8,7 @@ Feature: Keyholder role is listed as course contact And the following "categories" exist: | name | category | idnumber | | Cat 1 | 0 | CAT1 | - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I click on "Add a new role" "button" And I click on "Continue" "button" And I set the following fields to these values: @@ -18,7 +18,7 @@ Feature: Keyholder role is listed as course contact | contextlevel50 | 1 | | enrol/self:holdkey | 1 | And I click on "Create this role" "button" - And I navigate to "Courses" node in "Site administration > Appearance" + And I navigate to "Appearance > Courses" in site administration And I click on "Keyholder" "checkbox" And I press "Save changes" And the following "users" exist: diff --git a/course/tests/behat/max_number_sections.feature b/course/tests/behat/max_number_sections.feature index 8e05e5043c8..f337be1c88a 100644 --- a/course/tests/behat/max_number_sections.feature +++ b/course/tests/behat/max_number_sections.feature @@ -12,7 +12,7 @@ Feature: The maximum number of weeks/topics in a course can be configured | user | course | role | | manager1 | Acceptance test site | manager | And I log in as "admin" - And I navigate to "Course default settings" node in "Site administration > Courses" + And I navigate to "Courses > Course default settings" in site administration @javascript Scenario: The number of sections can be increased and the limits are applied to courses diff --git a/course/tests/behat/role_renaming.feature b/course/tests/behat/role_renaming.feature index d4b7f3d0817..d9a389d8592 100644 --- a/course/tests/behat/role_renaming.feature +++ b/course/tests/behat/role_renaming.feature @@ -26,7 +26,7 @@ Feature: Rename roles in a course | Your word for 'Teacher' | Lecturer | | Your word for 'Student' | Learner | And I press "Save and display" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I navigate to "Users > Enrolled users" in current page administration Then I should see "Lecturer" in the "Teacher 1" "table_row" And I should see "Learner" in the "Student 1" "table_row" diff --git a/enrol/guest/tests/behat/guest_access.feature b/enrol/guest/tests/behat/guest_access.feature index 1b05008bb50..af6c0f79ad1 100644 --- a/enrol/guest/tests/behat/guest_access.feature +++ b/enrol/guest/tests/behat/guest_access.feature @@ -22,7 +22,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al | Description | Test forum description | Scenario: Allow guest access without password - Given I navigate to "Enrolment methods" node in "Course administration > Users" + Given I navigate to "Users > Enrolment methods" in current page administration And I click on "Edit" "link" in the "Guest access" "table_row" And I set the following fields to these values: | Allow guest access | Yes | @@ -34,7 +34,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al Then I should not see "Subscribe to this forum" Scenario: Allow guest access with password - Given I navigate to "Enrolment methods" node in "Course administration > Users" + Given I navigate to "Users > Enrolment methods" in current page administration And I click on "Edit" "link" in the "Guest access" "table_row" And I set the following fields to these values: | Allow guest access | Yes | diff --git a/enrol/lti/tests/behat/basic_settings.feature b/enrol/lti/tests/behat/basic_settings.feature index fe6337e5bef..40cfc3ef730 100644 --- a/enrol/lti/tests/behat/basic_settings.feature +++ b/enrol/lti/tests/behat/basic_settings.feature @@ -16,9 +16,9 @@ Feature: Check that settings are adhered to when creating an enrolment plugin | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" + And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration And I click on "Enable" "link" in the "Publish as LTI tool" "table_row" - And I navigate to "Publish as LTI tool" node in "Site administration > Plugins > Enrolments" + And I navigate to "Plugins > Enrolments > Publish as LTI tool" in site administration And I set the following fields to these values: | Email display | Allow everyone to see my email address | | City/town | Perth | @@ -31,7 +31,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I select "Publish as LTI tool" from the "Add method" singleselect When I expand all fieldsets Then the field "Email display" matches value "Allow everyone to see my email address" diff --git a/enrol/lti/tests/behat/index_page.feature b/enrol/lti/tests/behat/index_page.feature index 0f7d81c44d6..37920322790 100644 --- a/enrol/lti/tests/behat/index_page.feature +++ b/enrol/lti/tests/behat/index_page.feature @@ -15,7 +15,7 @@ Feature: Check that the page listing the shared external tools is functioning as | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" + And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration And I click on "Enable" "link" in the "Publish as LTI tool" "table_row" And I log out @@ -25,13 +25,12 @@ Feature: Check that the page listing the shared external tools is functioning as And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration And I select "Publish as LTI tool" from the "Add method" singleselect And I set the following fields to these values: | Custom instance name | Assignment - LTI | | Tool to be published | Test assignment name | And I press "Add method" - And I navigate to "Published as LTI tools" node in "Course administration" And I should see "Assignment - LTI" in the ".generaltable" "css_element" When I click on "Disable" "link" in the "Assignment - LTI" "table_row" Then ".dimmed_text" "css_element" should exist in the "Assignment - LTI" "table_row" diff --git a/enrol/meta/tests/behat/enrol_meta.feature b/enrol/meta/tests/behat/enrol_meta.feature index 8b6cf0bc941..6ed84e4462f 100644 --- a/enrol/meta/tests/behat/enrol_meta.feature +++ b/enrol/meta/tests/behat/enrol_meta.feature @@ -32,7 +32,7 @@ Feature: Enrolments are synchronised with meta courses | student1 | C4C4 | student | 0 | | student2 | C4C4 | student | 1 | And I log in as "admin" - And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" + And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration And I click on "Enable" "link" in the "Course meta link" "table_row" And I am on course index @@ -40,7 +40,8 @@ Feature: Enrolments are synchronised with meta courses When I am on "Course 3" course homepage And I add "Course meta link" enrolment method with: | Link course | C1C1 | - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 3" course homepage + And I navigate to "Users > Enrolled users" in current page administration Then I should see "No groups" in the "Student 1" "table_row" And I should see "No groups" in the "Student 4" "table_row" @@ -53,7 +54,8 @@ Feature: Enrolments are synchronised with meta courses And I add "Course meta link" enrolment method with: | Link course | C2C2 | | Add to group | Groupcourse 2 | - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 3" course homepage + And I navigate to "Users > Enrolled users" in current page administration Then I should see "Groupcourse 1" in the "Student 1" "table_row" And I should see "Groupcourse 1" in the "Student 2" "table_row" And I should see "Groupcourse 1" in the "Student 3" "table_row" @@ -68,12 +70,13 @@ Feature: Enrolments are synchronised with meta courses And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Create new group | - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 3" course homepage + And I navigate to "Users > Enrolled users" in current page administration Then I should see "Course 1 course" in the "Student 1" "table_row" And I should see "Course 1 course" in the "Student 2" "table_row" And I should see "Course 1 course" in the "Student 3" "table_row" And I should see "Course 1 course" in the "Student 4" "table_row" - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And the "Groups" select box should contain "Course 1 course (4)" Scenario: Backup and restore of meta enrolment instance @@ -96,10 +99,11 @@ Feature: Enrolments are synchronised with meta courses And I press "Perform restore" And I trigger cron And I am on "Course 5 copy 1" course homepage - And I navigate to "Enrolment methods" node in "Course administration > Users" + And I navigate to "Users > Enrolment methods" in current page administration Then I should see "Course meta link (Course 1)" And I should see "Course meta link (Course 2)" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 5 copy 1" course homepage + And I navigate to "Users > Enrolled users" in current page administration And I should see "Groupcourse 1" in the "Student 1" "table_row" And I should see "Groupcourse 1" in the "Student 2" "table_row" And I should see "Groupcourse 1" in the "Student 3" "table_row" diff --git a/enrol/self/tests/behat/key_holder.feature b/enrol/self/tests/behat/key_holder.feature index c9cd9d46a49..eae9dd415f7 100644 --- a/enrol/self/tests/behat/key_holder.feature +++ b/enrol/self/tests/behat/key_holder.feature @@ -13,7 +13,7 @@ Feature: Users can be defined as key holders in courses where self enrolment is | fullname | shortname | format | | Course 1 | C1 | topics | And I log in as "admin" - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I click on "Add a new role" "button" And I click on "Continue" "button" And I set the following fields to these values: @@ -22,7 +22,7 @@ Feature: Users can be defined as key holders in courses where self enrolment is | contextlevel50 | 1 | | enrol/self:holdkey | 1 | And I click on "Create this role" "button" - And I navigate to "Courses" node in "Site administration > Appearance" + And I navigate to "Appearance > Courses" in site administration And I set the following fields to these values: | Key holder | 1 | And I press "Save changes" diff --git a/enrol/tests/behat/behat_enrol.php b/enrol/tests/behat/behat_enrol.php index 1cde57b01a5..bd48efcbb09 100644 --- a/enrol/tests/behat/behat_enrol.php +++ b/enrol/tests/behat/behat_enrol.php @@ -48,9 +48,9 @@ class behat_enrol extends behat_base { */ public function i_add_enrolment_method_with($enrolmethod, TableNode $table) { // Navigate to enrolment method page. - $parentnodes = get_string('courseadministration') . ' > ' . get_string('users', 'admin'); - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('type_enrol_plural', 'plugin'), $parentnodes) + $parentnodes = get_string('users', 'admin'); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", + array($parentnodes .' > '. get_string('type_enrol_plural', 'plugin')) ); // Select enrolment method. @@ -87,9 +87,9 @@ class behat_enrol extends behat_base { public function i_enrol_user_as($userfullname, $rolename) { // Navigate to enrolment page. - $parentnodes = get_string('courseadministration') . ' > ' . get_string('users', 'admin'); - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('enrolledusers', 'enrol'), $parentnodes) + $parentnodes = get_string('users', 'admin'); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", + array($parentnodes . ' > '. get_string('enrolledusers', 'enrol')) ); $this->execute("behat_forms::press_button", get_string('enrolusers', 'enrol')); diff --git a/enrol/tests/behat/enrol_user.feature b/enrol/tests/behat/enrol_user.feature index 294ee58eb0f..9cf5313cfbb 100644 --- a/enrol/tests/behat/enrol_user.feature +++ b/enrol/tests/behat/enrol_user.feature @@ -16,11 +16,12 @@ Feature: User can be enrolled into a course Scenario: User can be enrolled without javascript When I enrol "Studie One" user as "Student" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 001" course homepage + And I navigate to "Users > Enrolled users" in current page administration Then I should see "Studie One" @javascript Scenario: User can be enrolled with javascript enrol element When I enrol "Studie One" user as "Student" - And I navigate to "Enrolled users" node in "Course administration > Users" + And I navigate to "Users > Enrolled users" in current page administration Then I should see "Studie One" diff --git a/enrol/tests/behat/role_visibility.feature b/enrol/tests/behat/role_visibility.feature index 7c8d911e971..9e42d5537ec 100644 --- a/enrol/tests/behat/role_visibility.feature +++ b/enrol/tests/behat/role_visibility.feature @@ -22,7 +22,7 @@ Feature: Test role visibility for the participants page Scenario: Check the default roles are visible Given I log in as "manager1" And I follow "Course 1" - When I navigate to "Enrolled users" node in "Course administration > Users" + When I navigate to "Users > Enrolled users" in current page administration Then "Learner 1" row "Roles" column of "participants" table should contain "Student" And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher" And "Manager 1" row "Roles" column of "participants" table should contain "Manager" @@ -31,7 +31,7 @@ Feature: Test role visibility for the participants page Scenario: Do not allow managers to view any roles but manager and check they are hidden Given I log in as "teacher1" And I am on "Course 1" course homepage - When I navigate to "Enrolled users" node in "Course administration > Users" + When I navigate to "Users > Enrolled users" in current page administration Then "Learner 1" row "Roles" column of "participants" table should contain "Student" And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher" And "Manager 1" row "Roles" column of "participants" table should not contain "Manager" diff --git a/files/tests/behat/add_custom_file_type.feature b/files/tests/behat/add_custom_file_type.feature index 59f1773cfb3..7eca2c762a6 100644 --- a/files/tests/behat/add_custom_file_type.feature +++ b/files/tests/behat/add_custom_file_type.feature @@ -16,7 +16,7 @@ Feature: Add a new custom file type | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "File types" node in "Site administration>Server" + And I navigate to "Server > File types" in site administration And I press "Add a new file type" And I set the following fields to these values: | Extension | mdlr | diff --git a/files/tests/behat/course_files.feature b/files/tests/behat/course_files.feature index c44e15436fa..daea45c0433 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 "Course 1" course homepage Then "Legacy course files" "link" should exist in current page administration - And I navigate to "Legacy course files" node in "Course administration" + And I navigate to "Legacy course files" in current page administration And I press "Edit legacy course files" And "Add..." "link" should be visible And "Create folder" "link" should be visible @@ -31,7 +31,7 @@ Feature: Course files When I log in as "admin" And I am on "Course 1" course homepage Then "Legacy course files" "link" should exist in current page administration - And I navigate to "Legacy course files" node in "Course administration" + And I navigate to "Legacy course files" in current page administration And I press "Edit legacy course files" And "Add..." "link" should not be visible And "Create folder" "link" should not be visible diff --git a/grade/tests/behat/grade_UI_settings.feature b/grade/tests/behat/grade_UI_settings.feature index b354dae3e4f..e609e75e828 100644 --- a/grade/tests/behat/grade_UI_settings.feature +++ b/grade/tests/behat/grade_UI_settings.feature @@ -26,7 +26,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI Scenario: Hide minimum grade When I click on "Edit assign Assignment1" "link" And I should see "Minimum grade" - Then I navigate to "General settings" node in "Site administration > Grades" + Then I navigate to "Grades > General settings" in site administration And I set the field "Show minimum grade" to "0" And I press "Save changes" And I am on "Course 1" course homepage @@ -37,7 +37,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI @javascript Scenario: Hide calculation icons And "Edit calculation for Course total" "link" should exist - When I navigate to "Grader report" node in "Site administration > Grades > Report settings" + When I navigate to "Grades > Report settings > Grader report" in site administration And I set the field "Show calculations" to "0" And I press "Save changes" And I am on "Course 1" course homepage @@ -47,7 +47,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI @javascript Scenario: Disable category overriding And "tr .course input[type='text']" "css_element" should exist - Then I navigate to "Grade category settings" node in "Site administration > Grades" + Then I navigate to "Grades > Grade category settings" in site administration And I set the field "Allow category grades to be manually overridden" to "0" And I press "Save changes" And I am on "Course 1" course homepage diff --git a/grade/tests/behat/grade_average.feature b/grade/tests/behat/grade_average.feature index 20a9398444c..b9da0a4554c 100644 --- a/grade/tests/behat/grade_average.feature +++ b/grade/tests/behat/grade_average.feature @@ -42,7 +42,8 @@ Feature: Average grades are displayed in the gradebook And I press "Save changes" And I turn editing mode off # Suspend a user - And I navigate to "Enrolled users" node in "Course administration > Users" + And I am on "Course 1" course homepage + And I navigate to "Users > Enrolled users" in current page administration And I click on "Edit enrolment" "link" in the "Student 2" "table_row" And I set the following fields to these values: | Status | Suspended | diff --git a/grade/tests/behat/grade_category_validation.feature b/grade/tests/behat/grade_category_validation.feature index ad270465406..702ea0f85f6 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -17,7 +17,7 @@ Feature: Editing a grade item | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | ABCDEF | diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index e7616710eac..f51b43d70cc 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -35,9 +35,9 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I press "Save changes" And I set "=[[a4]]/2" calculation for grade item "calculated" with idnumbers: | Sub category 1 | sub1 | - And I navigate to "Overview report" node in "Site administration > Grades > Report settings" + And I navigate to "Grades > Report settings > Overview report" in site administration And I set the field "s__grade_report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" - And I navigate to "User report" node in "Site administration > Grades > Report settings" + And I navigate to "Grades > Report settings > User report" in site administration And I set the field "s__grade_report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" And I press "Save changes" When I log out diff --git a/grade/tests/behat/grade_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index 4f3d6cb3663..96ba66c67b3 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -17,7 +17,7 @@ Feature: Grade item validation | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | ABCDEF | diff --git a/grade/tests/behat/grade_letter_logging.feature b/grade/tests/behat/grade_letter_logging.feature index db472f05de5..fc022277675 100644 --- a/grade/tests/behat/grade_letter_logging.feature +++ b/grade/tests/behat/grade_letter_logging.feature @@ -31,7 +31,7 @@ Feature: We can view the logs for any changes to grade letters. | id_gradeletter11 | | | id_gradeboundary11 | | And I press "Save changes" - When I navigate to "Live logs" node in "Site administration > Reports" + When I navigate to "Reports > Live logs" in site administration Then I should see "Grade letter created" And I should see "Grade letter updated" And I should see "Grade letter deleted" diff --git a/grade/tests/behat/grade_point_maximum.feature b/grade/tests/behat/grade_point_maximum.feature index 5e172374629..3176f39702b 100644 --- a/grade/tests/behat/grade_point_maximum.feature +++ b/grade/tests/behat/grade_point_maximum.feature @@ -14,7 +14,7 @@ Feature: We can change the grading type and maximum grade point values | activity | course | idnumber | name | intro | | assign | C1 | assign1| Test Assignment 1 | Test Assignment 1 | And I log in as "admin" - And I navigate to "General settings" node in "Site administration > Grades" + And I navigate to "Grades > General settings" in site administration And I set the following fields to these values: | Grade point maximum | 900 | | Grade point default | 800 | @@ -92,7 +92,7 @@ Feature: We can change the grading type and maximum grade point values 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 navigate to "General settings" node in "Site administration > Grades" + And I navigate to "Grades > General settings" in site administration And I set the following fields to these values: | Grade point maximum | 100 | And I press "Save changes" diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index d673eabf7cb..0503f9fde15 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -9,7 +9,7 @@ Feature: View gradebook when scales are used And I set the following administration settings values: | grade_report_showranges | 1 | | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | Letterscale | diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index 8a26b40519a..46c8cb3420b 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -20,7 +20,7 @@ Feature: Control the aggregation of the scales And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | | grade_report_user_showcontributiontocoursetotal | 1 | - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | Letterscale | diff --git a/grade/tests/behat/grade_scales_logging.feature b/grade/tests/behat/grade_scales_logging.feature index 0af66d2c213..5c8e622f96f 100644 --- a/grade/tests/behat/grade_scales_logging.feature +++ b/grade/tests/behat/grade_scales_logging.feature @@ -6,7 +6,7 @@ Feature: We can view the logs for any changes to grade scales. Scenario: I edit scales and then view the logs. Given I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration # Add a scale And I press "Add a new scale" And I set the following fields to these values: @@ -21,7 +21,7 @@ Feature: We can view the logs for any changes to grade scales. And I set the following fields to these values: | id_scale | ONE,TWO,THREE | And I press "Save changes" - When I navigate to "Live logs" node in "Site administration > Reports" + When I navigate to "Reports > Live logs" in site administration Then I should see "Scale created" And I should see "Scale updated" And I should see "Scale deleted" diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 1b319e328d0..1d7a84c0bc6 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -9,7 +9,7 @@ Feature: View gradebook when single item scales are used And I set the following administration settings values: | grade_report_showranges | 1 | | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | Singleitem | diff --git a/group/tests/behat/overview.feature b/group/tests/behat/overview.feature index c2ef16edf02..04195632419 100644 --- a/group/tests/behat/overview.feature +++ b/group/tests/behat/overview.feature @@ -58,7 +58,7 @@ Feature: Group overview Scenario: Filter the overview in various different ways Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration And I follow "Overview" # Grouping All and Group All filter diff --git a/group/tests/behat/role_visibility.feature b/group/tests/behat/role_visibility.feature index 37b283bba6d..b160511d1df 100644 --- a/group/tests/behat/role_visibility.feature +++ b/group/tests/behat/role_visibility.feature @@ -30,7 +30,7 @@ Feature: Test role visibility for the groups management page Scenario: Check the default roles are visible Given I log in as "manager1" And I am on "Course 1" course homepage - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration When I set the field "groups" to "Group 1 (3)" And I press "Show members for group" Then "optgroup[label='No roles']" "css_element" should not exist in the "#members" "css_element" @@ -42,7 +42,7 @@ Feature: Test role visibility for the groups management page Scenario: Do not allow managers to view any roles and check they are hidden Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Groups" node in "Course administration > Users" + And I navigate to "Users > Groups" in current page administration When I set the field "groups" to "Group 1 (3)" And I press "Show members for group" Then "optgroup[label='No roles']" "css_element" should exist in the "#members" "css_element" diff --git a/lib/editor/atto/tests/behat/autosave.feature b/lib/editor/atto/tests/behat/autosave.feature index 3281ba69f4e..d66cb2fb5e2 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -15,12 +15,12 @@ Feature: Atto Autosave | teacher1 | C1 | editingteacher | | teacher2 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Atto toolbar settings" node in "Site administration > Plugins > Text editors > Atto HTML editor" + And I navigate to "Plugins > Text editors > Atto HTML editor > Atto toolbar settings" in site administration And I set the field "Autosave frequency" to "3" And I set the field with xpath "//select[@name='s_editor_atto_autosavefrequency[u]']" to "seconds" And I click on "Save changes" "button" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field with xpath "//select[@name='summary_editor[format]']" to "1" And I click on "Save and display" "button" And I log out @@ -29,14 +29,14 @@ Feature: Atto Autosave Scenario: Restore a draft Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "Course summary" to "This is my draft" # Wait for the autosave And I wait "5" seconds And I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration # Wait for the autorestore And I wait "2" seconds Then I should see "This is my draft" @@ -45,7 +45,7 @@ Feature: Atto Autosave Scenario: Do not restore a draft if files have been modified Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "Course summary" to "This is my draft" # Wait for the autosave And I wait "5" seconds @@ -55,7 +55,7 @@ Feature: Atto Autosave And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "Course summary" to "

Image test

" And I select the text in the "Course summary" Atto editor And I click on "Insert or edit image" "button" @@ -71,26 +71,26 @@ Feature: Atto Autosave And I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration Then I should not see "This is my draft" @javascript Scenario: Do not restore a draft if text has been modified Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "Course summary" to "This is my draft" # Wait for the autosave And I wait "5" seconds And I log out And I log in as "teacher2" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the field "Course summary" to "Modified text" And I click on "Save and display" "button" And I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration Then I should not see "This is my draft" And I should see "Modified text" diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index 7884710ac39..a28766ea02a 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -19,7 +19,7 @@ Feature: Using the activity grade form element Scenario: Being able to change the grade type, scale and maximum grade when there are no grades Given I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | ABCDEF | @@ -66,7 +66,7 @@ Feature: Using the activity grade form element @javascript Scenario: Attempting to change the scale when grades already exist in rating activity Given I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | ABCDEF | @@ -119,7 +119,7 @@ Feature: Using the activity grade form element @javascript Scenario: Attempting to change the scale when grades already exist in non-rating activity Given I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | ABCDEF | diff --git a/lib/tests/behat/alpha_chooser.feature b/lib/tests/behat/alpha_chooser.feature index 129ee9deffa..e81eca36b01 100644 --- a/lib/tests/behat/alpha_chooser.feature +++ b/lib/tests/behat/alpha_chooser.feature @@ -263,7 +263,7 @@ Feature: Initials bar And I log out And I log in as "teacher" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element" And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element" @@ -288,7 +288,7 @@ Feature: Initials bar And I should see "Bstudent Astudent" And I should not see "Cstudent Cstudent" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element" And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element" And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element" diff --git a/lib/tests/behat/behat_deprecated.php b/lib/tests/behat/behat_deprecated.php index 9516095fbdb..67b3d8ef417 100644 --- a/lib/tests/behat/behat_deprecated.php +++ b/lib/tests/behat/behat_deprecated.php @@ -54,6 +54,33 @@ class behat_deprecated extends behat_base { $this->execute('behat_grade::i_navigate_to_in_the_course_gradebook', $gradepath); } + /** + * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one) + * + * @Given /^I navigate to "(?P(?:[^"]|\\")*)" node in "(?P(?:[^"]|\\")*)"$/ + * + * @throws ExpectationException + * @param string $nodetext navigation node to click. + * @param string $parentnodes comma seperated list of parent nodes. + * @return void + * @deprecated since Moodle 3.6 MDL-57281 - please do not use this definition step any more. + * @todo MDL-63004 This will be deleted in Moodle 4.0. + */ + public function i_navigate_to_node_in($nodetext, $parentnodes) { + $alternative[] = 'I navigate to "PATH" in current page administration'; + $alternative[] = 'I navigate to "PATH" in site administration'; + $alternative[] = 'I navigate to "TAB1 > TAB2" in the course gradebook'; + $alternative[] = 'I navigate to course participants'; + $alternative[] = 'If some items are not available without Navigation block at all, one can use combination of: + I add the "Navigation" block if not present + I click on "LINK" "link" in the "Navigation" "block"'; + + $this->deprecated_message($alternative); + + $parentnodes = array_map('trim', explode('>', $parentnodes)); + $this->execute('behat_navigation::select_node_in_navigation', array($nodetext, $parentnodes)); + } + /** * Throws an exception if $CFG->behat_usedeprecated is not allowed. * diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index 959459e0ec5..fc7444c50b3 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -220,29 +220,6 @@ class behat_navigation extends behat_base { $node->click(); } - /** - * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one) - * - * @Given /^I navigate to "(?P(?:[^"]|\\")*)" node in "(?P(?:[^"]|\\")*)"$/ - * - * @todo MDL-57281 deprecate in Moodle 3.1 - * - * @throws ExpectationException - * @param string $nodetext navigation node to click. - * @param string $parentnodes comma seperated list of parent nodes. - * @return void - */ - public function i_navigate_to_node_in($nodetext, $parentnodes) { - // This step needs to be deprecated and replaced with one of: - // - I navigate to "PATH" in current page administration - // - I navigate to "PATH" in site administration - // - I navigate to course participants - // - I navigate to "PATH" in the course gradebook - // - I click on "LINK" "link" in the "Navigation" "block" . - $parentnodes = array_map('trim', explode('>', $parentnodes)); - $this->select_node_in_navigation($nodetext, $parentnodes); - } - /** * Finds a node in the Navigation or Administration tree * @@ -324,7 +301,6 @@ class behat_navigation extends behat_base { throw new ExpectationException('Navigation node "' . $nodetext . '" not found under "' . implode($parentnodes, ' > ') . '"', $this->getSession()); } - $nodetoclick->click(); } diff --git a/lib/tests/behat/behat_permissions.php b/lib/tests/behat/behat_permissions.php index 76cb49b54bc..d4c4fb8ecd9 100644 --- a/lib/tests/behat/behat_permissions.php +++ b/lib/tests/behat/behat_permissions.php @@ -48,16 +48,15 @@ class behat_permissions extends behat_base { */ public function i_set_the_following_system_permissions_of_role($rolename, $table) { - $parentnodes = get_string('administrationsite') . ' > ' . - get_string('users', 'admin') . ' > ' . + $parentnodes = get_string('users', 'admin') . ' > ' . get_string('permissions', 'role'); // Go to home page. $this->execute("behat_general::i_am_on_homepage"); // Navigate to course management page via navigation block. - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('defineroles', 'role'), $parentnodes) + $this->execute("behat_navigation::i_navigate_to_in_site_administration", + array($parentnodes . ' > ' . get_string('defineroles', 'role')) ); $this->execute("behat_general::click_link", "Edit " . $this->escape($rolename) . " role"); @@ -194,16 +193,15 @@ class behat_permissions extends behat_base { * @return void Executes other steps */ public function i_define_the_allowed_role_assignments_for_a_role_as($rolename, $table) { - $parentnodes = get_string('administrationsite') . ' > ' . - get_string('users', 'admin') . ' > ' . + $parentnodes = get_string('users', 'admin') . ' > ' . get_string('permissions', 'role'); // Go to home page. $this->execute("behat_general::i_am_on_homepage"); - // Navigate to course management page via navigation block. - $this->execute("behat_navigation::i_navigate_to_node_in", - array(get_string('defineroles', 'role'), $parentnodes) + // Navigate to Define roles page via site administration menu. + $this->execute("behat_navigation::i_navigate_to_in_site_administration", + $parentnodes .' > '. get_string('defineroles', 'role') ); $this->execute("behat_general::click_link", "Allow role assignments"); diff --git a/lib/tests/behat/timezone.feature b/lib/tests/behat/timezone.feature index 6605dc2ddd6..802ff3fb53e 100644 --- a/lib/tests/behat/timezone.feature +++ b/lib/tests/behat/timezone.feature @@ -6,6 +6,6 @@ Feature: View timezone defaults Scenario: Admin sees default timezone Australia/Perth When I log in as "admin" - And I navigate to "Location settings" node in "Site administration > Location" + And I navigate to "Location > Location settings" in site administration Then I should see "Default: Australia/Perth" And the field "Default timezone" matches value "Australia/Perth" diff --git a/lib/upgrade.txt b/lib/upgrade.txt index e9a5c7e1efd..4244d98241d 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -63,6 +63,18 @@ information provided here is intended especially for developers. * Following behat steps have been removed from core: - I set the field "" to multiline - I follow """ in the open menu +* The following behat steps have been deprecated, please do not use these step definitions any more: + - behat_navigation.php: i_navigate_to_node_in() + - theme/boost/tests/behat/behat_theme_boost_behat_navigation.php: i_navigate_to_node_in() + Use one of the following steps instead: + - I navigate to "PATH > ITEM" in current page administration + - I navigate to "PATH > ITEM" in site administration + - I navigate to course participants + - I navigate to "TAB1 > TAB2" in the course gradebook + + If some items are not available without Navigation block at all, one can use combination of: + - I add the "Navigation" block if not present + - I click on "LINK" "link" in the "Navigation" "block" * Removed the lib/password_compat/lib/password.php file. * The eventslib.php file has been deleted and its functions have been moved to deprecatedlib.php. The affected functions are: - events_get_cached() diff --git a/media/player/videojs/tests/behat/modules.feature b/media/player/videojs/tests/behat/modules.feature index 4e7a41cc6f4..a0175ddce9d 100644 --- a/media/player/videojs/tests/behat/modules.feature +++ b/media/player/videojs/tests/behat/modules.feature @@ -7,7 +7,7 @@ Feature: Embed videos without the media filter Background: Given I log in as "admin" And I am on site homepage - And I navigate to "Turn editing on" node in "Front page settings" + And I navigate to "Turn editing on" in current page administration @javascript Scenario: Add a video in a URL resource. Make sure media filters work diff --git a/message/tests/behat/update_messaging_preferences.feature b/message/tests/behat/update_messaging_preferences.feature index 5a23c1e15b6..c03d2a3c1d1 100644 --- a/message/tests/behat/update_messaging_preferences.feature +++ b/message/tests/behat/update_messaging_preferences.feature @@ -6,7 +6,7 @@ Feature: Messaging preferences Background: Given I log in as "admin" - And I navigate to "Manage message outputs" node in "Site administration > Plugins > Message outputs" + And I navigate to "Plugins > Message outputs > Manage message outputs" in site administration And I click on "//table[contains(@class, 'admintable')]/tbody/tr/td[contains(text(), 'Email')]/following-sibling::td[1]/a" "xpath_element" Scenario: Alter my message preferences @@ -22,7 +22,7 @@ Feature: Messaging preferences Given the following "users" exist: | username | firstname | lastname | email | | user1 | User | 1 | user1@example.com | - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I click on "User 1" "link" And I click on "Preferences" "link" in the ".profile_tree" "css_element" And I click on "Message preferences" "link" in the "region-main" "region" diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index ef863fa0ba6..e572cafe0c2 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -19,7 +19,8 @@ Feature: In an assignment, teacher can annotate PDF files during grading | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "admin" - And I navigate to "Annotate PDF" node in "Site administration > Plugins > Activity modules > Assignment > Feedback plugins" + And I am on site homepage + And I navigate to "Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF" in site administration And I upload "pix/help.png" file to "" filemanager And I upload "pix/docs.png" file to "" filemanager When I press "Save changes" diff --git a/mod/assign/tests/behat/assign_course_reset.feature b/mod/assign/tests/behat/assign_course_reset.feature index 0ba1b6abc5f..2373b71d3c3 100644 --- a/mod/assign/tests/behat/assign_course_reset.feature +++ b/mod/assign/tests/behat/assign_course_reset.feature @@ -50,7 +50,8 @@ Feature: Assign reset And I follow "Test assignment name" 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 am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all submissions | 1 | And I press "Reset course" @@ -75,7 +76,8 @@ Feature: Assign reset | duedate[minute] | 00 | And I press "Save" And I should see "Sam1 Student1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all user overrides | 1 | And I press "Reset course" @@ -99,7 +101,8 @@ Feature: Assign reset | duedate[minute] | 00 | And I press "Save" And I should see "Group 1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all group overrides | 1 | And I press "Reset course" @@ -121,7 +124,7 @@ Feature: Assign reset And I press "Continue" And I should see "Sam1 Student1" And I am on "Course 1" course homepage - When I navigate to "Reset" node in "Course administration" + When I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all submissions | 1 | And I press "Reset course" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 09bd8d8886c..2a024babd2a 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -21,13 +21,13 @@ Feature: Outcome grading And the following config values are set as admin: | enableoutcomes | 1 | And I log in as "admin" - And I navigate to "Scales" node in "Site administration > Grades" + And I navigate to "Grades > Scales" in site administration And I press "Add a new scale" And I set the following fields to these values: | Name | Test Scale | | Scale | Disappointing, Excellent, Good, Very good, Excellent | And I press "Save changes" - And I navigate to "Outcomes" node in "Site administration > Grades" + And I navigate to "Grades > Outcomes" in site administration And I press "Add a new outcome" And I set the following fields to these values: | Full name | Outcome Test | @@ -35,7 +35,7 @@ Feature: Outcome grading | Scale | Test Scale | And I press "Save changes" And I am on "Course 1" course homepage - And I navigate to "Outcomes" node in "Course administration" + And I navigate to "Outcomes" in current page administration And I set the field "Available standard outcomes" to "Outcome Test" And I click on "#add" "css_element" And I log out diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index 3d2afab39fb..a485ec52271 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -62,7 +62,7 @@ Feature: In an assignment, teachers grade multiple students on one page | enableoutcomes | 1 | When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Outcomes" node in "Course administration" + And I navigate to "Outcomes" in current page administration And I follow "Edit outcomes" And I press "Add a new outcome" And I follow "Add a new scale" @@ -71,7 +71,7 @@ Feature: In an assignment, teachers grade multiple students on one page | Scale | Noob, Nub, 1337, HaXor | And I press "Save changes" And I am on "Course 1" course homepage - And I navigate to "Outcomes" node in "Course administration" + And I navigate to "Outcomes" in current page administration And I follow "Edit outcomes" And I press "Add a new outcome" And I set the following fields to these values: diff --git a/mod/chat/tests/behat/chat_calendar_events.feature b/mod/chat/tests/behat/chat_calendar_events.feature index f741faa43e0..9daea09e196 100644 --- a/mod/chat/tests/behat/chat_calendar_events.feature +++ b/mod/chat/tests/behat/chat_calendar_events.feature @@ -22,8 +22,11 @@ Feature: Chat calendar entries | activity | name | intro | course | idnumber | schedule | | chat | Test chat name | Test chat description | C1 | chat1 | 0 | And I log in as "teacher1" - And I am on "Course 1" course homepage - When I navigate to "Calendar" node in "Site pages" + And I am on "Course 1" course homepage with editing mode on + # TODO MDL-57120 site "Calendar" link not accessible without navigation block. + And I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + Given I click on "Calendar" "link" in the "Navigation" "block" Then I should not see "Test chat name" Scenario: Create a chat activity and publish the start date to the calendar @@ -31,6 +34,9 @@ Feature: Chat calendar entries | activity | name | intro | course | idnumber | schedule | | chat | Test chat name | Test chat description | C1 | chat1 | 1 | And I log in as "teacher1" - And I am on "Course 1" course homepage - When I navigate to "Calendar" node in "Site pages" + And I am on "Course 1" course homepage with editing mode on + # TODO MDL-57120 site "Calendar" link not accessible without navigation block. + And I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + Given I click on "Calendar" "link" in the "Navigation" "block" Then I should see "Test chat name" diff --git a/mod/chat/tests/behat/chat_course_reset.feature b/mod/chat/tests/behat/chat_course_reset.feature index dfe88207330..022f3848179 100644 --- a/mod/chat/tests/behat/chat_course_reset.feature +++ b/mod/chat/tests/behat/chat_course_reset.feature @@ -23,7 +23,7 @@ Feature: Chat reset Scenario: Use course reset to update chat start date And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | startdate[day] | 1 | | startdate[month] | January | @@ -38,7 +38,8 @@ Feature: Chat reset | chattime[hour] | 12 | | chattime[minute] | 00 | And I press "Save and display" - When I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + When I navigate to "Reset" in current page administration And I set the following fields to these values: | reset_start_date[enabled] | 1 | | reset_start_date[day] | 1 | diff --git a/mod/data/tests/behat/behat_mod_data.php b/mod/data/tests/behat/behat_mod_data.php index 5d0d34d7a21..7adbb282e43 100644 --- a/mod/data/tests/behat/behat_mod_data.php +++ b/mod/data/tests/behat/behat_mod_data.php @@ -82,8 +82,8 @@ class behat_mod_data extends behat_base { public function i_add_an_entry_to_database_with($activityname, TableNode $entrydata) { $this->execute("behat_general::click_link", $this->escape($activityname)); - $this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('add', 'mod_data'), - get_string('pluginadministration', 'mod_data'))); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", + get_string('add', 'mod_data')); $this->execute("behat_forms::i_set_the_following_fields_to_these_values", $entrydata); } diff --git a/mod/forum/tests/behat/advanced_search.feature b/mod/forum/tests/behat/advanced_search.feature index 558ec83ece8..c2257c45732 100644 --- a/mod/forum/tests/behat/advanced_search.feature +++ b/mod/forum/tests/behat/advanced_search.feature @@ -24,7 +24,7 @@ Feature: The forum search allows users to perform advanced searches for forum po And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I add the "Latest announcements" block - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I expand all fieldsets And I set the field "id_newsitems" to "1" And I press "Save and display" diff --git a/mod/lesson/tests/behat/lesson_course_reset.feature b/mod/lesson/tests/behat/lesson_course_reset.feature index f18b3b92a20..59d70b3dc53 100644 --- a/mod/lesson/tests/behat/lesson_course_reset.feature +++ b/mod/lesson/tests/behat/lesson_course_reset.feature @@ -59,7 +59,8 @@ Feature: Lesson reset And I follow "Test lesson name" 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 am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all lesson attempts | 1 | And I press "Reset course" @@ -79,7 +80,8 @@ Feature: Lesson reset | Re-takes allowed | 1 | And I press "Save" And I should see "Sam1 Student1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all user overrides | 1 | And I press "Reset course" @@ -98,7 +100,8 @@ Feature: Lesson reset | Re-takes allowed | 1 | And I press "Save" And I should see "Group 1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all group overrides | 1 | And I press "Reset course" diff --git a/mod/lti/tests/behat/addtool.feature b/mod/lti/tests/behat/addtool.feature index 1853c06e1e8..9833e5b6f82 100644 --- a/mod/lti/tests/behat/addtool.feature +++ b/mod/lti/tests/behat/addtool.feature @@ -15,7 +15,7 @@ Feature: Add tools | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And I follow "Manage preconfigured tools" And I follow "Add preconfigured tool" And I set the following fields to these values: diff --git a/mod/lti/tests/behat/backup_restore.feature b/mod/lti/tests/behat/backup_restore.feature index dea1105ec12..7ae20306771 100644 --- a/mod/lti/tests/behat/backup_restore.feature +++ b/mod/lti/tests/behat/backup_restore.feature @@ -16,7 +16,7 @@ Feature: Restoring Moodle 2 backup restores LTI configuration Scenario: Backup and restore course with preconfigured site LTI tool on the same site When I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And I follow "Manage preconfigured tools" And I follow "Add preconfigured tool" And I set the following fields to these values: @@ -24,7 +24,7 @@ Feature: Restoring Moodle 2 backup restores LTI configuration | Tool URL | https://www.moodle.org | | lti_coursevisible | 1 | And I press "Save changes" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And "This tool has not yet been used" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element" And I am on site homepage And I follow "Course 1" @@ -43,7 +43,7 @@ Feature: Restoring Moodle 2 backup restores LTI configuration And I open "My LTI module" actions menu And I choose "Edit settings" in the open action menu Then the field "Preconfigured tool" matches value "My site tool" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And "This tool is being used 2 times" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element" @javascript @_switch_window diff --git a/mod/lti/tests/behat/contentitem.feature b/mod/lti/tests/behat/contentitem.feature index 3862dc977f5..9b6ed762f99 100644 --- a/mod/lti/tests/behat/contentitem.feature +++ b/mod/lti/tests/behat/contentitem.feature @@ -15,7 +15,7 @@ Feature: Content-Item support | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration # Create tool type that supports content-item. And I follow "configure a tool manually" And I set the field "Tool name" to "Teaching Tool 1" @@ -51,7 +51,7 @@ Feature: Content-Item support @javascript Scenario: Changing preconfigured tool selection Given I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration And I follow "configure a tool manually" And I set the field "Tool name" to "Teaching Tool 2" And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" diff --git a/mod/lti/tests/behat/contentitemregistration.feature b/mod/lti/tests/behat/contentitemregistration.feature index 17bd36b4de5..8b40f69dfb3 100644 --- a/mod/lti/tests/behat/contentitemregistration.feature +++ b/mod/lti/tests/behat/contentitemregistration.feature @@ -6,7 +6,7 @@ Feature: Create/edit tool configuration that has Content-Item support Background: Given I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration Scenario: Verifying ContentItemSelectionRequest selection support in external tool registration When I follow "Manage external tool registrations" diff --git a/mod/lti/tests/behat/toolconfigure.feature b/mod/lti/tests/behat/toolconfigure.feature index b30f5b10ad0..171ebee8e10 100644 --- a/mod/lti/tests/behat/toolconfigure.feature +++ b/mod/lti/tests/behat/toolconfigure.feature @@ -17,7 +17,7 @@ Feature: Configure tool types | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "admin" - And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" + And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration @javascript Scenario: Add a tool type from a cartridge URL diff --git a/mod/quiz/tests/behat/backup.feature b/mod/quiz/tests/behat/backup.feature index 7235af6109a..99fb72fc49a 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -37,7 +37,7 @@ Feature: Backup and restore of quizzes @javascript @_file_upload Scenario: Restore a Moodle 2.8 quiz backup When I am on "Course 1" course homepage - And I navigate to "Restore" node in "Course administration" + And I navigate to "Restore" in current page administration And I press "Manage backup files" And I upload "mod/quiz/tests/fixtures/moodle_28_quiz.mbz" file to "Files" filemanager And I press "Save changes" diff --git a/mod/quiz/tests/behat/behat_mod_quiz.php b/mod/quiz/tests/behat/behat_mod_quiz.php index 4054f62c5cf..04502934fe4 100644 --- a/mod/quiz/tests/behat/behat_mod_quiz.php +++ b/mod/quiz/tests/behat/behat_mod_quiz.php @@ -259,7 +259,7 @@ class behat_mod_quiz extends behat_question_base { $this->execute('behat_general::click_link', $quizname); - $this->execute("behat_navigation::i_navigate_to_node_in", array($editquiz, $quizadmin)); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", $editquiz); $this->execute("behat_general::i_click_on", array($menuxpath, "xpath_element")); $this->execute("behat_general::i_click_on", array($itemxpath, "xpath_element")); diff --git a/mod/quiz/tests/behat/completion_condition_attempts_used.feature b/mod/quiz/tests/behat/completion_condition_attempts_used.feature index 58e13990c26..686e05fdd04 100644 --- a/mod/quiz/tests/behat/completion_condition_attempts_used.feature +++ b/mod/quiz/tests/behat/completion_condition_attempts_used.feature @@ -52,5 +52,5 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And "Completed" "icon" should exist in the "Student 1" "table_row" diff --git a/mod/quiz/tests/behat/completion_condition_passing_grade.feature b/mod/quiz/tests/behat/completion_condition_passing_grade.feature index 7afbec51193..66896836811 100644 --- a/mod/quiz/tests/behat/completion_condition_passing_grade.feature +++ b/mod/quiz/tests/behat/completion_condition_passing_grade.feature @@ -45,5 +45,5 @@ Feature: Set a quiz to be marked complete when the student passes And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And "Completed" "icon" should exist in the "Student 1" "table_row" diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index 5b1b9a57d9e..71e54dc2132 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -109,7 +109,7 @@ Feature: Edit quiz page - adding things # Create a couple of sub categories. And I am on "Course 1" course homepage - And I navigate to "Categories" node in "Course administration > Question bank" + And I navigate to "Question bank > Categories" in current page administration Then I should see "Add category" Then I set the field "Parent category" to "Default for C1" And I set the field "Name" to "Subcat 1" @@ -123,7 +123,7 @@ Feature: Edit quiz page - adding things Then I press "id_submitbutton" And I should see "Subcat 2" - And I navigate to "Questions" node in "Course administration > Question bank" + And I follow "Question bank" Then I should see "Question bank" And I should see "Select a category" diff --git a/mod/quiz/tests/behat/editing_add_from_question_bank.feature b/mod/quiz/tests/behat/editing_add_from_question_bank.feature index 3db5abdd018..98d0e90af2f 100644 --- a/mod/quiz/tests/behat/editing_add_from_question_bank.feature +++ b/mod/quiz/tests/behat/editing_add_from_question_bank.feature @@ -26,7 +26,7 @@ Feature: Adding questions to a quiz from the question bank | Test questions | essay | question 2 name | teacher1 | Question 2 text | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration And I click on "Edit" "link" in the "question 1 name" "table_row" And I set the following fields to these values: | Tags | foo | diff --git a/mod/quiz/tests/behat/editing_add_random.feature b/mod/quiz/tests/behat/editing_add_random.feature index 0f4eddbc311..bd5feac6052 100644 --- a/mod/quiz/tests/behat/editing_add_random.feature +++ b/mod/quiz/tests/behat/editing_add_random.feature @@ -29,7 +29,7 @@ Feature: Adding random questions to a quiz based on category and tags Scenario: Available tags are shown in the autocomplete tag field Given I log in as "teacher1" And I am on "Course 1" course homepage - When I navigate to "Questions" node in "Course administration > Question bank" + When I navigate to "Question bank > Questions" in current page administration And I click on "Edit" "link" in the "question 1 name" "table_row" And I set the following fields to these values: | Tags | foo | diff --git a/mod/quiz/tests/behat/quiz_reset.feature b/mod/quiz/tests/behat/quiz_reset.feature index d2d877ab91d..8fd0849c0c4 100644 --- a/mod/quiz/tests/behat/quiz_reset.feature +++ b/mod/quiz/tests/behat/quiz_reset.feature @@ -44,7 +44,7 @@ Feature: Quiz reset And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Reset" node in "Course administration" + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all quiz attempts | 1 | And I press "Reset course" @@ -66,7 +66,8 @@ Feature: Quiz reset | Attempts allowed | 2 | And I press "Save" And I should see "Sam1 Student1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all user overrides | 1 | And I press "Reset course" @@ -87,7 +88,8 @@ Feature: Quiz reset | Attempts allowed | 2 | And I press "Save" And I should see "Group 1" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration And I set the following fields to these values: | Delete all group overrides | 1 | And I press "Reset course" diff --git a/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature b/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature index fb2bef9c418..05b906c7c90 100644 --- a/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature +++ b/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature @@ -39,7 +39,8 @@ Feature: Teachers can reset wiki pages, tags and files And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager And I press "Save changes" And I should see "empty.txt" - And I navigate to "Reset" node in "Course administration" + And I am on "Course 1" course homepage + And I navigate to "Reset" in current page administration Scenario: Reset page, tags and files And I set the following fields to these values: diff --git a/my/tests/behat/reset_all_pages.feature b/my/tests/behat/reset_all_pages.feature index d995f51aad9..c762b73957b 100644 --- a/my/tests/behat/reset_all_pages.feature +++ b/my/tests/behat/reset_all_pages.feature @@ -42,7 +42,7 @@ Feature: Reset all personalised pages to default Scenario: Reset Dashboard for all users Given I log in as "admin" - And I navigate to "Default Dashboard page" node in "Site administration > Appearance" + And I navigate to "Appearance > Default Dashboard page" in site administration And I press "Blocks editing on" And I add the "Latest announcements" block And I open the "Online users" blocks action menu @@ -64,7 +64,7 @@ Feature: Reset all personalised pages to default And I log out And I log in as "admin" - And I navigate to "Default Dashboard page" node in "Site administration > Appearance" + And I navigate to "Appearance > Default Dashboard page" in site administration When I press "Reset Dashboard for all users" And I should see "All Dashboard pages have been reset to default." And I log out @@ -90,7 +90,7 @@ Feature: Reset all personalised pages to default Scenario: Reset profile for all users Given I log in as "admin" - And I navigate to "Default profile page" node in "Site administration > Appearance" + And I navigate to "Appearance > Default profile page" in site administration And I press "Blocks editing on" And I add the "Latest announcements" block And I log out @@ -106,7 +106,7 @@ Feature: Reset all personalised pages to default And I log out And I log in as "admin" - And I navigate to "Default profile page" node in "Site administration > Appearance" + And I navigate to "Appearance > Default profile page" in site administration When I press "Reset profile for all users" And I should see "All profile pages have been reset to default." And I log out diff --git a/question/format/gift/tests/behat/import_export.feature b/question/format/gift/tests/behat/import_export.feature index b8469431b2f..4bf2c6a8401 100644 --- a/question/format/gift/tests/behat/import_export.feature +++ b/question/format/gift/tests/behat/import_export.feature @@ -19,7 +19,7 @@ Feature: Test importing questions from GIFT format. @javascript @_file_upload Scenario: import some GIFT questions - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_gift" to "1" And I upload "question/format/gift/tests/fixtures/questions.gift.txt" file to "Import" filemanager And I press "id_submitbutton" @@ -30,7 +30,7 @@ Feature: Test importing questions from GIFT format. Then I should see "colours" # Now export again. - And I navigate to "Export" node in "Course administration > Question bank" + And I follow "Export" And I set the field "id_format_gift" to "1" And I press "Export questions to file" And following "click here" should download between "1550" and "1650" bytes diff --git a/question/format/webct/tests/behat/import.feature b/question/format/webct/tests/behat/import.feature index 10f900de9a8..1dc5157856b 100644 --- a/question/format/webct/tests/behat/import.feature +++ b/question/format/webct/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing questions from WebCT format. @javascript @_file_upload Scenario: import some WebCT questions - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_webct" to "1" And I upload "question/format/webct/tests/fixtures/sample_webct.txt" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/format/webct/tests/behat/importcalculated.feature b/question/format/webct/tests/behat/importcalculated.feature index 8c6c8b131ef..33e1b9d4ac0 100644 --- a/question/format/webct/tests/behat/importcalculated.feature +++ b/question/format/webct/tests/behat/importcalculated.feature @@ -19,7 +19,7 @@ Feature: Test importing calculated question from WebCT format. @javascript @_file_upload Scenario: import a WebCT calculated question - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_webct" to "1" And I upload "question/format/webct/tests/fixtures/sample_calculated_webct.txt" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/format/xml/tests/behat/import_export.feature b/question/format/xml/tests/behat/import_export.feature index eed354c41d0..ba736920826 100644 --- a/question/format/xml/tests/behat/import_export.feature +++ b/question/format/xml/tests/behat/import_export.feature @@ -19,7 +19,7 @@ Feature: Test importing questions from Moodle XML format. @javascript @_file_upload Scenario: import some true/false questions from Moodle XML format - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager And I press "id_submitbutton" @@ -32,7 +32,7 @@ Feature: Test importing questions from Moodle XML format. Then I should see "Moodle acronym (True)" # Now export again. - And I navigate to "Export" node in "Course administration > Question bank" + And I follow "Export" 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" @@ -40,7 +40,7 @@ Feature: Test importing questions from Moodle XML format. @javascript @_file_upload Scenario: import some multiple choice questions from Moodle XML format - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager And I press "id_submitbutton" @@ -52,7 +52,7 @@ Feature: Test importing questions from Moodle XML format. @javascript @_file_upload Scenario: import some multi-answer questions from Moodle XML format - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager And I press "id_submitbutton" @@ -64,7 +64,7 @@ Feature: Test importing questions from Moodle XML format. @javascript @_file_upload Scenario: import some questions with legacy-style images from Moodle XML format - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/tests/behat/copy_questions.feature b/question/tests/behat/copy_questions.feature index e0f344d80fb..7ae37082c6b 100644 --- a/question/tests/behat/copy_questions.feature +++ b/question/tests/behat/copy_questions.feature @@ -22,7 +22,7 @@ Feature: A teacher can duplicate questions in the question bank | Test questions | essay | Test question to be copied | Write about whatever you want | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration @javascript Scenario: Duplicating a previously created question diff --git a/question/tests/behat/delete_questions.feature b/question/tests/behat/delete_questions.feature index c9d0bb24263..c8d3b5f7204 100644 --- a/question/tests/behat/delete_questions.feature +++ b/question/tests/behat/delete_questions.feature @@ -22,7 +22,7 @@ Feature: A teacher can delete questions in the question bank | Test questions | essay | Test question to be deleted | Write about whatever you want | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration @javascript Scenario: A question not used anywhere can really be deleted @@ -45,7 +45,8 @@ Feature: A teacher can delete questions in the question bank And I add a "True/False" question to the "Test quiz" quiz with: | Question name | Test used question to be deleted | | Question text | Write about whatever you want | - And I navigate to "Questions" node in "Course administration > Question bank" + And I am on "Course 1" course homepage + And I navigate to "Question bank > Questions" in current page administration When I click on "Delete" "link" in the "Test used question to be deleted" "table_row" And I press "Delete" Then I should not see "Test used question to be deleted" diff --git a/question/tests/behat/edit_questions.feature b/question/tests/behat/edit_questions.feature index b71221f5fc1..6adc676255b 100644 --- a/question/tests/behat/edit_questions.feature +++ b/question/tests/behat/edit_questions.feature @@ -22,7 +22,7 @@ Feature: A teacher can edit questions in the question bank | Test questions | essay | Test question to be edited | Write about whatever you want | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration @javascript Scenario: Edit a previously created question diff --git a/question/tests/behat/edit_questions_standard_tags.feature b/question/tests/behat/edit_questions_standard_tags.feature index beccac14081..d231c5f115b 100644 --- a/question/tests/behat/edit_questions_standard_tags.feature +++ b/question/tests/behat/edit_questions_standard_tags.feature @@ -22,7 +22,7 @@ Feature: The questions can be tagged Scenario: The tags autocomplete should include standard tags When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration And I press "Create a new question ..." And I set the field "item_qtype_truefalse" to "1" And I press "Add" diff --git a/question/tests/behat/filter_questions_by_tag.feature b/question/tests/behat/filter_questions_by_tag.feature index 8ea06824d81..4f0be1fb97b 100644 --- a/question/tests/behat/filter_questions_by_tag.feature +++ b/question/tests/behat/filter_questions_by_tag.feature @@ -23,7 +23,7 @@ Feature: The questions in the question bank can be filtered by tags | Test questions | essay | question 2 name | teacher1 | Question 2 text | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration And I click on "Edit" "link" in the "question 1 name" "table_row" And I set the following fields to these values: | Tags | foo | diff --git a/question/tests/behat/move_question_categories.feature b/question/tests/behat/move_question_categories.feature index b48db72657c..14fcd4d6dea 100644 --- a/question/tests/behat/move_question_categories.feature +++ b/question/tests/behat/move_question_categories.feature @@ -22,7 +22,7 @@ Feature: A teacher can move question categories in the question bank Scenario: A question category can be moved to another context When I follow "Test quiz" - And I navigate to "Categories" node in "Quiz administration > Question bank" + And I navigate to "Quiz administration > Question bank > Categories" in current page administration And I set the following fields to these values: | Name | Test category | | Parent category | Top for Test quiz | @@ -32,7 +32,7 @@ Feature: A teacher can move question categories in the question bank Scenario: A question category can be moved to top level When I follow "Test quiz" - And I navigate to "Categories" node in "Quiz administration > Question bank" + And I navigate to "Quiz administration > Question bank > Categories" in current page administration And I set the following fields to these values: | Name | Test category | | Parent category | Default for Test quiz | diff --git a/question/tests/behat/preview_question.feature b/question/tests/behat/preview_question.feature index b772b633746..91d2c231672 100644 --- a/question/tests/behat/preview_question.feature +++ b/question/tests/behat/preview_question.feature @@ -22,7 +22,7 @@ Feature: A teacher can preview questions in the question bank | Test questions | numerical | Test question to be previewed | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration When I click on "Preview" "link" in the "Test question to be previewed" "table_row" And I switch to "questionpreview" window diff --git a/question/tests/behat/question_categories.feature b/question/tests/behat/question_categories.feature index 8d66a27e414..772c66e02a4 100644 --- a/question/tests/behat/question_categories.feature +++ b/question/tests/behat/question_categories.feature @@ -27,7 +27,7 @@ Feature: A teacher can put questions in categories in the question bank And I am on "Course 1" course homepage Scenario: A new question category can be created - When I navigate to "Categories" node in "Course administration > Question bank" + When I navigate to "Question bank > Categories" in current page administration And I set the following fields to these values: | Name | New Category 1 | | Parent category | Top | @@ -37,7 +37,7 @@ Feature: A teacher can put questions in categories in the question bank And I should see "Created as a test" in the "New Category 1" "list_item" Scenario: A question category can be edited - When I navigate to "Categories" node in "Course administration > Question bank" + When I navigate to "Question bank > Categories" in current page administration And I click on "Edit" "link" in the "Subcategory" "list_item" And the field "parent" matches value "   Default for C1" And I set the following fields to these values: @@ -48,12 +48,12 @@ Feature: A teacher can put questions in categories in the question bank And I should see "I was edited" in the "New name" "list_item" Scenario: An empty question category can be deleted - When I navigate to "Categories" node in "Course administration > Question bank" + When I navigate to "Question bank > Categories" in current page administration And I click on "Delete" "link" in the "Subcategory" "list_item" Then I should not see "Subcategory" Scenario: An non-empty question category can be deleted if you move the contents elsewhere - When I navigate to "Categories" node in "Course administration > Question bank" + When I navigate to "Question bank > Categories" in current page administration And I click on "Delete" "link" in the "Used category" "list_item" And I should see "The category 'Used category' contains 1 questions" And I press "Save in category" @@ -62,7 +62,7 @@ Feature: A teacher can put questions in categories in the question bank @javascript Scenario: Move a question between categories via the question page - When I navigate to "Questions" node in "Course administration > Question bank" + When I navigate to "Question bank > Questions" in current page administration And I set the field "Select a category" to "Used category" And I click on "Test question to be moved" "checkbox" in the "Test question to be moved" "table_row" And I set the field "Question category" to "Subcategory" @@ -74,7 +74,7 @@ Feature: A teacher can put questions in categories in the question bank @javascript Scenario: Move a question between categories via the question settings page - When I navigate to "Questions" node in "Course administration > Question bank" + When I navigate to "Question bank > Questions" in current page administration And I set the field "Select a category" to "Used category" And I click on "Edit" "link" in the "Test question to be moved" "table_row" And I click on "Use this category" "checkbox" diff --git a/question/tests/behat/sort_questions.feature b/question/tests/behat/sort_questions.feature index c3cc42c7ddc..92ba9b531a6 100644 --- a/question/tests/behat/sort_questions.feature +++ b/question/tests/behat/sort_questions.feature @@ -24,7 +24,7 @@ Feature: The questions in the question bank can be sorted in various ways | Test questions | numerical | C question 3 name | teacher1 | Question 3 text | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Questions" node in "Course administration > Question bank" + And I navigate to "Question bank > Questions" in current page administration @javascript Scenario: The questions are sorted by type by default diff --git a/question/type/ddimageortext/tests/behat/add.feature b/question/type/ddimageortext/tests/behat/add.feature index df92932c0cd..44972d4009a 100644 --- a/question/type/ddimageortext/tests/behat/add.feature +++ b/question/type/ddimageortext/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a drag and drop onto image question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_file_upload Scenario: Create a drag and drop onto image question diff --git a/question/type/ddimageortext/tests/behat/backup_and_restore.feature b/question/type/ddimageortext/tests/behat/backup_and_restore.feature index 5c4633ad925..b81f46c1a15 100644 --- a/question/type/ddimageortext/tests/behat/backup_and_restore.feature +++ b/question/type/ddimageortext/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a drag and drop onto image question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "Drag onto image" "table_row" Then the following fields match these values: | Question name | Drag onto image | diff --git a/question/type/ddimageortext/tests/behat/edit.feature b/question/type/ddimageortext/tests/behat/edit.feature index 2e535bfed94..19c87f9d59a 100644 --- a/question/type/ddimageortext/tests/behat/edit.feature +++ b/question/type/ddimageortext/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a drag and drop onto image questions | Test questions | ddimageortext | Drag onto image | xsection | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript Scenario: Edit a drag and drop onto image question diff --git a/question/type/ddimageortext/tests/behat/export.feature b/question/type/ddimageortext/tests/behat/export.feature index 66791de941a..d74b4da00eb 100644 --- a/question/type/ddimageortext/tests/behat/export.feature +++ b/question/type/ddimageortext/tests/behat/export.feature @@ -26,7 +26,7 @@ Feature: Test exporting drag and drop onto image questions @javascript Scenario: Export a drag and drop onto image question # Import sample file. - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" And following "click here" should download between "18500" and "19000" bytes diff --git a/question/type/ddimageortext/tests/behat/import.feature b/question/type/ddimageortext/tests/behat/import.feature index ec8e7654e71..65c64db824f 100644 --- a/question/type/ddimageortext/tests/behat/import.feature +++ b/question/type/ddimageortext/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing drag and drop onto image questions @javascript @_file_upload Scenario: import drag and drop onto image question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/ddimageortext/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/ddimageortext/tests/behat/preview.feature b/question/type/ddimageortext/tests/behat/preview.feature index 764277067d9..b1d78728e05 100644 --- a/question/type/ddimageortext/tests/behat/preview.feature +++ b/question/type/ddimageortext/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a drag-drop onto image question | Test questions | ddimageortext | Drag onto image | xsection | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_bug_phantomjs Scenario: Preview a question using the mouse. diff --git a/question/type/ddmarker/tests/behat/add.feature b/question/type/ddmarker/tests/behat/add.feature index f11c6270dcb..6a271c85b9b 100644 --- a/question/type/ddmarker/tests/behat/add.feature +++ b/question/type/ddmarker/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a drag and drop markers question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_file_upload Scenario: Create a drag and drop markers question diff --git a/question/type/ddmarker/tests/behat/backup_and_restore.feature b/question/type/ddmarker/tests/behat/backup_and_restore.feature index f9648c54742..ec744984405 100644 --- a/question/type/ddmarker/tests/behat/backup_and_restore.feature +++ b/question/type/ddmarker/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a drag and drop markers question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "Drag markers" "table_row" Then the following fields match these values: | Question name | Drag markers | diff --git a/question/type/ddmarker/tests/behat/edit.feature b/question/type/ddmarker/tests/behat/edit.feature index b6a7db20a0d..c3d761f71fc 100644 --- a/question/type/ddmarker/tests/behat/edit.feature +++ b/question/type/ddmarker/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a drag and drop markers questions | Test questions | ddmarker | Drag markers | mkmap | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript Scenario: Edit a drag and drop markers question diff --git a/question/type/ddmarker/tests/behat/export.feature b/question/type/ddmarker/tests/behat/export.feature index 6492c3177a6..548c86c6ce4 100644 --- a/question/type/ddmarker/tests/behat/export.feature +++ b/question/type/ddmarker/tests/behat/export.feature @@ -26,7 +26,7 @@ Feature: Test exporting drag and drop markers questions @javascript Scenario: Export a drag and drop markers question # Import sample file. - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" And following "click here" should download between "233600" and "233800" bytes diff --git a/question/type/ddmarker/tests/behat/import.feature b/question/type/ddmarker/tests/behat/import.feature index 8da2e6e3c00..38ddf880fa4 100644 --- a/question/type/ddmarker/tests/behat/import.feature +++ b/question/type/ddmarker/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing drag and drop markers questions @javascript @_file_upload Scenario: import drag and drop markers question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/ddmarker/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/ddmarker/tests/behat/preview.feature b/question/type/ddmarker/tests/behat/preview.feature index e5ff6cb785e..9e96678671e 100644 --- a/question/type/ddmarker/tests/behat/preview.feature +++ b/question/type/ddmarker/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a drag-drop marker question | Test questions | ddmarker | Drag markers | mkmap | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_bug_phantomjs Scenario: Preview a question using the mouse. diff --git a/question/type/ddwtos/tests/behat/add.feature b/question/type/ddwtos/tests/behat/add.feature index dc619d3fe8f..46a92386db4 100644 --- a/question/type/ddwtos/tests/behat/add.feature +++ b/question/type/ddwtos/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a drag and drop into text question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript Scenario: Create a drag and drop into text question diff --git a/question/type/ddwtos/tests/behat/backup_and_restore.feature b/question/type/ddwtos/tests/behat/backup_and_restore.feature index 0234bd9821e..c3d5731245a 100644 --- a/question/type/ddwtos/tests/behat/backup_and_restore.feature +++ b/question/type/ddwtos/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a drag and drop into text question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "Drag to text" "table_row" Then the following fields match these values: | Question name | Drag to text | diff --git a/question/type/ddwtos/tests/behat/edit.feature b/question/type/ddwtos/tests/behat/edit.feature index 6e66eacc79d..b0557e96a70 100644 --- a/question/type/ddwtos/tests/behat/edit.feature +++ b/question/type/ddwtos/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a drag and drop into text questions | Test questions | ddwtos | Drag to text | fox | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript Scenario: Edit a drag and drop into text question diff --git a/question/type/ddwtos/tests/behat/export.feature b/question/type/ddwtos/tests/behat/export.feature index c43122e786a..9bfd1e6ba81 100644 --- a/question/type/ddwtos/tests/behat/export.feature +++ b/question/type/ddwtos/tests/behat/export.feature @@ -26,7 +26,7 @@ Feature: Test exporting drag and drop into text questions @javascript Scenario: Export a drag and drop into text question # Import sample file. - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" And following "click here" should download between "1450" and "1550" bytes diff --git a/question/type/ddwtos/tests/behat/import.feature b/question/type/ddwtos/tests/behat/import.feature index 943de30a885..9785350456d 100644 --- a/question/type/ddwtos/tests/behat/import.feature +++ b/question/type/ddwtos/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing drag and drop into text questions @javascript @_file_upload Scenario: import drag and drop into text question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/ddwtos/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/ddwtos/tests/behat/preview.feature b/question/type/ddwtos/tests/behat/preview.feature index 60deb7559df..46652534a87 100644 --- a/question/type/ddwtos/tests/behat/preview.feature +++ b/question/type/ddwtos/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a drag-drop into text question | Test questions | ddwtos | Drag to text | fox | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_bug_phantomjs Scenario: Preview a question using the mouse. diff --git a/question/type/description/tests/behat/add.feature b/question/type/description/tests/behat/add.feature index 7af1895baf7..bc5538f4ecb 100644 --- a/question/type/description/tests/behat/add.feature +++ b/question/type/description/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a Description question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create a Description question with Correct answer as False When I add a "Description" question filling the form with: diff --git a/question/type/description/tests/behat/backup_and_restore.feature b/question/type/description/tests/behat/backup_and_restore.feature index d6ce6e80165..633703a861b 100644 --- a/question/type/description/tests/behat/backup_and_restore.feature +++ b/question/type/description/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a Description question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "description-001" "table_row" Then the following fields match these values: | Question name | description-001 | diff --git a/question/type/description/tests/behat/edit.feature b/question/type/description/tests/behat/edit.feature index 7803872694d..67b225615e7 100644 --- a/question/type/description/tests/behat/edit.feature +++ b/question/type/description/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a Description question | Test questions | description | description-001 | info | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Edit a Description question When I click on "Edit" "link" in the "description-001" "table_row" diff --git a/question/type/description/tests/behat/export.feature b/question/type/description/tests/behat/export.feature index 4a2761acc73..02551eae273 100644 --- a/question/type/description/tests/behat/export.feature +++ b/question/type/description/tests/behat/export.feature @@ -24,7 +24,7 @@ Feature: Test exporting Description questions And I am on "Course 1" course homepage Scenario: Export a Description question - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "650" and "750" bytes diff --git a/question/type/description/tests/behat/import.feature b/question/type/description/tests/behat/import.feature index 9f1be1f4602..53bdb1964ea 100644 --- a/question/type/description/tests/behat/import.feature +++ b/question/type/description/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing Description questions @javascript @_file_upload Scenario: import a Description question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/description/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/description/tests/behat/preview.feature b/question/type/description/tests/behat/preview.feature index 474b785f127..f65eebda0d9 100644 --- a/question/type/description/tests/behat/preview.feature +++ b/question/type/description/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a Description question | Test questions | description | description-001 | info | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview a Description question and submit a correct response. diff --git a/question/type/essay/tests/behat/add.feature b/question/type/essay/tests/behat/add.feature index a4936bf23c7..a0b57e21eaa 100644 --- a/question/type/essay/tests/behat/add.feature +++ b/question/type/essay/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating an Essay question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create an Essay question with Response format set to 'HTML editor' When I add a "Essay" question filling the form with: diff --git a/question/type/essay/tests/behat/backup_and_restore.feature b/question/type/essay/tests/behat/backup_and_restore.feature index a29a5f88bec..609da1c4ba1 100644 --- a/question/type/essay/tests/behat/backup_and_restore.feature +++ b/question/type/essay/tests/behat/backup_and_restore.feature @@ -32,7 +32,7 @@ Feature: Test duplicating a quiz containing an Assay question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I should see "essay-001" And I should see "essay-002" And I should see "essay-003" diff --git a/question/type/essay/tests/behat/edit.feature b/question/type/essay/tests/behat/edit.feature index 52b022237a0..0657b0bc541 100644 --- a/question/type/essay/tests/behat/edit.feature +++ b/question/type/essay/tests/behat/edit.feature @@ -24,7 +24,7 @@ Feature: Test editing an Essay question | Test questions | essay | essay-003 | plain | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Edit an Essay question When I click on "Edit" "link" in the "essay-001" "table_row" diff --git a/question/type/essay/tests/behat/export.feature b/question/type/essay/tests/behat/export.feature index 09429d9b52c..7052f6d8d96 100644 --- a/question/type/essay/tests/behat/export.feature +++ b/question/type/essay/tests/behat/export.feature @@ -26,7 +26,7 @@ Feature: Test exporting Essay questions And I am on "Course 1" course homepage Scenario: Export 3 Essay questions - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "2600" and "2700" bytes diff --git a/question/type/essay/tests/behat/import.feature b/question/type/essay/tests/behat/import.feature index 7037dea7d3d..195b78cb244 100644 --- a/question/type/essay/tests/behat/import.feature +++ b/question/type/essay/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing Essay questions @javascript @_file_upload Scenario: import Essay question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/essay/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/essay/tests/behat/preview.feature b/question/type/essay/tests/behat/preview.feature index 7eafce8797b..0aad34244a6 100644 --- a/question/type/essay/tests/behat/preview.feature +++ b/question/type/essay/tests/behat/preview.feature @@ -24,7 +24,7 @@ Feature: Preview Essay questions | Test questions | essay | essay-003 | plain | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview an Essay question and submit a partially correct response. diff --git a/question/type/gapselect/tests/behat/basic_test.feature b/question/type/gapselect/tests/behat/basic_test.feature index bb23c93092b..d7f9a331ad3 100644 --- a/question/type/gapselect/tests/behat/basic_test.feature +++ b/question/type/gapselect/tests/behat/basic_test.feature @@ -18,7 +18,7 @@ Feature: Test all the basic functionality of this question type Scenario: Create, edit then preview a gapselect question. Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration # Create a new question. And I add a "Select missing words" question filling the form with: @@ -129,7 +129,7 @@ Feature: Test all the basic functionality of this question type When I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | Then I should see "Course 2" - When I navigate to "Question bank" node in "Course administration" + When I navigate to "Question bank" in current page administration Then I should see "Select missing words 001" # Edit the copy and verify the form field contents. diff --git a/question/type/gapselect/tests/behat/import_test.feature b/question/type/gapselect/tests/behat/import_test.feature index 18321df6e12..24fa8a859ef 100644 --- a/question/type/gapselect/tests/behat/import_test.feature +++ b/question/type/gapselect/tests/behat/import_test.feature @@ -20,7 +20,7 @@ Feature: Import and export select missing words questions @javascript @_file_upload Scenario: Import and export select missing words questions # Import sample file. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/gapselect/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" @@ -31,7 +31,7 @@ Feature: Import and export select missing words questions And I should see "Imported Select missing words 001" # Now export again. - When I navigate to "Export" node in "Course administration > Question bank" + When I follow "Export" And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "1550" and "1650" bytes diff --git a/question/type/match/tests/behat/add.feature b/question/type/match/tests/behat/add.feature index b12adfbeee2..9e7a9f690d8 100644 --- a/question/type/match/tests/behat/add.feature +++ b/question/type/match/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a Matching question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create a Matching question with 3 subquestions When I add a "Matching" question filling the form with: diff --git a/question/type/match/tests/behat/backup_and_restore.feature b/question/type/match/tests/behat/backup_and_restore.feature index 59bfa025836..05b3ebd140f 100644 --- a/question/type/match/tests/behat/backup_and_restore.feature +++ b/question/type/match/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a Matching question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "matching-001" "table_row" Then the following fields match these values: | Question name | matching-001 | diff --git a/question/type/match/tests/behat/edit.feature b/question/type/match/tests/behat/edit.feature index d42c2b7e237..480b0eac295 100644 --- a/question/type/match/tests/behat/edit.feature +++ b/question/type/match/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a Matching question | Test questions | match | Matching for editing | foursubq | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Edit a Matching question diff --git a/question/type/match/tests/behat/export.feature b/question/type/match/tests/behat/export.feature index 8901f8790ae..fa68275dca8 100644 --- a/question/type/match/tests/behat/export.feature +++ b/question/type/match/tests/behat/export.feature @@ -24,7 +24,7 @@ Feature: Test exporting Matching questions And I am on "Course 1" course homepage Scenario: Export a Matching question - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "1500" and "1600" bytes diff --git a/question/type/match/tests/behat/import.feature b/question/type/match/tests/behat/import.feature index 9db62f1ffb7..99308528b2e 100644 --- a/question/type/match/tests/behat/import.feature +++ b/question/type/match/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing Matching questions @javascript @_file_upload Scenario: import Matching question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/match/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/match/tests/behat/preview.feature b/question/type/match/tests/behat/preview.feature index 7ff32c5c3fc..6683a9f17f4 100644 --- a/question/type/match/tests/behat/preview.feature +++ b/question/type/match/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a Matching question | Test questions | match | matching-001 | foursubq | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview a Matching question and submit a correct response. diff --git a/question/type/multichoice/tests/behat/add.feature b/question/type/multichoice/tests/behat/add.feature index 3948b26f5f3..6aa59eeaa51 100644 --- a/question/type/multichoice/tests/behat/add.feature +++ b/question/type/multichoice/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a Multiple choice question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create a Multiple choice question with multiple response When I add a "Multiple choice" question filling the form with: diff --git a/question/type/multichoice/tests/behat/backup_and_restore.feature b/question/type/multichoice/tests/behat/backup_and_restore.feature index d88d51a2dbd..62112bcf6d1 100644 --- a/question/type/multichoice/tests/behat/backup_and_restore.feature +++ b/question/type/multichoice/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a Multiple choice question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "Multi-choice-001" "table_row" Then the following fields match these values: | Question name | Multi-choice-001 | diff --git a/question/type/multichoice/tests/behat/edit.feature b/question/type/multichoice/tests/behat/edit.feature index 691f374318a..5cb83b1528c 100644 --- a/question/type/multichoice/tests/behat/edit.feature +++ b/question/type/multichoice/tests/behat/edit.feature @@ -23,7 +23,7 @@ Feature: Test editing a Multiple choice question | Test questions | multichoice | Single choice for editing | one_of_four | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Edit a Multiple choice question with multiple response (checkboxes) When I click on "Edit" "link" in the "Multiple choice for editing" "table_row" diff --git a/question/type/multichoice/tests/behat/export.feature b/question/type/multichoice/tests/behat/export.feature index d2715f39869..8112da86b03 100644 --- a/question/type/multichoice/tests/behat/export.feature +++ b/question/type/multichoice/tests/behat/export.feature @@ -25,7 +25,7 @@ Feature: Test exporting Multiple choice questions And I am on "Course 1" course homepage Scenario: Export a Multiple choice question - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "3700" and "3800" bytes diff --git a/question/type/multichoice/tests/behat/import.feature b/question/type/multichoice/tests/behat/import.feature index f39f5821016..53744321b2e 100644 --- a/question/type/multichoice/tests/behat/import.feature +++ b/question/type/multichoice/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing Multiple choice questions @javascript @_file_upload Scenario: import Multiple choice question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/multichoice/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/multichoice/tests/behat/preview.feature b/question/type/multichoice/tests/behat/preview.feature index 22f2e3f966b..ed50c9f05e5 100644 --- a/question/type/multichoice/tests/behat/preview.feature +++ b/question/type/multichoice/tests/behat/preview.feature @@ -23,7 +23,7 @@ Feature: Preview a Multiple choice question | Test questions | multichoice | Multi-choice-002 | one_of_four | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview a Multiple choice question and submit a partially correct response. diff --git a/question/type/shortanswer/tests/behat/add.feature b/question/type/shortanswer/tests/behat/add.feature index c8ab2876e8c..a84b3aab4e7 100644 --- a/question/type/shortanswer/tests/behat/add.feature +++ b/question/type/shortanswer/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a Short answer question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create a Short answer question When I add a "Short answer" question filling the form with: diff --git a/question/type/shortanswer/tests/behat/backup_and_restore.feature b/question/type/shortanswer/tests/behat/backup_and_restore.feature index afb47a18694..5903e95e271 100644 --- a/question/type/shortanswer/tests/behat/backup_and_restore.feature +++ b/question/type/shortanswer/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a Short answer question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "shortanswer-001" "table_row" Then the following fields match these values: | Question name | shortanswer-001 | diff --git a/question/type/shortanswer/tests/behat/edit.feature b/question/type/shortanswer/tests/behat/edit.feature index 0587a69fd73..72741701ea6 100644 --- a/question/type/shortanswer/tests/behat/edit.feature +++ b/question/type/shortanswer/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a Short answer question | Test questions | shortanswer | shortanswer-001 for editing | frogtoad | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Edit a Short answer question diff --git a/question/type/shortanswer/tests/behat/export.feature b/question/type/shortanswer/tests/behat/export.feature index 998cb72d0a4..d5a0e6ee33e 100644 --- a/question/type/shortanswer/tests/behat/export.feature +++ b/question/type/shortanswer/tests/behat/export.feature @@ -24,7 +24,7 @@ Feature: Test exporting Short answer questions And I am on "Course 1" course homepage Scenario: Export a Short answer question - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "1200" and "1300" bytes diff --git a/question/type/shortanswer/tests/behat/import.feature b/question/type/shortanswer/tests/behat/import.feature index ded5ebca69d..48908094429 100644 --- a/question/type/shortanswer/tests/behat/import.feature +++ b/question/type/shortanswer/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing Short answer questions @javascript @_file_upload Scenario: import Matching question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/shortanswer/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/shortanswer/tests/behat/preview.feature b/question/type/shortanswer/tests/behat/preview.feature index 7bb8a8d6d08..e1613b97bb8 100644 --- a/question/type/shortanswer/tests/behat/preview.feature +++ b/question/type/shortanswer/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a Short answer question | Test questions | shortanswer | shortanswer-001 | frogtoad | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview a Short answer question with correct answer diff --git a/question/type/truefalse/tests/behat/add.feature b/question/type/truefalse/tests/behat/add.feature index 4155d280b62..345422ffc17 100644 --- a/question/type/truefalse/tests/behat/add.feature +++ b/question/type/truefalse/tests/behat/add.feature @@ -16,7 +16,7 @@ Feature: Test creating a True/False question | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Create a True/False question with Correct answer as False When I add a "True/False" question filling the form with: diff --git a/question/type/truefalse/tests/behat/backup_and_restore.feature b/question/type/truefalse/tests/behat/backup_and_restore.feature index 32daf26ec19..32e6544077b 100644 --- a/question/type/truefalse/tests/behat/backup_and_restore.feature +++ b/question/type/truefalse/tests/behat/backup_and_restore.feature @@ -28,7 +28,7 @@ Feature: Test duplicating a quiz containing a True/False question | Confirmation | Filename | test_backup.mbz | And I restore "test_backup.mbz" backup into a new course using this options: | Schema | Course name | Course 2 | - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration And I click on "Edit" "link" in the "true-false-001" "table_row" Then the following fields match these values: | Question name | true-false-001 | diff --git a/question/type/truefalse/tests/behat/edit.feature b/question/type/truefalse/tests/behat/edit.feature index 2a18f840d64..059f7e5f7e4 100644 --- a/question/type/truefalse/tests/behat/edit.feature +++ b/question/type/truefalse/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a True/False question | Test questions | truefalse | true-false-001 | true | And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration Scenario: Edit a True/False question When I click on "Edit" "link" in the "true-false-001" "table_row" diff --git a/question/type/truefalse/tests/behat/export.feature b/question/type/truefalse/tests/behat/export.feature index 481ae36fd0a..1cd1ccd3d26 100644 --- a/question/type/truefalse/tests/behat/export.feature +++ b/question/type/truefalse/tests/behat/export.feature @@ -24,7 +24,7 @@ Feature: Test exporting True/False questions And I am on "Course 1" course homepage Scenario: Export a True/False question - When I navigate to "Export" node in "Course administration > Question bank" + When I navigate to "Question bank > Export" in current page administration And I set the field "id_format_xml" to "1" And I press "Export questions to file" Then following "click here" should download between "950" and "1050" bytes diff --git a/question/type/truefalse/tests/behat/import.feature b/question/type/truefalse/tests/behat/import.feature index 4230bd2e18a..7a3bd4c1174 100644 --- a/question/type/truefalse/tests/behat/import.feature +++ b/question/type/truefalse/tests/behat/import.feature @@ -19,7 +19,7 @@ Feature: Test importing True/False questions @javascript @_file_upload Scenario: import a True/False question. - When I navigate to "Import" node in "Course administration > Question bank" + When I navigate to "Question bank > Import" in current page administration And I set the field "id_format_xml" to "1" And I upload "question/type/truefalse/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager And I press "id_submitbutton" diff --git a/question/type/truefalse/tests/behat/preview.feature b/question/type/truefalse/tests/behat/preview.feature index 920c5c0c1a1..e85ef1b48bf 100644 --- a/question/type/truefalse/tests/behat/preview.feature +++ b/question/type/truefalse/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a Trtue/False question | Test questions | truefalse | true-false-001 | true | Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Question bank" node in "Course administration" + And I navigate to "Question bank" in current page administration @javascript @_switch_window Scenario: Preview a True/False question and submit a correct response. diff --git a/report/eventlist/tests/behat/mainsection.feature b/report/eventlist/tests/behat/mainsection.feature index 6518ce35271..a52499a1e47 100644 --- a/report/eventlist/tests/behat/mainsection.feature +++ b/report/eventlist/tests/behat/mainsection.feature @@ -7,7 +7,7 @@ Feature: Page contains a list of events @javascript Scenario: Event list page is viewable and filtering works Given I log in as "admin" - And I navigate to "Events list" node in "Site administration > Reports" + And I navigate to "Reports > Events list" in site administration And I should see "Event name" And I set the field "eventname" to "phase" And I press "filterbutton" @@ -52,7 +52,7 @@ Feature: Page contains a list of events @javascript Scenario: Details of an event are viewable Given I log in as "admin" - And I navigate to "Events list" node in "Site administration > Reports" + And I navigate to "Reports > Events list" in site administration And I should see "Event name" And I follow "Blog association created" And I should see "Blog association created" diff --git a/report/log/tests/behat/filter_log.feature b/report/log/tests/behat/filter_log.feature index 6309bbb8258..9f2174d652d 100644 --- a/report/log/tests/behat/filter_log.feature +++ b/report/log/tests/behat/filter_log.feature @@ -18,7 +18,7 @@ Feature: In a report, admin can filter log data And I log in as "admin" Scenario: Filter log report for standard and legacy log reader - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | @@ -30,7 +30,7 @@ Feature: In a report, admin can filter log data And I press "Continue" And I log out And I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "id" to "Acceptance test site (Site)" And I set the field "user" to "All participants" And I set the field "logreader" to "Standard log" @@ -49,14 +49,14 @@ Feature: In a report, admin can filter log data And I press "Continue" And I log out And I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "id" to "Acceptance test site (Site)" And I set the field "user" to "All participants" And I press "Get these logs" Then I should see "User logged in as another user" Scenario: Filter log report for legacy log reader - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" And the following config values are set as admin: @@ -71,7 +71,7 @@ Feature: In a report, admin can filter log data And I press "Continue" And I log out And I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "id" to "Acceptance test site (Site)" And I set the field "user" to "All participants" And I press "Get these logs" diff --git a/report/log/tests/behat/filter_log_actions.feature b/report/log/tests/behat/filter_log_actions.feature index 3d2769b811e..4e4d07d4435 100644 --- a/report/log/tests/behat/filter_log_actions.feature +++ b/report/log/tests/behat/filter_log_actions.feature @@ -27,7 +27,7 @@ Feature: In a report, admin can filter log data by action Scenario: View only create actions. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "Create" And I press "Get these logs" Then I should see "Course module created" @@ -37,7 +37,7 @@ Feature: In a report, admin can filter log data by action Scenario: View only update actions. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "Update" And I press "Get these logs" Then I should see "Course module updated" @@ -47,7 +47,7 @@ Feature: In a report, admin can filter log data by action Scenario: View only view actions. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "View" And I press "Get these logs" Then I should see "The status of the submission has been viewed." @@ -57,7 +57,7 @@ Feature: In a report, admin can filter log data by action Scenario: View only delete actions. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "Delete" And I press "Get these logs" Then I should see "Course module deleted" @@ -67,7 +67,7 @@ Feature: In a report, admin can filter log data by action Scenario: View only changes. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "All changes" And I press "Get these logs" Then I should see "Course module deleted" @@ -77,7 +77,7 @@ Feature: In a report, admin can filter log data by action Scenario: View all actions. Given I log in as "admin" - When I navigate to "Logs" node in "Site administration > Reports" + When I navigate to "Reports > Logs" in site administration And I set the field "menumodaction" to "All actions" And I press "Get these logs" Then I should see "Course module deleted" diff --git a/report/log/tests/behat/user_log.feature b/report/log/tests/behat/user_log.feature index e7afee2f7c5..b8726726f82 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -46,7 +46,7 @@ Feature: User can view activity log. Scenario: No log reader enabled should be visible when no log store enabled. Given I log in as "admin" - And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + And I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Disable" "link" in the "Standard log" "table_row" And I log out And I log in as "teacher1" diff --git a/report/loglive/tests/behat/loglive_report.feature b/report/loglive/tests/behat/loglive_report.feature index 913fa976d85..f0699e6d871 100644 --- a/report/loglive/tests/behat/loglive_report.feature +++ b/report/loglive/tests/behat/loglive_report.feature @@ -9,7 +9,7 @@ Feature: In a report, admin can see loglive data | fullname | shortname | category | groupmode | | Course 1 | C1 | 0 | 1 | And I log in as "admin" - And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + And I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | @@ -20,7 +20,7 @@ Feature: In a report, admin can see loglive data @javascript Scenario: Check loglive report entries and make sure the report works for standard and legacy reader - Given I navigate to "Live logs" node in "Site administration > Reports" + Given I navigate to "Reports > Live logs" in site administration When I set the field "reader" to "Standard log" Then I should see "Course module created" And I should see "Test name" @@ -32,7 +32,7 @@ Feature: In a report, admin can see loglive data @javascript @_switch_window Scenario: Check loglive report entries and make sure the pause/resume button works for standard reader along with ajax calls Given I am on site homepage - When I navigate to "Live logs" node in "Site administration > Reports" + When I navigate to "Reports > Live logs" in site administration And I set the field "reader" to "Standard log" And I wait to be redirected And I should not see "Test name2" @@ -54,7 +54,7 @@ Feature: In a report, admin can see loglive data @javascript @_switch_window Scenario: Check loglive report entries and make sure the pause/resume button works for legacy reader along with ajax calls Given I am on site homepage - When I navigate to "Live logs" node in "Site administration > Reports" + When I navigate to "Reports > Live logs" in site administration And I set the field "reader" to "Legacy log" And I wait to be redirected And I should not see "Test name2" diff --git a/report/outline/tests/behat/filter.feature b/report/outline/tests/behat/filter.feature index 7c974440d2d..b7606cfc949 100644 --- a/report/outline/tests/behat/filter.feature +++ b/report/outline/tests/behat/filter.feature @@ -30,7 +30,7 @@ Feature: Filter an outline report | ID number| BOOK01 | Scenario: Filter the outline report by start date - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And "Enable" "link" should exist in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And I log out @@ -49,7 +49,7 @@ Feature: Filter an outline report And I log out And I log in as "admin" And I am on "Course 1" course homepage - And I navigate to "Activity report" node in "Course administration > Reports" + And I navigate to "Reports > Activity report" in current page administration And I should see "2 views by 2 users" in the "Book name" "table_row" And I should see "1 views by 1 users" in the "Forum name" "table_row" When I set the following fields to these values: @@ -62,7 +62,7 @@ Feature: Filter an outline report And I should see "1 views by 1 users" in the "Forum name" "table_row" Scenario: Filter the outline report by end date - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And "Enable" "link" should exist in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And I log out @@ -81,7 +81,7 @@ Feature: Filter an outline report And I log out And I log in as "admin" And I am on "Course 1" course homepage - And I navigate to "Activity report" node in "Course administration > Reports" + And I navigate to "Reports > Activity report" in current page administration And I should see "2 views by 2 users" in the "Book name" "table_row" And I should see "1 views by 1 users" in the "Forum name" "table_row" When I set the following fields to these values: diff --git a/report/outline/tests/behat/outline.feature b/report/outline/tests/behat/outline.feature index bf53a725aab..99aeb57260d 100644 --- a/report/outline/tests/behat/outline.feature +++ b/report/outline/tests/behat/outline.feature @@ -28,7 +28,7 @@ Feature: View an outline report | Description | Book description | Scenario: View the outline report when only the legacy log reader is enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" And the following config values are set as admin: @@ -46,12 +46,12 @@ Feature: View an outline report And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - When I navigate to "Activity report" node in "Course administration > Reports" + When I navigate to "Reports > Activity report" in current page administration Then I should see "2 views by 2 users" in the "Book name" "table_row" And I should see "1 views by 1 users" in the "Forum name" "table_row" Scenario: View the outline report when only the standard log reader is enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And "Enable" "link" should exist in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And I log out @@ -67,12 +67,12 @@ Feature: View an outline report And I log out And I log in as "admin" And I am on "Course 1" course homepage - When I navigate to "Activity report" node in "Course administration > Reports" + When I navigate to "Reports > Activity report" in current page administration Then I should see "2 views by 2 users" in the "Book name" "table_row" And I should see "1 views by 1 users" in the "Forum name" "table_row" Scenario: View the outline report when both the standard and legacy log readers are enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And the following config values are set as admin: @@ -90,16 +90,16 @@ Feature: View an outline report And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - When I navigate to "Activity report" node in "Course administration > Reports" + When I navigate to "Reports > Activity report" in current page administration Then I should see "2 views by 2 users" in the "Book name" "table_row" And I should see "1 views by 1 users" in the "Forum name" "table_row" Scenario: View the outline report when no log reader is enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And "Enable" "link" should exist in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" And I am on "Course 1" course homepage - When I navigate to "Activity report" node in "Course administration > Reports" + When I navigate to "Reports > Activity report" in current page administration Then I should see "No log reader enabled" Scenario: Multiple views from a single user are identified as not distinct @@ -115,7 +115,7 @@ Feature: View an outline report And I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity report" node in "Course administration > Reports" + And I navigate to "Reports > Activity report" in current page administration Then I should see "3 views by 1 users" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" @@ -141,7 +141,7 @@ Feature: View an outline report And I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity report" node in "Course administration > Reports" + And I navigate to "Reports > Activity report" in current page administration Then I should see "6 views by 2 users" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" @@ -149,6 +149,6 @@ Feature: View an outline report Given I log out When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity report" node in "Course administration > Reports" + And I navigate to "Reports > Activity report" in current page administration Then I should see "-" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" diff --git a/report/outline/tests/behat/user.feature b/report/outline/tests/behat/user.feature index 4cbd2c3110b..fdc417a44fe 100644 --- a/report/outline/tests/behat/user.feature +++ b/report/outline/tests/behat/user.feature @@ -27,7 +27,7 @@ Feature: View the user page for the outline report | External URL | http://www.google.com | Scenario: View the user page when only the legacy log reader is enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" And the following config values are set as admin: @@ -57,7 +57,7 @@ Feature: View the user page for the outline report And I should see "3 views" Scenario: View the user page when only the standard log reader is enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And "Enable" "link" should exist in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And I log out @@ -85,7 +85,7 @@ Feature: View the user page for the outline report And I should see "3 views" Scenario: View the user page when both the standard and legacy log readers are enabled - Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + Given I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Legacy log" "table_row" And "Disable" "link" should exist in the "Standard log" "table_row" And the following config values are set as admin: diff --git a/report/participation/tests/behat/filter_participation.feature b/report/participation/tests/behat/filter_participation.feature index 854c4b2b5b0..ade87ab1895 100644 --- a/report/participation/tests/behat/filter_participation.feature +++ b/report/participation/tests/behat/filter_participation.feature @@ -30,7 +30,7 @@ Feature: In a participation report, admin can filter student actions @javascript Scenario: Filter participation report when only legacy log reader is enabled Given I log in as "admin" - And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + And I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Disable" "link" in the "Standard log" "table_row" And I click on "Enable" "link" in the "Legacy log" "table_row" And the following config values are set as admin: @@ -42,7 +42,7 @@ Feature: In a participation report, admin can filter student actions And I log out When I log in as "admin" And I am on "Course 1" course homepage - When I navigate to "Course participation" node in "Course administration > Reports" + When I navigate to "Reports > Course participation" in current page administration And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" And I press "Go" @@ -51,7 +51,7 @@ Feature: In a participation report, admin can filter student actions @javascript Scenario: Filter participation report when standard log reader is enabled later Given I log in as "admin" - And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + And I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Disable" "link" in the "Standard log" "table_row" And I click on "Enable" "link" in the "Legacy log" "table_row" And the following config values are set as admin: @@ -62,7 +62,7 @@ Feature: In a participation report, admin can filter student actions And I follow "Test book name" And I log out And I log in as "admin" - And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" + And I navigate to "Plugins > Logging > Manage log stores" in site administration And I click on "Enable" "link" in the "Standard log" "table_row" And I log out And I log in as "student1" @@ -71,7 +71,7 @@ Feature: In a participation report, admin can filter student actions And I log out And I log in as "admin" And I am on "Course 1" course homepage - When I navigate to "Course participation" node in "Course administration > Reports" + When I navigate to "Reports > Course participation" in current page administration And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" And I press "Go" @@ -85,7 +85,7 @@ Feature: In a participation report, admin can filter student actions And I log out And I log in as "admin" And I am on "Course 1" course homepage - When I navigate to "Course participation" node in "Course administration > Reports" + When I navigate to "Reports > Course participation" in current page administration And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" And I press "Go" diff --git a/report/participation/tests/behat/message_participants.feature b/report/participation/tests/behat/message_participants.feature index a9a9d7e56d8..df6fa46b9d7 100644 --- a/report/participation/tests/behat/message_participants.feature +++ b/report/participation/tests/behat/message_participants.feature @@ -38,7 +38,7 @@ Feature: Use the particiaption report to message groups of students Scenario: Message students who have not participated in book Given I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Course participation" node in "Course administration > Reports" + And I navigate to "Reports > Course participation" in current page administration And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" And I press "Go" @@ -56,7 +56,7 @@ Feature: Use the particiaption report to message groups of students And I log out And I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Course participation" node in "Course administration > Reports" + And I navigate to "Reports > Course participation" in current page administration When I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" And I press "Go" diff --git a/report/progress/tests/behat/activity_completion_report.feature b/report/progress/tests/behat/activity_completion_report.feature index dca3cf35111..4885029a17a 100644 --- a/report/progress/tests/behat/activity_completion_report.feature +++ b/report/progress/tests/behat/activity_completion_report.feature @@ -41,7 +41,7 @@ Feature: Teacher can view and override users' activity completion data via the p # Teacher overrides the activity completion statuses to incomplete. When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And "Student One, my assignment: Completed" "icon" should exist in the "Student One" "table_row" And "Student One, my assignment 2: Completed" "icon" should exist in the "Student One" "table_row" And I click on "my assignment" "link" in the "Student One" "table_row" @@ -65,7 +65,7 @@ Feature: Teacher can view and override users' activity completion data via the p # And the activity completion report should show the same. When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And "Student One, my assignment: Completed" "icon" should exist in the "Student One" "table_row" And "Student One, my assignment 2: Completed" "icon" should exist in the "Student One" "table_row" @@ -77,7 +77,7 @@ Feature: Teacher can view and override users' activity completion data via the p # When the teacher overrides the activity completion statuses to complete. When I log in as "teacher1" And I am on "Course 1" course homepage - And I navigate to "Activity completion" node in "Course administration > Reports" + And I navigate to "Reports > Activity completion" in current page administration And "Student One, my assignment: Not completed" "icon" should exist in the "Student One" "table_row" And "Student One, my assignment 3: Not completed" "icon" should exist in the "Student One" "table_row" And I click on "my assignment" "link" in the "Student One" "table_row" diff --git a/tag/tests/behat/collections.feature b/tag/tests/behat/collections.feature index 6e4dc2d3f23..eaad7277ae8 100644 --- a/tag/tests/behat/collections.feature +++ b/tag/tests/behat/collections.feature @@ -19,7 +19,7 @@ Feature: Managers can create and manage tag collections | Tag2 | 1 | | Tag3 | 1 | And I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Add tag collection" And I set the following fields to these values: | Name | Hobbies | @@ -89,7 +89,7 @@ Feature: Managers can create and manage tag collections And I expand all fieldsets And I set the field "List of interests" to "Swimming, Tag0, Tag3" And I press "Update profile" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" And I set the field "Change tag collection of area User interests" to "Hobbies" And I follow "Hobbies" @@ -119,12 +119,14 @@ Feature: Managers can create and manage tag collections And I press "Blocks editing on" # TODO MDL-57120 "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" Then the "Select tag collection" select box should contain "Default collection" And the "Select tag collection" select box should contain "Hobbies" And the "Select tag collection" select box should not contain "Hiddencoll" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I click on "Change searchable" "link" in the "Hobbies" "table_row" - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And "Select tag collection" "select" should not exist And I log out diff --git a/tag/tests/behat/delete_tag.feature b/tag/tests/behat/delete_tag.feature index a4275f3aeac..542360426d2 100644 --- a/tag/tests/behat/delete_tag.feature +++ b/tag/tests/behat/delete_tag.feature @@ -18,7 +18,7 @@ Feature: Manager is able to delete tags Scenario: Deleting a tag with javascript disabled When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Delete" "link" in the "Dog" "table_row" And I should see "Tag(s) deleted" @@ -31,7 +31,7 @@ Feature: Manager is able to delete tags Scenario: Deleting multiple tags with javascript disabled When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I set the following fields to these values: | Select tag Dog | 1 | @@ -49,7 +49,7 @@ Feature: Manager is able to delete tags @javascript Scenario: Deleting a tag with javascript enabled When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Delete" "link" in the "Turtle" "table_row" Then I should see "Are you sure you want to delete this tag?" @@ -72,7 +72,7 @@ Feature: Manager is able to delete tags @javascript Scenario: Deleting multiple tags with javascript enabled When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I press "Delete selected" And I should not see "Are you sure" diff --git a/tag/tests/behat/edit_tag.feature b/tag/tests/behat/edit_tag.feature index 29ce521aa43..42c6d1bb03d 100644 --- a/tag/tests/behat/edit_tag.feature +++ b/tag/tests/behat/edit_tag.feature @@ -34,7 +34,8 @@ Feature: Users can edit tags to add description or rename And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Turtle" And I follow "User 1" And I follow "Cat" @@ -59,7 +60,8 @@ Feature: Users can edit tags to add description or rename And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Turtle" And I follow "User 1" And I follow "Cat" @@ -92,7 +94,8 @@ Feature: Users can edit tags to add description or rename And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Turtle" And I follow "User 1" And I follow "Cat" @@ -115,7 +118,7 @@ Feature: Users can edit tags to add description or rename @javascript Scenario: Manager can change tag description and rename the tag from tag manage page When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Edit this tag" "link" in the "Cat" "table_row" And I set the following fields to these values: @@ -135,7 +138,7 @@ Feature: Users can edit tags to add description or rename Scenario: Renaming the tag in edit tag form from tag manage page When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Edit this tag" "link" in the "Cat" "table_row" And I set the following fields to these values: @@ -158,7 +161,7 @@ Feature: Users can edit tags to add description or rename @javascript Scenario: Renaming the tag using quick edit field on tag manage page When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" # Renaming tag to a valid name And I click on "Edit tag name" "link" in the "Cat" "table_row" @@ -199,7 +202,7 @@ Feature: Users can edit tags to add description or rename @javascript Scenario: Combining tags when renaming When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Edit tag name" "link" in the "Turtle" "table_row" And I set the field "New name for tag Turtle" to "DOG" @@ -214,7 +217,7 @@ Feature: Users can edit tags to add description or rename @javascript Scenario: Combining multiple tags When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I set the following fields to these values: | Select tag Dog | 1 | @@ -234,7 +237,7 @@ Feature: Users can edit tags to add description or rename Scenario: Filtering tags When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I should not see "Reset filter" And I set the field "Search" to "t" diff --git a/tag/tests/behat/flag_tags.feature b/tag/tests/behat/flag_tags.feature index 7c384d2d706..7eda63891eb 100644 --- a/tag/tests/behat/flag_tags.feature +++ b/tag/tests/behat/flag_tags.feature @@ -27,14 +27,18 @@ Feature: Users can flag tags and manager can reset flags And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Nicetag" And I follow "User 1" And I follow "Badtag" And I follow "Flag as inappropriate" And I should see "The person responsible will be notified" And I am on homepage - And I navigate to "Tags" node in "Site pages" + # TODO MDL-57120 site "Tags" link not accessible without navigation block. + And I add the "Navigation" block if not present + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Nicetag" And I follow "User 1" And I follow "Sweartag" @@ -45,7 +49,8 @@ Feature: Users can flag tags and manager can reset flags And I press "Customise this page" # TODO MDL-57120 site "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Nicetag" And I follow "User 1" And I follow "Sweartag" @@ -56,7 +61,7 @@ Feature: Users can flag tags and manager can reset flags @javascript Scenario: Managing tag flags When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" Then "Sweartag" "link" should appear before "Badtag" "link" And "Badtag" "link" should appear before "Nicetag" "link" diff --git a/tag/tests/behat/standard_tags.feature b/tag/tests/behat/standard_tags.feature index 1e866e5dbee..ef06919ff1a 100644 --- a/tag/tests/behat/standard_tags.feature +++ b/tag/tests/behat/standard_tags.feature @@ -22,7 +22,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags @javascript Scenario: Adding standard tags When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" Then "Make standard" "link" should exist in the "Tag0" "table_row" And "Make standard" "link" should exist in the "Tag1" "table_row" @@ -49,7 +49,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags @javascript Scenario: Changing tag isstandard When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Make standard" "link" in the "Tag0" "table_row" And I click on "Make standard" "link" in the "Tag1" "table_row" @@ -72,7 +72,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags Scenario: Changing tag isstandard in edit form When I log in as "manager1" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I follow "Default collection" And I click on "Edit this tag" "link" in the "Tag1" "table_row" And I set the following fields to these values: @@ -95,14 +95,14 @@ Feature: Manager can add standard tags and change the tag type of existing tags And I set the following fields to these values: | List of interests | Tag3 , Tag2 | And I press "Update profile" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I click on "Change standard tag usage" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" And the field "Change showing standard tags in area User interests" matches value "Don't suggest" And I set the field "Change showing standard tags in area User interests" to "Suggest" And I open my profile in edit mode And I expand all fieldsets And I should see "Manage standard tags" - And I navigate to "Manage tags" node in "Site administration > Appearance" + And I navigate to "Appearance > Manage tags" in site administration And I click on "Change standard tag usage" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" And the field "Change showing standard tags in area User interests" matches value "Suggest" And I set the field "Change showing standard tags in area User interests" to "Force" diff --git a/tag/tests/behat/tagindex.feature b/tag/tests/behat/tagindex.feature index 98a8ef648a5..87f11866c77 100644 --- a/tag/tests/behat/tagindex.feature +++ b/tag/tests/behat/tagindex.feature @@ -25,7 +25,8 @@ Feature: Browsing tagged items And I press "Customise this page" # TODO MDL-57120 "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Cat" Then I should see "Courses" in the ".tag-index-items h3" "css_element" And I should see "User 1" in the "#tagarea-core-user" "css_element" @@ -72,7 +73,8 @@ Feature: Browsing tagged items And I press "Customise this page" # TODO MDL-57120 "Tags" link not accessible without navigation block. And I add the "Navigation" block if not present - And I navigate to "Tags" node in "Site pages" + And I click on "Site pages" "list_item" in the "Navigation" "block" + And I click on "Tags" "link" in the "Navigation" "block" And I follow "Cat" Then I should see "Courses" in the "#tagarea-core-course" "css_element" And I should see "User interests" in the "#tagarea-core-user" "css_element" diff --git a/theme/boost/tests/behat/behat_theme_boost_behat_deprecated.php b/theme/boost/tests/behat/behat_theme_boost_behat_deprecated.php new file mode 100644 index 00000000000..6ab19139b0d --- /dev/null +++ b/theme/boost/tests/behat/behat_theme_boost_behat_deprecated.php @@ -0,0 +1,90 @@ +. + +/** + * Deprecated steps overrides. + * + * @copyright 2018 Victor Deniz + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. + +require_once(__DIR__ . '/../../../../lib/tests/behat/behat_deprecated.php'); + +/** + * Deprecated behat step definitions. + * + * @package theme_boost + * @category test + * @copyright 2018 Victor Deniz + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class behat_theme_boost_behat_deprecated extends behat_deprecated { + + /** + * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one) + * + * @throws ExpectationException + * @param string $nodetext navigation node to click. + * @param string $parentnodes comma seperated list of parent nodes. + * @return void + * @deprecated since Moodle 3.6 MDL-57281 - please do not use this definition step any more. + * @todo MDL-63004 This will be deleted in Moodle 4.0. + */ + public function i_navigate_to_node_in($nodetext, $parentnodes) { + $alternative[] = 'I navigate to "PATH" in current page administration'; + $alternative[] = 'I navigate to "PATH" in site administration'; + $alternative[] = 'I navigate to "TAB1 > TAB2" in the course gradebook'; + $alternative[] = 'I navigate to course participants'; + $alternative[] = 'If some items are not available without Navigation block at all, one can use combination of: + I add the "Navigation" block if not present + I click on "LINK" "link" in the "Navigation" "block"'; + + $this->deprecated_message($alternative); + + $parentnodes = array_map('trim', explode('>', $parentnodes)); + $nodelist = array_merge($parentnodes, [$nodetext]); + $firstnode = array_shift($nodelist); + + if ($firstnode === get_string('administrationsite')) { + $this->execute('behat_theme_boost_behat_navigation::i_select_from_flat_navigation_drawer', + array(get_string('administrationsite'))); + $this->execute('behat_theme_boost_behat_navigation::select_on_administration_page', array($nodelist)); + return; + } + + if ($firstnode === get_string('sitepages')) { + if ($nodetext === get_string('calendar', 'calendar')) { + $this->execute('behat_theme_boost_behat_navigation::i_select_from_flat_navigation_drawer', + array(($nodetext))); + } else { + // TODO MDL-57120 other links under "Site pages" are not accessible without navigation block. + $this->execute('behat_theme_boost_behat_navigation::select_node_in_navigation', + array($nodetext, $parentnodes)); + } + return; + } + + if ($firstnode === get_string('courseadministration')) { + // Administration menu is available only on the main course page where settings in Administration + // block (original purpose of the step) are available on every course page. + $this->execute('behat_theme_boost_behat_navigation::go_to_main_course_page', array()); + } + + $this->execute('behat_theme_boost_behat_navigation::select_from_administration_menu', array($nodelist)); + } +} diff --git a/theme/boost/tests/behat/behat_theme_boost_behat_mod_quiz.php b/theme/boost/tests/behat/behat_theme_boost_behat_mod_quiz.php index bf9e6b333fd..c8b27c0b20a 100644 --- a/theme/boost/tests/behat/behat_theme_boost_behat_mod_quiz.php +++ b/theme/boost/tests/behat/behat_theme_boost_behat_mod_quiz.php @@ -45,7 +45,8 @@ class behat_theme_boost_behat_mod_quiz extends behat_mod_quiz { $this->execute('behat_general::click_link', $quizname); - $this->execute("behat_navigation::i_navigate_to_node_in", array($editquiz, $quizadmin)); + $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", + $quizadmin . ' > ' . $editquiz); if ($this->running_javascript()) { $this->execute("behat_action_menu::i_open_the_action_menu_in", array('.slots', "css_element")); diff --git a/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php b/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php index ad08c8329c1..a0b5290a4be 100644 --- a/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php +++ b/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php @@ -310,36 +310,6 @@ class behat_theme_boost_behat_navigation extends behat_navigation { $this->toggle_page_administration_menu($menuxpath); } - public function i_navigate_to_node_in($nodetext, $parentnodes) { - $parentnodes = array_map('trim', explode('>', $parentnodes)); - $nodelist = array_merge($parentnodes, [$nodetext]); - $firstnode = array_shift($nodelist); - - if ($firstnode === get_string('administrationsite')) { - $this->i_select_from_flat_navigation_drawer(get_string('administrationsite')); - $this->select_on_administration_page($nodelist); - return; - } - - if ($firstnode === get_string('sitepages')) { - if ($nodetext === get_string('calendar', 'calendar')) { - $this->i_select_from_flat_navigation_drawer($nodetext); - } else { - // TODO MDL-57120 other links under "Site pages" are not accessible without navigation block. - $this->select_node_in_navigation($nodetext, $parentnodes); - } - return; - } - - if ($firstnode === get_string('courseadministration')) { - // Administration menu is available only on the main course page where settings in Administration - // block (original purpose of the step) are available on every course page. - $this->go_to_main_course_page(); - } - - $this->select_from_administration_menu($nodelist); - } - public function i_navigate_to_in_current_page_administration($nodetext) { $nodelist = array_map('trim', explode('>', $nodetext)); $this->select_from_administration_menu($nodelist); diff --git a/user/tests/behat/addnewuser.feature b/user/tests/behat/addnewuser.feature index 37dc93bfb95..1e3b04900d3 100644 --- a/user/tests/behat/addnewuser.feature +++ b/user/tests/behat/addnewuser.feature @@ -7,7 +7,7 @@ Feature: Create manually an user. @javascript Scenario: Change default language for a new user Given I log in as "admin" - When I navigate to "Add a new user" node in "Site administration > Users > Accounts" + When I navigate to "Users > Accounts > Add a new user" in site administration Then I should see "Preferred language" @javascript @@ -16,7 +16,7 @@ Feature: Create manually an user. | username | firstname | lastname | email | | student1 | Student | 1 | student1@example.com | When I log in as "admin" - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "Student 1" And I follow "Edit profile" Then I should not see "Preferred language" diff --git a/user/tests/behat/custom_profile_fields.feature b/user/tests/behat/custom_profile_fields.feature index 6f529a28fd8..2c61182c202 100644 --- a/user/tests/behat/custom_profile_fields.feature +++ b/user/tests/behat/custom_profile_fields.feature @@ -16,7 +16,7 @@ Feature: Custom profile fields should be visible and editable by those with the | registerauth | email | And I log in as "admin" - And I navigate to "User profile fields" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > User profile fields" in site administration And I set the field "datatype" to "Text input" And I set the following fields to these values: | Short name | notvisible_field | @@ -41,7 +41,7 @@ Feature: Custom profile fields should be visible and editable by those with the | Who is this field visible to? | Visible to everyone | And I click on "Save changes" "button" - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I click on ".icon[title=Edit]" "css_element" in the "userwithinformation@example.com" "table_row" And I expand all fieldsets And I set the field "notvisible_field" to "notvisible_field_information" diff --git a/user/tests/behat/delete_users.feature b/user/tests/behat/delete_users.feature index d5113fb0ed9..bc05131135e 100644 --- a/user/tests/behat/delete_users.feature +++ b/user/tests/behat/delete_users.feature @@ -15,7 +15,7 @@ Feature: Deleting users @javascript Scenario: Deleting one user at a time When I log in as "admin" - And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Bulk user actions" in site administration And the "Available" select box should contain "User Four" And I set the field "Available" to "User Four" And I press "Add to selection" @@ -31,7 +31,7 @@ Feature: Deleting users @javascript Scenario: Deleting more than one user at a time When I log in as "admin" - And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Bulk user actions" in site administration And I set the field "Available" to "User Four" And I press "Add to selection" And I set the field "Available" to "User Three" @@ -55,7 +55,7 @@ Feature: Deleting users And I send "Message 2 from user3 to user4" message to "User Four" user And I log out And I log in as "admin" - And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Bulk user actions" in site administration And I set the field "Available" to "User One" And I press "Add to selection" And I set the field "Available" to "User Four" @@ -64,7 +64,7 @@ Feature: Deleting users And I press "Go" And I press "Yes" Then I should see "Changes saved" - And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Bulk user actions" in site administration And I set the field "Available" to "User Two" And I press "Add to selection" And I set the field "Available" to "User Three" diff --git a/user/tests/behat/edit_user_enrolment.feature b/user/tests/behat/edit_user_enrolment.feature index 9ff1bb23605..0d8a38e26cc 100644 --- a/user/tests/behat/edit_user_enrolment.feature +++ b/user/tests/behat/edit_user_enrolment.feature @@ -78,7 +78,7 @@ Feature: Edit user enrolment | user | course | role | status | | student3 | C2 | student | 0 | And I log in as "admin" - And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" + And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration And I click on "Enable" "link" in the "Course meta link" "table_row" And I am on "Course 1" course homepage And I add "Course meta link" enrolment method with: diff --git a/user/tests/behat/edituserpassword.feature b/user/tests/behat/edituserpassword.feature index 44d7e740294..a1e4fcb6a14 100644 --- a/user/tests/behat/edituserpassword.feature +++ b/user/tests/behat/edituserpassword.feature @@ -7,7 +7,7 @@ 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" - When I navigate to "Add a new user" node in "Site administration > Users > Accounts" + When I navigate to "Users > Accounts > Add a new user" in site administration Then the "New password" "field" should be enabled And I set the field "auth" to "Web services authentication" And the "New password" "field" should be disabled diff --git a/user/tests/behat/enrol_cohort_list.feature b/user/tests/behat/enrol_cohort_list.feature index 467c56b1191..305cedf16da 100644 --- a/user/tests/behat/enrol_cohort_list.feature +++ b/user/tests/behat/enrol_cohort_list.feature @@ -22,7 +22,7 @@ Feature: Viewing the list of cohorts to enrol in a course | capability | permission | | moodle/cohort:manage | Prohibit | | moodle/cohort:view | Prohibit | - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Add new cohort" And I set the following fields to these values: | Name | Test cohort name | @@ -41,7 +41,7 @@ Feature: Viewing the list of cohorts to enrol in a course @javascript Scenario: Check we show the cohorts field if there are some present Given I log in as "admin" - And I navigate to "Cohorts" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts >Cohorts" in site administration And I follow "Add new cohort" And I set the following fields to these values: | Name | Test cohort name | diff --git a/user/tests/behat/name_fields.feature b/user/tests/behat/name_fields.feature index 4f26b277ae6..131b61447fb 100644 --- a/user/tests/behat/name_fields.feature +++ b/user/tests/behat/name_fields.feature @@ -51,7 +51,7 @@ Feature: Both first name and surname are always available for every user | username | firstname | lastname | email | | foobar | Foo | Bar | foo@bar.com | And I log in as "admin" - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "Foo Bar" And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "First name" to " " diff --git a/user/tests/behat/table_sorting.feature b/user/tests/behat/table_sorting.feature index bd1b988a845..70c7c2bd140 100644 --- a/user/tests/behat/table_sorting.feature +++ b/user/tests/behat/table_sorting.feature @@ -11,14 +11,14 @@ Feature: Tables can be sorted by additional names | student2 | George | Bradley | David | Gman | student2@example.com | s2 | | student3 | Travis | Sutcliff | Peter | Mr T | student3@example.com | s3 | And I log in as "admin" - And I navigate to "User policies" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > User policies" in site administration And the following config values are set as admin: | fullnamedisplay | firstname middlename lastname | | alternativefullnameformat | firstname middlename alternatename lastname | @javascript Scenario: All user names are show and sortable in the administration user list. - Given I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + Given I navigate to "Users > Accounts > Browse list of users" in site administration Then the following should exist in the "users" table: | First name / Middle name / Alternate name / Surname | Email address | | Admin User | moodle@example.com | diff --git a/user/tests/behat/user_grade_navigation.feature b/user/tests/behat/user_grade_navigation.feature index 7b0db6c85d9..f41b46b75f1 100644 --- a/user/tests/behat/user_grade_navigation.feature +++ b/user/tests/behat/user_grade_navigation.feature @@ -66,7 +66,7 @@ Feature: The student can navigate to their grades page and user grade report. And I am on site homepage And I turn editing mode on And I add the "Mentees" block - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I click on "Add a new role" "button" And I click on "Continue" "button" And I set the following fields to these values: @@ -78,7 +78,7 @@ Feature: The student can navigate to their grades page and user grade report. | moodle/user:viewuseractivitiesreport | 1 | | moodle/user:viewdetails | 1 | And I click on "Create this role" "button" - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "Student 1" And I click on "Preferences" "link" in the ".profile_tree" "css_element" And I follow "Assign roles relative to this user" diff --git a/user/tests/behat/view_full_profile.feature b/user/tests/behat/view_full_profile.feature index 54cf86ff6be..bb75a3bed11 100644 --- a/user/tests/behat/view_full_profile.feature +++ b/user/tests/behat/view_full_profile.feature @@ -72,11 +72,11 @@ Feature: Access to full profiles of users @javascript Scenario: Viewing full profiles of someone with the course contact role Given I log in as "admin" - And I navigate to "Courses" node in "Site administration > Appearance" + And I navigate to "Appearance > Courses" in site administration And I set the following fields to these values: | Course creator | 1 | And I press "Save changes" - And I navigate to "Assign system roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Assign system roles" in site administration And I follow "Course creator" And I click on "//div[@class='userselector']/descendant::option[contains(., 'Student 3')]" "xpath_element" And I press "Add" @@ -90,7 +90,7 @@ Feature: Access to full profiles of users Scenario: View full profiles of someone in the same group in a course with separate groups. Given I log in as "admin" And I am on "Course 1" course homepage - And I navigate to "Edit settings" node in "Course administration" + And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Group mode | Separate groups | | Force group mode | Yes | diff --git a/user/tests/behat/view_preferences_page.feature b/user/tests/behat/view_preferences_page.feature index 5ca1b0e05da..8075576adf8 100644 --- a/user/tests/behat/view_preferences_page.feature +++ b/user/tests/behat/view_preferences_page.feature @@ -56,7 +56,7 @@ Feature: Access to preferences page And I am on site homepage And I follow "Turn editing on" And I add the "Mentees" block - And I navigate to "Define roles" node in "Site administration > Users > Permissions" + And I navigate to "Users > Permissions > Define roles" in site administration And I click on "Add a new role" "button" And I click on "Continue" "button" And I set the following fields to these values: @@ -68,7 +68,7 @@ Feature: Access to preferences page | moodle/user:viewuseractivitiesreport | 1 | | moodle/user:viewdetails | 1 | And I click on "Create this role" "button" - And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" + And I navigate to "Users > Accounts > Browse list of users" in site administration And I follow "Student 1" And I click on "Preferences" "link" in the ".profile_tree" "css_element" And I follow "Assign roles relative to this user"