diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index f2047d8aa3d..7ee3f7004c3 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -172,7 +172,6 @@ preferences,moodle|/user/preferences.php|preferences', $temp->add(new admin_setting_configcheckbox('navshowcategories', new lang_string('navshowcategories', 'admin'), new lang_string('confignavshowcategories', 'admin'), 1)); $temp->add(new admin_setting_configcheckbox('navshowmycoursecategories', new lang_string('navshowmycoursecategories', 'admin'), new lang_string('navshowmycoursecategories_help', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('navshowallcourses', new lang_string('navshowallcourses', 'admin'), new lang_string('confignavshowallcourses', 'admin'), 0)); - $temp->add(new admin_setting_configcheckbox('navexpandmycourses', new lang_string('navexpandmycourses', 'admin'), new lang_string('navexpandmycourses_desc', 'admin'), 1)); $sortoptions = array( 'sortorder' => new lang_string('sort_sortorder', 'admin'), 'fullname' => new lang_string('sort_fullname', 'admin'), diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index cac5f633456..6b6d5ed2140 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -325,7 +325,7 @@ Feature: Set up contextual data for tests And I am on site homepage And I follow "Courses" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then I should see "Grade category 1" And I should see "Grade sub category 2" @@ -349,7 +349,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I expand "Setup" node And I follow "Gradebook setup" Then I should see "Test Grade Item 1" @@ -380,7 +380,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I follow "Scales" Then I should see "Test Scale 1" And I should see "Disappointing, Good, Very good, Excellent" @@ -432,7 +432,7 @@ Feature: Set up contextual data for tests When I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I expand "Setup" node And I follow "Gradebook setup" Then I should see "Test Outcome Grade Item 1" diff --git a/admin/tool/behat/tests/behat/edit_permissions.feature b/admin/tool/behat/tests/behat/edit_permissions.feature index 29f798193a7..b07c1218bcb 100644 --- a/admin/tool/behat/tests/behat/edit_permissions.feature +++ b/admin/tool/behat/tests/behat/edit_permissions.feature @@ -52,13 +52,13 @@ Feature: Edit capabilities | Forum name | I'm the name | | Description | I'm the introduction | And I follow "I'm the name" - And I follow "Permissions" + And I navigate to "Permissions" node in "Forum administration" And I override the system permissions of "Student" role with: | mod/forum:deleteanypost | Prohibit | | mod/forum:editanypost | Prevent | | mod/forum:addquestion | Allow | When I set the field "Advanced role override" to "Student (3)" - And I press "Go" + And I click on "Go" "button" in the "region-main" "region" Then "mod/forum:deleteanypost" capability has "Prohibit" permission And "mod/forum:editanypost" capability has "Prevent" permission And "mod/forum:addquestion" capability has "Allow" permission diff --git a/admin/tool/behat/tests/behat/get_and_set_fields.feature b/admin/tool/behat/tests/behat/get_and_set_fields.feature index ca4f2a1a15d..9edf445d769 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -37,7 +37,7 @@ Feature: Verify that all form fields values can be get and set And I expand "Appearance" node And I am on site homepage And I follow "Course 1" - And I follow "Reset" + And I navigate to "Reset" node in "Course 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" diff --git a/admin/tool/behat/tests/behat/manipulate_forms.feature b/admin/tool/behat/tests/behat/manipulate_forms.feature index 126a800f6bb..b2524fb6297 100644 --- a/admin/tool/behat/tests/behat/manipulate_forms.feature +++ b/admin/tool/behat/tests/behat/manipulate_forms.feature @@ -8,7 +8,7 @@ Feature: Forms manipulation Scenario: Basic forms manipulation Given I log in as "admin" And I follow "Preferences" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "First name" to "Field value" And I set the field "Select a country" to "Japan" And I set the field "Unmask" to "1" diff --git a/admin/tool/behat/tests/behat/nasty_strings.feature b/admin/tool/behat/tests/behat/nasty_strings.feature index f8d847d5245..1c547653d33 100644 --- a/admin/tool/behat/tests/behat/nasty_strings.feature +++ b/admin/tool/behat/tests/behat/nasty_strings.feature @@ -11,14 +11,14 @@ Feature: Transform steps arguments | Course 1 | C1 | 0 | And I log in as "admin" And I follow "Preferences" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Scenario: Use nasty strings on steps arguments When I set the field "Surname" to "$NASTYSTRING1" And I set the field "Description" to "$NASTYSTRING2" And I set the field "City/town" to "$NASTYSTRING3" And I press "Update profile" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "NASTYSTRING" And the field "Surname" matches value "$NASTYSTRING1" And the field "City/town" matches value "$NASTYSTRING3" @@ -29,7 +29,7 @@ Feature: Transform steps arguments | Description | $NASTYSTRING2 | | City/town | $NASTYSTRING3 | And I press "Update profile" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "NASTYSTRING" # BEHAT Transformation regression - See MDL-56397 #And the field "Surname" matches value "$NASTYSTRING1" @@ -41,7 +41,7 @@ Feature: Transform steps arguments | Description | va\"lue2 | And I set the field "City/town" to "va\"lue3" And I press "Update profile" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "NASTYSTRING" And the field "First name" matches value "va\"lue1" And the field "Description" matches value "va\\"lue2" @@ -52,7 +52,7 @@ Feature: Transform steps arguments And I set the following fields to these values: | Surname | My Surname $NASTYSTRING2 | And I press "Update profile" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "NASTYSTRING" And I should see "My Firstname" And I should see "My Surname" diff --git a/admin/tool/lp/tests/behat/user_evidence_comp_link.feature b/admin/tool/lp/tests/behat/user_evidence_comp_link.feature index 4ebd5c920ab..779ece3bfce 100644 --- a/admin/tool/lp/tests/behat/user_evidence_comp_link.feature +++ b/admin/tool/lp/tests/behat/user_evidence_comp_link.feature @@ -41,6 +41,7 @@ Feature: Manage competencies linked to evidence of prior learning Scenario: Link competency to evidence of prior learning from list Given I follow "Evidence of prior learning" + And I change window size to "large" And I should see "List of evidence" And I should see "Test-Evidence" And I click on "Link" of edit menu in the "Test-Evidence" row diff --git a/admin/tool/monitor/tests/behat/subscription.feature b/admin/tool/monitor/tests/behat/subscription.feature index bcf2ff664bb..4b29277d428 100644 --- a/admin/tool/monitor/tests/behat/subscription.feature +++ b/admin/tool/monitor/tests/behat/subscription.feature @@ -147,7 +147,7 @@ Feature: tool_monitor_subscriptions When I follow "Event monitoring" And I set the field "Select a course" to "Course 1" Then I should see "You can manage rules from the Event monitoring rules page." - And I follow "Event monitoring rules" + And I click on "Event monitoring rules" "link" in the "region-main" "region" And I should see "You can subscribe to rules from the Event monitoring page." And I log out And I log in as "teacher1" @@ -155,7 +155,7 @@ Feature: tool_monitor_subscriptions And I follow "Event monitoring" And I set the field "Select a course" to "Course 1" And I should see "You can manage rules from the Event monitoring rules page." - And I follow "Event monitoring rules" + And I click on "Event monitoring rules" "link" in the "region-main" "region" And I should see "You can subscribe to rules from the Event monitoring page." And I click on "//a[text()='Event monitoring']" "xpath_element" And the field "courseid" matches value "Course 1" diff --git a/admin/tool/recyclebin/tests/behat/backup_user_data.feature b/admin/tool/recyclebin/tests/behat/backup_user_data.feature index 7c20c3eebd5..500a2730b2f 100644 --- a/admin/tool/recyclebin/tests/behat/backup_user_data.feature +++ b/admin/tool/recyclebin/tests/behat/backup_user_data.feature @@ -58,12 +58,12 @@ Feature: Backup user data And I follow "Course 1" And I turn editing mode on And I delete "Quiz 1" activity - And I follow "Recycle bin" + And I navigate to "Recycle bin" node in "Course administration" And I should see "Quiz 1" - And I follow "Restore" + And I click on "Restore" "link" in the "region-main" "region" And I log out And I log in as "student1" And I follow "Course 1" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5" And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50" diff --git a/admin/tool/recyclebin/tests/behat/basic_functionality.feature b/admin/tool/recyclebin/tests/behat/basic_functionality.feature index 85e5d57882d..ded5e99f349 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -31,10 +31,10 @@ Feature: Basic recycle bin functionality | Assignment name | Test assign | | Description | Test | And I delete "Test assign" activity - When I follow "Recycle bin" + When I navigate to "Recycle bin" node in "Course administration" Then I should see "Test assign" And I should see "Contents will be permanently deleted after 7 days" - And I follow "Restore" + And I click on "Restore" "link" in the "region-main" "region" And I should see "'Test assign' has been restored" And I wait to be redirected And I am on homepage @@ -51,10 +51,10 @@ Feature: Basic recycle bin functionality And I press "Continue" And I go to the courses management page And I should not see "Course 2" in the "#course-listing" "css_element" - When I follow "Recycle bin" + When I navigate to "Recycle bin" node in "Category: Miscellaneous" Then I should see "Course 2" And I should see "Contents will be permanently deleted after 14 days" - And I follow "Restore" + And I click on "Restore" "link" in the "region-main" "region" And I should see "'Course 2' has been restored" And I wait to be redirected And I go to the courses management page @@ -69,7 +69,7 @@ Feature: Basic recycle bin functionality | Assignment name | Test assign | | Description | Test | And I delete "Test assign" activity - And I follow "Recycle bin" + And I navigate to "Recycle bin" node in "Course 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" @@ -92,7 +92,7 @@ Feature: Basic recycle bin functionality | Description | Test 2 | And I delete "Test assign 1" activity And I delete "Test assign 2" activity - And I follow "Recycle bin" + And I navigate to "Recycle bin" node in "Course 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/backup/util/ui/tests/behat/restore_moodle2_courses.feature b/backup/util/ui/tests/behat/restore_moodle2_courses.feature index 5aad4a3758a..1fa38f17d1f 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -67,7 +67,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 follow "Restore" + And I navigate to "Restore" node in "Course 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" @@ -91,6 +91,7 @@ Feature: Restore Moodle 2 course backups | id_startdate_month | January | | id_startdate_year | 2020 | | id_format | Weekly format | + | id_enddate_enabled | 0 | And I press "Save and display" And I should see "1 January - 7 January" And I should see "Test forum name" diff --git a/badges/tests/behat/award_badge.feature b/badges/tests/behat/award_badge.feature index bd0a070a1e1..92cc5ad6b8e 100644 --- a/badges/tests/behat/award_badge.feature +++ b/badges/tests/behat/award_badge.feature @@ -32,7 +32,7 @@ Feature: Award badges And I press "Continue" And I click on "Admin User" "link" And I choose "Profile" in the open action menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I set the field "Phone" to "123456789" And I press "Update profile" @@ -113,7 +113,7 @@ Feature: Award badges And I log out And I log in as "student1" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I should see "Course Badge" @javascript @@ -131,7 +131,7 @@ Feature: Award badges | student1 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - And I follow "Edit settings" + And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" @@ -156,13 +156,13 @@ Feature: Award badges And I log out And I log in as "student1" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" Then I should not see "badges" And I am on homepage And I follow "Course 1" And I press "Mark as complete: Test assignment name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" Then I should see "Course Badge" @javascript @@ -180,7 +180,7 @@ Feature: Award badges | student1 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - And I follow "Edit settings" + And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Enable completion tracking | Yes | And I press "Save and display" @@ -189,7 +189,7 @@ Feature: Award badges | Assignment name | Test assignment name | | Description | Submit your online text | | assignsubmission_onlinetext_enabled | 1 | - And I follow "Course completion" + And I navigate to "Course completion" node in "Course 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" @@ -211,7 +211,7 @@ Feature: Award badges And I log out And I log in as "student1" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" Then I should not see "badges" And I am on homepage And I follow "Course 1" @@ -300,14 +300,14 @@ Feature: Award badges # Student 1 should have just course badge 1. And I log in as "student1" And I follow "Profile" in the user menu - When I follow "Course 1" + When I click on "Course 1" "link" in the "region-main" "region" Then I should see "Course Badge 1" And I should not see "Course Badge 2" And I log out # Student 2 should have just course badge 2. And I log in as "student2" And I follow "Profile" in the user menu - When I follow "Course 1" + When I click on "Course 1" "link" in the "region-main" "region" Then I should see "Course Badge 2" Then I should not see "Course Badge 1" diff --git a/blocks/activity_results/tests/behat/addblockinactivity.feature b/blocks/activity_results/tests/behat/addblockinactivity.feature index 1f444c88533..2c62fb7e157 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -50,7 +50,7 @@ Feature: The activity results block displays student scores And I press "Save and return to course" And I follow "Course 1" And I should see "Test page name" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1" And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1" diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index b74485122f4..6797129ef92 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -32,7 +32,7 @@ Feature: The activity results block displays student scores | Description | Offline text | | assignsubmission_file_enabled | 0 | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" @@ -167,4 +167,4 @@ Feature: The activity results block displays student scores Then I should see "User" in the "Activity results" "block" And I should see "90.00%" in the "Activity results" "block" And I should see "80.00%" in the "Activity results" "block" - And I should see "70.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "70.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index b5e52f875a1..44ea70b66f0 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales | student5 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Scales" node in "Grade administration" And I press "Add a new scale" And I set the following fields to these values: @@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index d546fda0c5c..1f23958615b 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales | student6 | G3 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Scales" node in "Grade administration" And I press "Add a new scale" And I set the following fields to these values: @@ -60,7 +60,7 @@ Feature: The activity results block displays student scores as scales | id_grade_modgrade_scale | My Scale | | Group mode | Separate groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index 27807f80d4b..5e7632624ac 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -50,7 +50,7 @@ Feature: The activity results block displays student scores | assignsubmission_file_enabled | 0 | | Group mode | Separate groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" @@ -225,4 +225,4 @@ Feature: The activity results block displays student scores And I follow "Course 1" And I should see "User" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" - And I should see "90.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "90.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index f5fd1bd6f00..1d4d8d4e55d 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -50,7 +50,7 @@ Feature: The activity results block displays student scores | assignsubmission_file_enabled | 0 | | Group mode | Visible groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" @@ -202,4 +202,4 @@ Feature: The activity results block displays student scores And I should see "Group" in the "Activity results" "block" And I should see "95.00%" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" - And I should see "75.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "75.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index c20061ffd37..92900957567 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -32,7 +32,7 @@ Feature: The activity results block displays student scores | Description | Offline text | | assignsubmission_file_enabled | 0 | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" @@ -156,4 +156,4 @@ Feature: The activity results block displays student scores Then I should see "User" in the "Activity results" "block" And I should see "50.00%" in the "Activity results" "block" And I should see "60.00%" in the "Activity results" "block" - And I should see "70.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "70.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 00f31f6b48b..52c97bda22b 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales | student5 | C1 | student | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Scales" node in "Grade administration" And I press "Add a new scale" And I set the following fields to these values: @@ -42,7 +42,7 @@ Feature: The activity results block displays student scores as scales | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index be5ae335e79..b16a3394566 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales | student6 | G3 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Scales" node in "Grade administration" And I press "Add a new scale" And I set the following fields to these values: @@ -60,7 +60,7 @@ Feature: The activity results block displays student scores as scales | id_grade_modgrade_scale | My Scale | | Group mode | Separate groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index b5e0546b2c7..47c5f564f94 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -50,7 +50,7 @@ Feature: The activity results block displays student scores | assignsubmission_file_enabled | 0 | | Group mode | Separate groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" @@ -217,4 +217,4 @@ Feature: The activity results block displays student scores And I follow "Course 1" And I should see "User" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" - And I should see "90.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "90.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index 7049958399c..0d0f2246d4d 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -50,7 +50,7 @@ Feature: The activity results block displays student scores | assignsubmission_file_enabled | 0 | | Group mode | Visible groups | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" @@ -198,4 +198,4 @@ Feature: The activity results block displays student scores And I follow "Course 1" And I should see "Group" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" - And I should see "75.00%" in the "Activity results" "block" \ No newline at end of file + And I should see "75.00%" in the "Activity results" "block" diff --git a/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature b/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature index 7bfb0635840..6b8001f6c09 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature @@ -219,4 +219,4 @@ Feature: Enable Block blog menu in an activity And I press "Search" Then I should see "S1 First Blog" And I should see "S2 First Blog" - And I should not see "S2 Second Blog" \ No newline at end of file + And I should not see "S2 Second Blog" diff --git a/blocks/blog_tags/tests/behat/blogtag.feature b/blocks/blog_tags/tests/behat/blogtag.feature index d840c38eccc..597cbe781d6 100644 --- a/blocks/blog_tags/tests/behat/blogtag.feature +++ b/blocks/blog_tags/tests/behat/blogtag.feature @@ -25,7 +25,7 @@ Feature: Adding blog tag block And I turn editing mode on And I add the "Blog tags" block - And I navigate to "Course blogs" node in "Current course > c1 > Participants" + And I navigate to "Course blogs" node in "My courses > c1 > Participants" And I follow "Blog about this Course" And I set the following fields to these values: | Entry title | Blog post from teacher | @@ -35,7 +35,7 @@ Feature: Adding blog tag block And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Course blogs" node in "Current course > c1 > Participants" + And I navigate to "Course blogs" node in "My courses > c1 > Participants" And I follow "Blog about this Course" And I set the following fields to these values: | Entry title | Blog post from student | diff --git a/blocks/calendar_month/tests/behat/block_calendar_month_frontpage.feature b/blocks/calendar_month/tests/behat/block_calendar_month_frontpage.feature index ae09aa8e27a..b7ef68e40e6 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month_frontpage.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month_frontpage.feature @@ -11,6 +11,8 @@ Feature: Enable the calendar block on the site front page | student1 | Student | 1 | student1@example.com | S1 | And I log in as "admin" And I am on site homepage + And I turn editing mode on + And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | Site | | id_name | Site Event | diff --git a/blocks/course_list/tests/behat/block_course_list_category.feature b/blocks/course_list/tests/behat/block_course_list_category.feature index 4f3fa502ed4..c4273008f28 100644 --- a/blocks/course_list/tests/behat/block_course_list_category.feature +++ b/blocks/course_list/tests/behat/block_course_list_category.feature @@ -28,13 +28,13 @@ Feature: Enable the course_list block on a category page and view it's contents Scenario: Add the course list block on category page 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 follow "Course 1" + And I turn editing mode on + And I am on course index And I follow "Miscellaneous" And I add the "Courses" block And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course index And I follow "Miscellaneous" Then I should see "Course 1" in the "My courses" "block" And I should see "Course 2" in the "My courses" "block" @@ -46,13 +46,13 @@ Feature: Enable the course_list block on a category page and view it's contents Scenario: Add the course list block on category 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 follow "Course 1" + And I turn editing mode on + And I am on course index And I follow "Miscellaneous" And I add the "Courses" block And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course index And I follow "Miscellaneous" Then I should see "Course 1" in the "My courses" "block" And I should see "Course 2" in the "My courses" "block" @@ -64,8 +64,8 @@ Feature: Enable the course_list block on a category page and view it's contents Scenario: Add the course list block on category 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 follow "Course 1" + And I turn editing mode on + And I am on course index And I follow "Miscellaneous" When I add the "Courses" block Then I should see "Miscellaneous" in the "Course categories" "block" 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 e8980b0ad5c..6299f59b4ef 100644 --- a/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature +++ b/blocks/course_summary/tests/behat/block_course_summary_frontpage.feature @@ -7,6 +7,8 @@ Feature: Course summary block used on the frontpage Background: Given I log in as "admin" 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 set the following fields to these values: | summary | Proved the summary block works! | diff --git a/blocks/navigation/tests/behat/expand_my_courses_setting.feature b/blocks/navigation/tests/behat/expand_my_courses_setting.feature deleted file mode 100644 index bfba988db66..00000000000 --- a/blocks/navigation/tests/behat/expand_my_courses_setting.feature +++ /dev/null @@ -1,56 +0,0 @@ -@block @block_navigation -Feature: Test expand my courses navigation setting - As a student - I visit my My Moodle page and observe the the My Courses branch - - Background: - Given the following "users" exist: - | username | firstname | lastname | email | - | student1 | Student | 1 | student1@example.com | - And the following "categories" exist: - | name | category | idnumber | - | cat1 | 0 | cat1 | - And the following "courses" exist: - | fullname | shortname | category | - | Course1 | c1 | cat1 | - | Course2 | c2 | cat1 | - | Course3 | c3 | cat1 | - And the following "course enrolments" exist: - | user | course | role | - | student1 | c1 | student | - | student1 | c2 | student | - - Scenario: The My Courses branch is expanded on the My Moodle page by default - When I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" - Then I should see "c1" in the "Navigation" "block" - And I should see "c2" in the "Navigation" "block" - And I should not see "c3" in the "Navigation" "block" - - @javascript - Scenario: The My Courses branch is collapsed when expand my courses is off - Given I log in as "admin" - And I set the following administration settings values: - | Show My courses expanded on Dashboard | 0 | - And I log out - When I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" - Then I should not see "c1" in the "Navigation" "block" - And I should not see "c2" in the "Navigation" "block" - And I should not see "c3" in the "Navigation" "block" - - @javascript - Scenario: My Courses can be expanded on the My Moodle page when expand my courses is off - Given I log in as "admin" - And I set the following administration settings values: - | Show My courses expanded on Dashboard | 0 | - And I log out - When I log in as "student1" - And I click on "Dashboard" "link" in the "Navigation" "block" - And I should not see "c1" in the "Navigation" "block" - And I should not see "c2" in the "Navigation" "block" - And I should not see "c3" in the "Navigation" "block" - And I expand "My courses" node - Then I should see "c1" in the "Navigation" "block" - And I should see "c2" in the "Navigation" "block" - And I should not see "c3" in the "Navigation" "block" diff --git a/blocks/news_items/tests/behat/display_news.feature b/blocks/news_items/tests/behat/display_news.feature index ecac0bde2e8..a899073dc5b 100644 --- a/blocks/news_items/tests/behat/display_news.feature +++ b/blocks/news_items/tests/behat/display_news.feature @@ -18,6 +18,9 @@ Feature: Latest announcements block displays the course latest news And I log out And I log in as "teacher1" And I follow "Course 1" + And I turn editing mode on + And I add the "Latest announcements" block + And I turn editing mode off When I add a new topic to "Announcements" forum with: | Subject | Discussion One | | Message | Not important | @@ -31,14 +34,14 @@ Feature: Latest announcements block displays the course latest news Then I should see "Discussion One" in the "Latest announcements" "block" And I should see "Discussion Two" in the "Latest announcements" "block" And I should see "Discussion Three" in the "Latest announcements" "block" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I set the following fields to these values: | News items to show | 2 | And I press "Save and display" And I should not see "Discussion One" in the "Latest announcements" "block" And I should see "Discussion Two" in the "Latest announcements" "block" And I should see "Discussion Three" in the "Latest announcements" "block" - And I follow "Edit settings" + And I click on "Edit settings" "link" in the "Administration" "block" And I set the following fields to these values: | News items to show | 0 | And I press "Save and display" diff --git a/blocks/recent_activity/tests/behat/structural_changes.feature b/blocks/recent_activity/tests/behat/structural_changes.feature index 380ea1e9c78..d66978a4be6 100644 --- a/blocks/recent_activity/tests/behat/structural_changes.feature +++ b/blocks/recent_activity/tests/behat/structural_changes.feature @@ -49,6 +49,7 @@ Feature: View structural changes in recent activity block Given I log in as "teacher1" And I follow "Course 1" And I turn editing mode on + And I add the "Recent activity" block When I add a "Forum" to section "1" and I fill the form with: | name | ForumVisibleGroups | | Description | No description | @@ -145,6 +146,7 @@ Feature: View structural changes in recent activity block When I log in as "teacher1" And I follow "Course 1" And I turn editing mode on + And I add the "Recent activity" block And I add a "Forum" to section "1" and I fill the form with: | name | ForumNew | | Description | No description | 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 48d164d057f..0f54b4b4dab 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_course.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_course.feature @@ -21,6 +21,9 @@ Feature: The search forums block allows users to search for forum posts And I navigate to "Edit settings" node in "Course administration" And I set the field "id_newsitems" to "1" And I press "Save and display" + And I turn editing mode on + And I add the "Latest announcements" block + And I add the "Search forums" block And I log out Scenario: Use the search forum block in a course without any forum posts diff --git a/blocks/site_main_menu/tests/behat/add_url.feature b/blocks/site_main_menu/tests/behat/add_url.feature index f391d7bc6f1..62054a04951 100644 --- a/blocks/site_main_menu/tests/behat/add_url.feature +++ b/blocks/site_main_menu/tests/behat/add_url.feature @@ -9,6 +9,7 @@ Feature: Add URL to 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 add the "Main menu" block When I add a "URL" to section "0" and I fill the form with: | Name | google | | Description | gooooooooogle | diff --git a/blocks/site_main_menu/tests/behat/edit_activities.feature b/blocks/site_main_menu/tests/behat/edit_activities.feature index dc73b9d1f7b..47994952f45 100644 --- a/blocks/site_main_menu/tests/behat/edit_activities.feature +++ b/blocks/site_main_menu/tests/behat/edit_activities.feature @@ -9,6 +9,7 @@ Feature: Edit activities in 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 add the "Main menu" block When I add a "Forum" to section "0" and I fill the form with: | Forum name | My forum name | And I click on "Edit title" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'My forum name')]" "xpath_element" diff --git a/blocks/social_activities/tests/behat/edit_activities.feature b/blocks/social_activities/tests/behat/edit_activities.feature index 07b58e391e0..ca391d3115f 100644 --- a/blocks/social_activities/tests/behat/edit_activities.feature +++ b/blocks/social_activities/tests/behat/edit_activities.feature @@ -18,6 +18,7 @@ Feature: Edit activities in social activities block Given I log in as "user1" And I follow "Course 1" And I turn editing mode on + And I add the "Social activities" block And I set the field "Add an activity to section 'section 0'" to "Forum" And I set the field "Forum name" to "My forum name" And I press "Save and return to course" diff --git a/blocks/tags/tests/behat/tagcloud.feature b/blocks/tags/tests/behat/tagcloud.feature index 36e1bc06a69..9c7ee6b5633 100644 --- a/blocks/tags/tests/behat/tagcloud.feature +++ b/blocks/tags/tests/behat/tagcloud.feature @@ -31,7 +31,7 @@ Feature: Block tags displaying tag cloud And I should see "Cats" in the "Tags" "block" And I should not see "Neverusedtag" in the "Tags" "block" And I click on "Dogs" "link" in the "Tags" "block" - And I should see "Log in to the site" in the ".breadcrumb" "css_element" + And I should see "You are not logged in" Scenario: Add Tags block in a course When I log in as "teacher1" diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index 9498021ef91..db03ce2107b 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -58,6 +58,7 @@ Feature: Add and configure blocks throughout the site Given I log in as "teacher1" And I follow "Course 1" And I follow "Turn editing on" + And I add the "Search forums" block Then I should see "Assign roles in Search forums block" @javascript diff --git a/blocks/tests/behat/hidden_block_region.feature b/blocks/tests/behat/hidden_block_region.feature index bd3a6c44a20..6abadca1865 100644 --- a/blocks/tests/behat/hidden_block_region.feature +++ b/blocks/tests/behat/hidden_block_region.feature @@ -14,6 +14,10 @@ Feature: Show hidden blocks in a docked block region when editing And I log in as "admin" And I follow "Course 1" And I turn editing mode on + And I add the "Search forums" block + And I add the "Latest announcements" block + And I add the "Upcoming events" block + And I add the "Recent activity" block # Hide all the blocks in the non-default region And I configure the "Search forums" block And I set the following fields to these values: diff --git a/calendar/tests/behat/calendar_lookahead.feature b/calendar/tests/behat/calendar_lookahead.feature index 449574ff8c8..9c6c046fd0d 100644 --- a/calendar/tests/behat/calendar_lookahead.feature +++ b/calendar/tests/behat/calendar_lookahead.feature @@ -20,6 +20,7 @@ Feature: Limit displayed upcoming events Given I follow "C1" And I turn editing mode on And I add the "Calendar" block + And I add the "Upcoming events" block And I follow "This month" And I click on "a.next" "css_element" And I click on "a.next" "css_element" diff --git a/cohort/tests/behat/add_cohort.feature b/cohort/tests/behat/add_cohort.feature index 7d8ccdb78b3..3d89faf90b4 100644 --- a/cohort/tests/behat/add_cohort.feature +++ b/cohort/tests/behat/add_cohort.feature @@ -32,7 +32,7 @@ Feature: Add cohorts of users When I add "First User (first@example.com)" user to "333" cohort members And I add "Second User (second@example.com)" user to "333" cohort members Then I should see "2" in the "#cohorts" "css_element" - And I follow "Assign" + And I click on "Assign" "link" in the "Test cohort name" "table_row" And the "Current users" select box should contain "First User (first@example.com)" And the "Current users" select box should contain "Second User (second@example.com)" And the "Current users" select box should not contain "Forth User (forth@example.com)" @@ -49,7 +49,7 @@ Feature: Add cohorts of users And I press "Add to cohort" And I follow "Cohorts" Then I should see "2" in the "#cohorts" "css_element" - And I follow "Assign" + And I click on "Assign" "link" in the "Test cohort name" "table_row" And the "Current users" select box should contain "Third User (third@example.com)" And the "Current users" select box should contain "Forth User (forth@example.com)" And the "Current users" select box should not contain "First User (first@example.com)" diff --git a/course/format/topics/tests/behat/edit_delete_sections.feature b/course/format/topics/tests/behat/edit_delete_sections.feature index 03db896f751..49023a54996 100644 --- a/course/format/topics/tests/behat/edit_delete_sections.feature +++ b/course/format/topics/tests/behat/edit_delete_sections.feature @@ -57,11 +57,11 @@ Feature: Sections can be edited and deleted in topics format When I click on "Edit topic name" "link" in the "li#section-1" "css_element" And I set the field "New name for topic Topic 1" to "Midterm evaluation" And I press key "13" in the field "New name for topic Topic 1" - Then I should not see "Topic 1" in the "#region-main" "css_element" + Then I should not see "Topic 1" in the "region-main" "region" And "New name for topic" "field" should not exist And I should see "Midterm evaluation" in the "li#section-1" "css_element" And I follow "Course 1" - And I should not see "Topic 1" in the "#region-main" "css_element" + And I should not see "Topic 1" in the "region-main" "region" And I should see "Midterm evaluation" in the "li#section-1" "css_element" Scenario: Deleting the last section in topics format diff --git a/course/format/weeks/tests/behat/edit_delete_sections.feature b/course/format/weeks/tests/behat/edit_delete_sections.feature index 355059a5d72..5d2150cf4be 100644 --- a/course/format/weeks/tests/behat/edit_delete_sections.feature +++ b/course/format/weeks/tests/behat/edit_delete_sections.feature @@ -62,11 +62,11 @@ Feature: Sections can be edited and deleted in weeks format When I click on "Edit week name" "link" in the "li#section-1" "css_element" And I set the field "New name for week 1 May - 7 May" to "Midterm evaluation" And I press key "13" in the field "New name for week 1 May - 7 May" - Then I should not see "1 May - 7 May" in the "#region-main" "css_element" + Then I should not see "1 May - 7 May" in the "region-main" "region" And "New name for week" "field" should not exist And I should see "Midterm evaluation" in the "li#section-1" "css_element" And I follow "Course 1" - And I should not see "1 May - 7 May" in the "#region-main" "css_element" + And I should not see "1 May - 7 May" in the "region-main" "region" And I should see "Midterm evaluation" in the "li#section-1" "css_element" Scenario: Deleting the last section in weeks format diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php index cf006b9c3cc..166210a8f51 100644 --- a/course/tests/behat/behat_course.php +++ b/course/tests/behat/behat_course.php @@ -650,7 +650,7 @@ class behat_course extends behat_base { // It should not exist at all. try { $this->find_link($activityname); - throw new ExpectationException('The "' . $activityname . '" should not appear'); + throw new ExpectationException('The "' . $activityname . '" should not appear', $this->getSession()); } catch (ElementNotFoundException $e) { // This is good, the activity should not be there. } diff --git a/course/tests/behat/category_change_visibility.feature b/course/tests/behat/category_change_visibility.feature index 4b41415df35..1bb7129b396 100644 --- a/course/tests/behat/category_change_visibility.feature +++ b/course/tests/behat/category_change_visibility.feature @@ -315,4 +315,4 @@ Feature: We can change the visibility of categories in the management interface. And category in management listing should be visible "CAT1" And category in management listing should be visible "CAT2" And category in management listing should be visible "CAT3" - And course in management listing should be dimmed "C1" \ No newline at end of file + And course in management listing should be dimmed "C1" diff --git a/course/tests/behat/category_resort.feature b/course/tests/behat/category_resort.feature index 42dacac5fa6..615928e04d1 100644 --- a/course/tests/behat/category_resort.feature +++ b/course/tests/behat/category_resort.feature @@ -209,4 +209,4 @@ Feature: Test we can resort categories in the management interface. And I should see category listing "Cat 1" before "Cat 1b" And I should see category listing "Cat 1b" before "Cat 1c" And I should see category listing "Cat 1c" before "Cat 1a" - And I should see category listing "Cat 1a" before "Cat 2" \ No newline at end of file + And I should see category listing "Cat 1a" before "Cat 2" diff --git a/course/tests/behat/course_change_visibility.feature b/course/tests/behat/course_change_visibility.feature index 6311d8bd524..ea67b3439a1 100644 --- a/course/tests/behat/course_change_visibility.feature +++ b/course/tests/behat/course_change_visibility.feature @@ -95,7 +95,7 @@ Feature: We can change the visibility of courses in the management interface. And I toggle visibility of category "CAT1" in management listing And I toggle visibility of course "C1" in management listing And I click on "Course categories and courses" "link" in the ".view-mode-selector" "css_element" - And I click on "Courses" "link" + And I click on "Courses" "link" in the ".view-mode-selector" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads And I should see "Course 1" in the "#course-listing ul.ml" "css_element" diff --git a/course/tests/behat/course_controls.feature b/course/tests/behat/course_controls.feature index 7dfb1c78b63..fda72f91b5a 100644 --- a/course/tests/behat/course_controls.feature +++ b/course/tests/behat/course_controls.feature @@ -29,16 +29,8 @@ Feature: Course activity controls works as expected And I log in as "teacher1" And I follow "Course 1" When I follow - And I press "Turn editing on" - Then I should see "Turn editing off" - And I press "Turn editing off" - And "Turn editing on" "button" should exist - And I follow "Turn editing on" - And "Turn editing off" "button" should exist - And I follow "Turn editing off" - And I should see "Turn editing on" - And "Turn editing on" "button" should exist And I turn editing mode on + And I add the "Recent activity" block And I open the action menu in "Recent activity" "block" And I click on "Delete Recent activity block" "link" And I press "Yes" @@ -68,7 +60,7 @@ Feature: Course activity controls works as expected And I click on "Hide" "link" in the "Test forum name 1" activity And "section" exist And I delete "Test forum name 1" activity - And I should not see "Test forum name 1" in the "#region-main" "css_element" + And I should not see "Test forum name 1" in the "region-main" "region" And I duplicate "Test forum name 2" activity editing the new copy with: | Forum name | Edited test forum name 2 | And "section" exist @@ -109,16 +101,8 @@ Feature: Course activity controls works as expected And I log in as "teacher1" And I follow "Course 1" When I follow - And I press "Turn editing on" - Then I should see "Turn editing off" - And I press "Turn editing off" - And "Turn editing on" "button" should exist - And I follow "Turn editing on" - And "Turn editing off" "button" should exist - And I follow "Turn editing off" - And I should see "Turn editing on" - And "Turn editing on" "button" should exist And I turn editing mode on + And I add the "Recent activity" block And I open the action menu in "Recent activity" "block" And I click on "Delete Recent activity block" "link" And I press "Yes" @@ -143,7 +127,7 @@ Feature: Course activity controls works as expected And "section" exist And I delete "Test forum name 1" activity And "section" exist - And I should not see "Test forum name 1" in the "#region-main" "css_element" + And I should not see "Test forum name 1" in the "region-main" "region" And I duplicate "Test forum name 2" activity editing the new copy with: | Forum name | Edited test forum name 2 | And "section" exist diff --git a/course/tests/behat/course_creation.feature b/course/tests/behat/course_creation.feature index 3b2b0ff0171..f8c945c9065 100644 --- a/course/tests/behat/course_creation.feature +++ b/course/tests/behat/course_creation.feature @@ -19,6 +19,8 @@ Feature: Managers can create courses And I log out When I log in as "teacher1" And I follow "Course 1" + And I turn editing mode on + And I add the "Latest announcements" block Then "Latest announcements" "block" should exist And I follow "Announcements" And "Add a new topic" "button" should exist @@ -52,8 +54,10 @@ Feature: Managers can create courses | id_enddate_year | 2016 | And I press "Save and return" Then I should see the "Course categories and courses" management page + And I click on "Sort courses" "link" + And I click on "Sort by Course time created ascending" "link" in the ".course-listing-actions" "css_element" And I should see course listing "Course 1" before "Course 2" - And I follow "Course 2" + And I click on "Course 2" "link" in the "region-main" "region" And I click on "Edit" "link" in the ".course-detail" "css_element" And the following fields match these values: | Course full name | Course 2 | diff --git a/course/tests/behat/move_activities.feature b/course/tests/behat/move_activities.feature index 7366eccced0..1c81efd6ee0 100644 --- a/course/tests/behat/move_activities.feature +++ b/course/tests/behat/move_activities.feature @@ -17,6 +17,7 @@ Feature: Activities can be moved between sections And I log in as "teacher1" And I follow "Course 1" And I turn editing mode on + And I add the "Recent activity" block And I follow "Delete Recent activity block" And I press "Yes" And I follow "Configure Navigation block" diff --git a/course/tests/behat/navigate_course_list.feature b/course/tests/behat/navigate_course_list.feature index cabeacecbe1..d2bb13075da 100644 --- a/course/tests/behat/navigate_course_list.feature +++ b/course/tests/behat/navigate_course_list.feature @@ -34,7 +34,7 @@ Feature: Browse course list and return back from enrolment page Scenario: A user can return to the previous page from enrolment page by clicking navigation links When I log in as "user2" And I follow "Preferences" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand "Courses" node And I expand "Sample category" node And I follow "Course 1" diff --git a/enrol/tests/behat/manage_enrolments_from_participants.feature b/enrol/tests/behat/manage_enrolments_from_participants.feature index 82e7f11b822..7a4bbd9868c 100644 --- a/enrol/tests/behat/manage_enrolments_from_participants.feature +++ b/enrol/tests/behat/manage_enrolments_from_participants.feature @@ -20,16 +20,16 @@ Feature: Manage enrollments from participants page | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" Scenario: Check the participants link when "All partipants" selected Given I select "All participants" from the "roleid" singleselect - When I follow "Edit" + When I click on "Edit" "link" in the "region-main" "region" Then I should see "Enrolled users" in the "h2" "css_element" And the field "Role" matches value "All" Scenario: Check the participants link when "Student" selected Given I select "Student" from the "roleid" singleselect - When I follow "Edit" + When I click on "Edit" "link" in the "region-main" "region" Then I should see "Enrolled users" in the "h2" "css_element" And the field "Role" matches value "Student" diff --git a/files/tests/behat/course_files.feature b/files/tests/behat/course_files.feature index 9143b75a392..c610bfabde2 100644 --- a/files/tests/behat/course_files.feature +++ b/files/tests/behat/course_files.feature @@ -16,7 +16,7 @@ Feature: Course files And I am on site homepage And I follow "Course 1" Then I should see "Legacy course files" - And I follow "Legacy course files" + And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" And "Add..." "link" should be visible And "Create folder" "link" should be visible @@ -33,7 +33,7 @@ Feature: Course files And I am on site homepage And I follow "Course 1" Then I should see "Legacy course files" - And I follow "Legacy course files" + And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" And "Add..." "link" should not be visible And "Create folder" "link" should not be visible diff --git a/grade/export/txt/tests/behat/export.feature b/grade/export/txt/tests/behat/export.feature index 5670d2cddeb..db6d0e9aca7 100644 --- a/grade/export/txt/tests/behat/export.feature +++ b/grade/export/txt/tests/behat/export.feature @@ -22,7 +22,7 @@ Feature: I need to export grades as text | assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" And I press "Save changes" @@ -76,4 +76,4 @@ Feature: I need to export grades as text And I should see "80.00 %" And I should see "B-" And I should not see "40.00 %" - And I should not see ",F," \ No newline at end of file + And I should not see ",F," diff --git a/grade/export/xml/tests/behat/export.feature b/grade/export/xml/tests/behat/export.feature index 9048755bdcf..65300651bd7 100644 --- a/grade/export/xml/tests/behat/export.feature +++ b/grade/export/xml/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: I need to export grades as xml | assign | C1 | a1 | Test assignment name | Submit something! | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" And I press "Save changes" diff --git a/grade/report/grader/tests/behat/ajax_grader.feature b/grade/report/grader/tests/behat/ajax_grader.feature index 71dad25bc17..1ee18cf9966 100644 --- a/grade/report/grader/tests/behat/ajax_grader.feature +++ b/grade/report/grader/tests/behat/ajax_grader.feature @@ -55,7 +55,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_report_showquickfeedback | 0 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should not see a feedback field for "Student 2" and grade item "Item VU" @@ -107,7 +107,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_report_showquickfeedback | 1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should see a feedback field for "Student 2" and grade item "Item VU" @@ -142,7 +142,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_report_showquickfeedback | 1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on student "Student 2" for grade item "Item VU" Then I should see a grade field for "Student 2" and grade item "Item VU" And I should see a feedback field for "Student 2" and grade item "Item VU" @@ -162,7 +162,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_report_showquickfeedback | 1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on Then I should not see a grade field for "Student 2" and grade item "Item VL" And I should not see a feedback field for "Student 2" and grade item "Item VL" @@ -193,7 +193,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_report_showquickfeedback | 1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I change window size to "large" And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers: diff --git a/grade/report/grader/tests/behat/switch_views.feature b/grade/report/grader/tests/behat/switch_views.feature index db1d5b7724b..09ecf628e1c 100644 --- a/grade/report/grader/tests/behat/switch_views.feature +++ b/grade/report/grader/tests/behat/switch_views.feature @@ -46,7 +46,7 @@ Feature: We can change what we are viewing on the grader report And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1" And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2" @@ -60,7 +60,7 @@ Feature: We can change what we are viewing on the grader report And I open "Test assignment name 2" actions menu And I click on "Hide" "link" in the "Test assignment name 2" activity And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "Grader report" from the "Grade report" singleselect And I should see "Test assignment name 1" And I should see "Test assignment name 2" @@ -97,7 +97,7 @@ Feature: We can change what we are viewing on the grader report And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "Grader report" from the "Grade report" singleselect And I should see "Test assignment name 1" And I should see "Test assignment name 2" diff --git a/grade/report/history/tests/behat/basic_functionality.feature b/grade/report/history/tests/behat/basic_functionality.feature index 0cfc9057e96..a488922c9f3 100644 --- a/grade/report/history/tests/behat/basic_functionality.feature +++ b/grade/report/history/tests/behat/basic_functionality.feature @@ -30,7 +30,7 @@ Feature: A teacher checks the grade history report in a course And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Rewarding assignment | | Description | After writing your behat test go grab a beer! | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever" And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment" @@ -40,7 +40,7 @@ Feature: A teacher checks the grade history report in a course And I log out And I log in as "teacher2" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever" And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment" diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index 22aba02e7fa..f2158da1b0e 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -52,7 +52,7 @@ Feature: We can use Single view | gradereport/singleview:view | Allow | teacher | Course | C1 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" @javascript Scenario: I can update grades, add feedback and exclude grades. @@ -97,7 +97,7 @@ Feature: We can use Single view And I log out And I log in as "teacher2" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on "Single view" "option" And I click on "Student 4" "option" And the "Exclude for Test assignment one" "checkbox" should be disabled diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index 01794bf53aa..d7b270c3a97 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -35,7 +35,7 @@ Feature: View the user report as the student will see it And I navigate to "Gradebook setup" node in "Course administration" And I hide the grade item "Test assignment six" And I hide the grade item "Sub category 2" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I change window size to "large" And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" @@ -83,7 +83,7 @@ Feature: View the user report as the student will see it And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | - | 80.00 | 0–100 | 80.00 % | - | @@ -121,7 +121,7 @@ Feature: View the user report as the student will see it And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 26.67 % | @@ -159,7 +159,7 @@ Feature: View the user report as the student will see it And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % | @@ -204,7 +204,7 @@ Feature: View the user report as the student will see it And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % | diff --git a/grade/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 9bc1f8f2fa8..7f7b25e4f59 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -12,7 +12,7 @@ Feature: We can use the user report Given I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "User report" from the "Grade report" singleselect And I select "All users (0)" from the "Select all or one user" singleselect Then I should see "No students enrolled in this course yet" diff --git a/grade/tests/behat/grade_UI_settings.feature b/grade/tests/behat/grade_UI_settings.feature index e01b9282c7c..1618704c537 100644 --- a/grade/tests/behat/grade_UI_settings.feature +++ b/grade/tests/behat/grade_UI_settings.feature @@ -20,7 +20,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on @javascript @@ -32,7 +32,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I press "Save changes" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on "Edit assign Assignment1" "link" And I should not see "Minimum grade" @@ -44,7 +44,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I press "Save changes" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then "Edit calculation for Course total" "link" should not exist @javascript @@ -55,5 +55,5 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I press "Save changes" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And "tr .course input[type='text']" "css_element" should not exist diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index 54c2cb7d1fc..dcbbd5c3b7d 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -42,7 +42,7 @@ Feature: We can use calculated grade totals And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I change window size to "large" And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one" @@ -253,12 +253,12 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu Then I should see "114.82 (18.27 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I expand "Setup" node And I follow "Gradebook setup" And I set the following settings for grade item "Test outcome item one": @@ -267,12 +267,12 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu Then I should see "114.00 (18.39 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I expand "Setup" node And I follow "Gradebook setup" And I set the following settings for grade item "Course 1": @@ -282,7 +282,7 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu Then I should see "110.00 (17.74 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" Scenario: Natural aggregation on outcome items with modified weights @@ -297,7 +297,7 @@ Feature: We can use calculated grade totals And the following "grade items" exist: | itemname | course | outcome | gradetype | scale | | Test outcome item one | C1 | OT1 | Scale | Test Scale | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I expand "Setup" node And I follow "Gradebook setup" And I set the following settings for grade item "Course 1": @@ -318,7 +318,7 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu Then I should see "4.00 (100.00 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" Scenario: Natural aggregation @@ -363,7 +363,7 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu And I should see "113.75 (23.45 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Contribution to course total | | Test assignment six | 70.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % | @@ -379,7 +379,7 @@ Feature: We can use calculated grade totals And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I set the following settings for grade item "Sub category 1": | Aggregation | Natural | @@ -553,7 +553,7 @@ Feature: We can use calculated grade totals And I log in as "student1" And I follow "Grades" in the user menu And I should see "45.00 (13.85 %)" in the "overview-grade" "table" - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % | diff --git a/grade/tests/behat/grade_aggregation_changes.feature b/grade/tests/behat/grade_aggregation_changes.feature index fd792e0fac9..5f2e6e13839 100644 --- a/grade/tests/behat/grade_aggregation_changes.feature +++ b/grade/tests/behat/grade_aggregation_changes.feature @@ -35,7 +35,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit | 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 am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Grader report" node in "Grade administration" And I turn editing mode on And I follow "Edit Cat mean" diff --git a/grade/tests/behat/grade_average.feature b/grade/tests/behat/grade_average.feature index e52ab6a1480..eefea37bbb6 100644 --- a/grade/tests/behat/grade_average.feature +++ b/grade/tests/behat/grade_average.feature @@ -24,7 +24,7 @@ Feature: Average grades are displayed in the gradebook And I am on site homepage And I follow "Course 1" # Enable averages - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Course grade settings" node in "Grade administration > Setup" And I set the following fields to these values: | Show average | Show | @@ -52,7 +52,7 @@ Feature: Average grades are displayed in the gradebook Scenario: Grade a grade item and ensure the results display correctly in the gradebook # Check the admin grade table - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then I should see "50.00" in the ".avg.r0.lastrow .c1" "css_element" Then I should see "50.00" in the ".avg.r0.lastrow .c2" "css_element" And I log out @@ -61,7 +61,7 @@ Feature: Average grades are displayed in the gradebook And I log in as "student1" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" Then I should see "50.00" in the ".level2.column-grade" "css_element" Then I should see "50.00" in the ".level2.column-average" "css_element" And I log out diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index 3eb9dfe6133..d39b632ee60 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -21,7 +21,7 @@ Feature: Calculated grade items can be used in the gradebook And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" @javascript diff --git a/grade/tests/behat/grade_calculated_grade_items_20150627.feature b/grade/tests/behat/grade_calculated_grade_items_20150627.feature index 1199365a985..6271c9f69b9 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -22,7 +22,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" @javascript diff --git a/grade/tests/behat/grade_calculated_weights.feature b/grade/tests/behat/grade_calculated_weights.feature index e899835dd17..97c4fffe4c0 100644 --- a/grade/tests/behat/grade_calculated_weights.feature +++ b/grade/tests/behat/grade_calculated_weights.feature @@ -30,7 +30,7 @@ Feature: We can understand the gradebook user report And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two" diff --git a/grade/tests/behat/grade_contribution_with_extra_credit.feature b/grade/tests/behat/grade_contribution_with_extra_credit.feature index 7f60a151a62..e59d032ebbb 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -21,7 +21,7 @@ Feature: Extra credit contributions are normalised when going out of bounds | grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural | And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I press "Add grade item" And I set the following fields to these values: @@ -47,7 +47,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2" diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index edcc64a6c97..51f127d110f 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -22,7 +22,7 @@ Feature: We can change the maximum and minimum number of points for manual items And I log in as "teacher1" And I am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I press "Add grade item" And I set the following fields to these values: @@ -37,7 +37,7 @@ Feature: We can change the maximum and minimum number of points for manual items Scenario: Change maximum number of points on a graded item. And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index a85f78028cc..519e7503140 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -35,7 +35,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when When I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three" @@ -44,7 +44,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when | Hidden | 1 | And I press "Save changes" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "User report" from the "Grade report" singleselect And I select "Myself" from the "View report as" singleselect And I select "Student 1" from the "Select all or one user" singleselect @@ -57,7 +57,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when When I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "User report" node in "Grade administration" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | diff --git a/grade/tests/behat/grade_letter_boundary.feature b/grade/tests/behat/grade_letter_boundary.feature index 73c04f1e225..868a2cea133 100644 --- a/grade/tests/behat/grade_letter_boundary.feature +++ b/grade/tests/behat/grade_letter_boundary.feature @@ -22,7 +22,7 @@ Feature: We can customise the letter boundary of a course. | assign | C1 | a1 | Test assignment one | Submit something! | 100 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "Course grade settings" from the "Grade report" singleselect And I set the following fields to these values: | Grade display type | Letter | diff --git a/grade/tests/behat/grade_letter_boundary_20160518.feature b/grade/tests/behat/grade_letter_boundary_20160518.feature index e451824f76e..bd81919ead1 100644 --- a/grade/tests/behat/grade_letter_boundary_20160518.feature +++ b/grade/tests/behat/grade_letter_boundary_20160518.feature @@ -23,7 +23,7 @@ Feature: We can customise the letter boundary of a course. | assign | C1 | a1 | Test assignment one | Submit something! | 100 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I select "Course grade settings" from the "Grade report" singleselect And I set the following fields to these values: | Grade display type | Letter | diff --git a/grade/tests/behat/grade_mingrade.feature b/grade/tests/behat/grade_mingrade.feature index a886c39cb7a..7d720a490b5 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -27,7 +27,7 @@ Feature: We can use a minimum grade different than zero | 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 am on site homepage And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I press "Add grade item" And I set the following fields to these values: @@ -86,7 +86,7 @@ Feature: We can use a minimum grade different than zero And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 2" diff --git a/grade/tests/behat/grade_minmax.feature b/grade/tests/behat/grade_minmax.feature index 971461ad819..f38dbfea36b 100644 --- a/grade/tests/behat/grade_minmax.feature +++ b/grade/tests/behat/grade_minmax.feature @@ -26,7 +26,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | grade_minmaxtouse | Min and max grades as specified in grade item settings | And I am on site homepage And I follow "C1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I press "Add grade item" And I set the following fields to these values: @@ -68,7 +68,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. And I log out And I log in as "teacher1" And I follow "C1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1" And I give the grade "25.00" to the user "Student 1" for the grade item "MI 2" diff --git a/grade/tests/behat/grade_natural_exclude_empty.feature b/grade/tests/behat/grade_natural_exclude_empty.feature index 22c35aaad35..471029907f7 100644 --- a/grade/tests/behat/grade_natural_exclude_empty.feature +++ b/grade/tests/behat/grade_natural_exclude_empty.feature @@ -25,7 +25,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f | assign | C1 | a5 | Test assignment five (extra) | x | 10 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "Gradebook setup" And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | @@ -34,7 +34,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f @javascript Scenario: No weights are overridden and student has all grades present - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -56,7 +56,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f @javascript Scenario: No weights are overridden, student has some grades present - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -77,7 +77,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f @javascript Scenario: No weights are overridden, student has none grades present except for extra credit - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" @@ -102,7 +102,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f | Extra credit | 1 | And I set the following settings for grade item "Test assignment three": | Extra credit | 1 | - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -126,7 +126,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -151,7 +151,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -175,7 +175,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" @@ -199,7 +199,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -226,7 +226,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -252,7 +252,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" diff --git a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature index e3722f39fb4..81bab50f6dd 100644 --- a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature +++ b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature @@ -26,7 +26,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 | assign | C1 | a5 | Test assignment five (extra) | x | 10 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "Gradebook setup" And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | @@ -35,7 +35,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 @javascript Scenario: No weights are overridden and student has all grades present (before the fix 20150619) - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -57,7 +57,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 @javascript Scenario: No weights are overridden, student has some grades present (before the fix 20150619) - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -78,7 +78,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 @javascript Scenario: No weights are overridden, student has none grades present except for extra credit (before the fix 20150619) - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" @@ -103,7 +103,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 | Extra credit | 1 | And I set the following settings for grade item "Test assignment three": | Extra credit | 1 | - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -127,7 +127,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -153,7 +153,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -178,7 +178,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 When I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "50" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" @@ -202,7 +202,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -230,7 +230,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" @@ -257,7 +257,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I set the field "Override weight of Test assignment four (extra)" to "1" And I set the field "Weight of Test assignment four (extra)" to "10" And I press "Save changes" - When I navigate to "Grades" node in "Course administration" + When I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" diff --git a/grade/tests/behat/grade_natural_normalisation.feature b/grade/tests/behat/grade_natural_normalisation.feature index 6f8a16bff37..3bcc6b67cf1 100644 --- a/grade/tests/behat/grade_natural_normalisation.feature +++ b/grade/tests/behat/grade_natural_normalisation.feature @@ -32,7 +32,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota | assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "Gradebook setup" @javascript diff --git a/grade/tests/behat/grade_natural_normalisation_20150619.feature b/grade/tests/behat/grade_natural_normalisation_20150619.feature index 6b488e17207..55ef48ff723 100644 --- a/grade/tests/behat/grade_natural_normalisation_20150619.feature +++ b/grade/tests/behat/grade_natural_normalisation_20150619.feature @@ -33,7 +33,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix | assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "Gradebook setup" @javascript diff --git a/grade/tests/behat/grade_override_letter.feature b/grade/tests/behat/grade_override_letter.feature index 6abdcb9e0d4..42b44ace907 100644 --- a/grade/tests/behat/grade_override_letter.feature +++ b/grade/tests/behat/grade_override_letter.feature @@ -16,7 +16,7 @@ Feature: Grade letters can be overridden | teacher1 | C1 | editingteacher | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I follow "Letters" And I follow "Edit grade letters" diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index f6485ed2d04..c63a8047974 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -71,7 +71,7 @@ Feature: View gradebook when scales are used And I press "Save changes" And I press "Ok" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Course grade settings" node in "Grade administration > Setup" And I set the field "Show weightings" to "Show" And I set the field "Show contribution to course total" to "Show" @@ -108,7 +108,7 @@ Feature: View gradebook when scales are used And I log out And I log in as "student2" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | Contribution to course total | | Test assignment one | B | F–A | 75.00 % | 80.00 % | @@ -154,7 +154,7 @@ Feature: View gradebook when scales are used And I log out And I log in as "student2" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | Contribution to course total | | Test assignment one | B | F–A | 75.00 % | | diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index 216bc05adda..6051ed7b633 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -39,7 +39,7 @@ Feature: Control the aggregation of the scales Scenario Outline: Scales can be excluded from aggregation Given I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on When I give the grade "10" to the user "Student 1" for the grade item "Grade me" And I give the grade "B" to the user "Student 1" for the grade item "Scale me" @@ -60,7 +60,7 @@ Feature: Control the aggregation of the scales And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I follow "User report" And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: @@ -85,7 +85,7 @@ Feature: Control the aggregation of the scales Scenario: Weights of scales cannot be edited when they are not aggregated Given I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on When I set the following settings for grade item "Course 1": | Aggregation | Natural | @@ -100,7 +100,7 @@ Feature: Control the aggregation of the scales And the following config values are set as admin: | grade_includescalesinaggregation | 1 | And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I set the field "Override weight of Grade me" to "1" And the field "Override weight of Grade me" matches value "95.238" diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index f62db0af703..9a5f78a5fce 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -49,7 +49,7 @@ Feature: View gradebook when single item scales are used And I press "Save changes" And I press "Ok" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I navigate to "Course grade settings" node in "Grade administration > Setup" And I set the field "Show weightings" to "Show" And I set the field "Show contribution to course total" to "Show" diff --git a/grade/tests/behat/grade_to_pass.feature b/grade/tests/behat/grade_to_pass.feature index 55ec7b4d799..ad1ed26936a 100644 --- a/grade/tests/behat/grade_to_pass.feature +++ b/grade/tests/behat/grade_to_pass.feature @@ -54,7 +54,7 @@ Feature: We can set the grade to pass value | grade[modgrade_type] | Point | | grade[modgrade_point] | 50 | | Grade to pass | 25 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit assign Test Assignment 1" "link" Then the field "Grade to pass" matches value "25" @@ -64,7 +64,7 @@ Feature: We can set the grade to pass value And I expand all fieldsets And I set the field "Grade to pass" to "30" And I press "Save and return to course" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I click on "Edit assign Test Assignment 1" "link" And the field "Grade to pass" matches value "30" @@ -76,7 +76,7 @@ Feature: We can set the grade to pass value | grade[modgrade_type] | Scale | | grade[modgrade_scale] | Test Scale 1 | | Grade to pass | 3 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit assign Test Assignment 1" "link" And I expand all fieldsets @@ -107,7 +107,7 @@ Feature: We can set the grade to pass value | Submission grade to pass | 40 | | gradinggrade | 20 | | Assessment grade to pass | 10 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit workshop Test Workshop 1 (submission)" "link" And I expand all fieldsets @@ -142,7 +142,7 @@ Feature: We can set the grade to pass value And I add a "Quiz" to section "1" and I fill the form with: | Name | Test Quiz 1 | | Grade to pass | 9.5 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit quiz Test Quiz 1" "link" And I expand all fieldsets @@ -160,7 +160,7 @@ Feature: We can set the grade to pass value | Name | Test Lesson 1 | | Description | Test | | Grade to pass | 90 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit lesson Test Lesson 1" "link" And I expand all fieldsets @@ -179,7 +179,7 @@ Feature: We can set the grade to pass value | Description | Test | | Aggregate type | Average of ratings | | Grade to pass | 90 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit data Test Database 1" "link" And I expand all fieldsets @@ -208,7 +208,7 @@ Feature: We can set the grade to pass value | Description | Test | | Aggregate type | Average of ratings | | Grade to pass | 90 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit forum Test Forum 1" "link" And I expand all fieldsets @@ -227,7 +227,7 @@ Feature: We can set the grade to pass value | Description | Test | | Aggregate type | Average of ratings | | Grade to pass | 90 | - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I click on "Edit glossary Test Glossary 1" "link" And I expand all fieldsets diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index 2632fed99d2..73c1995c3f0 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -51,7 +51,7 @@ Feature: We can enter in grades and view reports from the gradebook And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1" And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2" @@ -66,7 +66,7 @@ Feature: We can enter in grades and view reports from the gradebook And I log out And I log in as "student1" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" Then the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | | Test assignment name 1 | 80.00 | 0–100 | 80.00 % | @@ -93,7 +93,7 @@ Feature: We can enter in grades and view reports from the gradebook And I log out And I log in as "student1" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | | Test assignment name 1 | 41.86 % | 80.00 | 0–100 | 80.00 % | diff --git a/group/tests/behat/update_groups.feature b/group/tests/behat/update_groups.feature index 3779fc748e6..e7b428bb225 100644 --- a/group/tests/behat/update_groups.feature +++ b/group/tests/behat/update_groups.feature @@ -150,4 +150,4 @@ Feature: Automatic updating of groups and groupings And I set the following fields to these values: | Enrolment key | Abcdef-1 | And I press "Save changes" - And I should not see "This enrolment key is already used for another group." \ No newline at end of file + And I should not see "This enrolment key is already used for another group." diff --git a/lang/en/admin.php b/lang/en/admin.php index 50cae402f68..23a2ec83e4b 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -737,8 +737,6 @@ $string['navadduserpostslinks'] = 'Add links to view user posts'; $string['navadduserpostslinks_help'] = 'If enabled two links will be added to each user in the navigation to view discussions the user has started and posts the user has made in forums throughout the site or in specific courses.'; $string['navigationupgrade'] = 'This upgrade introduces two new navigation blocks that will replace these blocks: Administration, Courses, Activities and Participants. If you had set any special permissions on those blocks you should check to make sure everything is behaving as you want it.'; $string['navcourselimit'] = 'Course limit'; -$string['navexpandmycourses'] = 'Show My courses expanded on Dashboard'; -$string['navexpandmycourses_desc'] = 'If enabled, My courses is initially shown expanded in the navigation block on Dashboard.'; $string['navshowfullcoursenames'] = 'Show course full names'; $string['navshowfullcoursenames_help'] = 'If enabled, course full names will be used in the navigation rather than short names.'; $string['navshowfrontpagemods'] = 'Show front page activities in the navigation'; diff --git a/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature b/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature index 478f50e69ad..90c53d7dba9 100644 --- a/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature +++ b/lib/editor/atto/plugins/accessibilitychecker/tests/behat/accessibilitychecker.feature @@ -6,7 +6,7 @@ Feature: Atto accessibility checker Scenario: Images with no alt Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Some plain text

Some more text

" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -32,7 +32,7 @@ Feature: Atto accessibility checker Scenario: Low contrast Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Hard to read

" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -42,7 +42,7 @@ Feature: Atto accessibility checker Scenario: No headings Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.

Jelly beans gingerbread tootsie roll. Sugar plum tiramisu cotton candy toffee pie cotton candy tiramisu. Carrot cake chocolate bar sesame snaps cupcake cake dessert sweet fruitcake wafer. Marshmallow cupcake gingerbread pie sweet candy canes powder gummi bears. Jujubes cake muffin marshmallow candy jelly beans tootsie roll pie. Gummi bears applicake chocolate cake sweet jelly sesame snaps lollipop lollipop carrot cake. Marshmallow cake jelly beans. Jelly beans sesame snaps muffin halvah cookie ice cream candy canes carrot cake. Halvah donut marshmallow tiramisu. Cookie dessert gummi bears. Sugar plum apple pie jelly beans gummi bears tart chupa chups. Liquorice macaroon gummi bears gummies macaroon marshmallow sweet roll cake topping. Lemon drops caramels pie icing danish. Chocolate cake oat cake dessert halvah danish carrot cake apple pie.

" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -52,7 +52,7 @@ Feature: Atto accessibility checker Scenario: Merged cells Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "
Dogs that look good in pants
BreedCoolness
PoodleNOT COOL
Doberman
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -62,7 +62,7 @@ Feature: Atto accessibility checker Scenario: Table missing row/column headers Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "
Dogs that look good in pants
BreedCoolness
PoodleNOT COOL
DobermanCOOL
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" @@ -72,7 +72,7 @@ Feature: Atto accessibility checker Scenario: Table missing caption Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "
BreedCoolness
PoodleNOT COOL
DobermanCOOL
" When I click on "Show more buttons" "button" And I click on "Accessibility checker" "button" diff --git a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature b/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature index 2bb6bb46210..810f999b75f 100644 --- a/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature +++ b/lib/editor/atto/plugins/accessibilityhelper/tests/behat/accessibilityhelper.feature @@ -6,7 +6,7 @@ Feature: Atto accessibility helper Scenario: Images and links Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Some plain text

Image 1

Some link text

" And I select the text in the "Description" Atto editor When I click on "Show more buttons" "button" @@ -22,7 +22,7 @@ Feature: Atto accessibility helper Scenario: Styles Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Some plain text

" When I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor diff --git a/lib/editor/atto/plugins/align/tests/behat/align.feature b/lib/editor/atto/plugins/align/tests/behat/align.feature index f3f724add7b..130389088a8 100644 --- a/lib/editor/atto/plugins/align/tests/behat/align.feature +++ b/lib/editor/atto/plugins/align/tests/behat/align.feature @@ -6,7 +6,7 @@ Feature: Atto align text Scenario: Right align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Fascism

" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -16,14 +16,14 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:right;\"" @javascript Scenario: Left align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Communism

" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -34,14 +34,14 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:left;\"" @javascript Scenario: Center align some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

United Future

" And I click on "Show more buttons" "button" And I select the text in the "Description" Atto editor @@ -51,6 +51,6 @@ Feature: Atto align text And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "style=\"text-align:center;\"" diff --git a/lib/editor/atto/plugins/bold/tests/behat/bold.feature b/lib/editor/atto/plugins/bold/tests/behat/bold.feature index a1d6316a515..7baf1addcc7 100644 --- a/lib/editor/atto/plugins/bold/tests/behat/bold.feature +++ b/lib/editor/atto/plugins/bold/tests/behat/bold.feature @@ -6,7 +6,7 @@ Feature: Atto bold button Scenario: Bold some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Badger" And I select the text in the "Description" Atto editor When I click on "Bold" "button" @@ -15,14 +15,14 @@ Feature: Atto bold button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Badger" @javascript Scenario: Unbold some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Mouse" And I select the text in the "Description" Atto editor When I click on "Bold" "button" @@ -32,6 +32,6 @@ Feature: Atto bold button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "Mouse" And I should see "Mouse" diff --git a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature b/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature index f7d648169ab..9da6cc936d9 100644 --- a/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature +++ b/lib/editor/atto/plugins/charmap/tests/behat/charmap.feature @@ -6,7 +6,7 @@ Feature: Atto charmap button Scenario: Insert symbols Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

1980 Mullet

" And I select the text in the "Description" Atto editor When I click on "Show more buttons" "button" @@ -17,5 +17,5 @@ Feature: Atto charmap button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "ā" diff --git a/lib/editor/atto/plugins/clear/tests/behat/clear.feature b/lib/editor/atto/plugins/clear/tests/behat/clear.feature index 1915c7bffba..c458ee6f2d3 100644 --- a/lib/editor/atto/plugins/clear/tests/behat/clear.feature +++ b/lib/editor/atto/plugins/clear/tests/behat/clear.feature @@ -6,7 +6,7 @@ Feature: Atto clear button Scenario: Clear formatting Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Pisa" And I select the text in the "Description" Atto editor And I click on "Italic" "button" @@ -18,6 +18,6 @@ Feature: Atto clear button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "Pisa" diff --git a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature index 5174ded51b9..88f1aab15b6 100644 --- a/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature +++ b/lib/editor/atto/plugins/collapse/tests/behat/collapse.feature @@ -6,7 +6,7 @@ Feature: Atto collapse button Scenario: Toggle toolbar Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I click on "Show more buttons" "button" Then "Equation editor" "button" should be visible And I click on "Show fewer buttons" "button" diff --git a/lib/editor/atto/plugins/equation/tests/behat/equation.feature b/lib/editor/atto/plugins/equation/tests/behat/equation.feature index a74efe0bfc6..9e219a28126 100644 --- a/lib/editor/atto/plugins/equation/tests/behat/equation.feature +++ b/lib/editor/atto/plugins/equation/tests/behat/equation.feature @@ -6,7 +6,7 @@ Feature: Atto equation editor Scenario: Create an equation Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Equation test

" # Set field on the bottom of page, so equation editor dialogue is visible. And I expand all fieldsets @@ -25,7 +25,7 @@ Feature: Atto equation editor Scenario: Edit an equation Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

\( \pi \)

" # Set field on the bottom of page, so equation editor dialogue is visible. And I expand all fieldsets diff --git a/lib/editor/atto/plugins/html/tests/behat/html.feature b/lib/editor/atto/plugins/html/tests/behat/html.feature index cf4613415a5..1357cfcb0df 100644 --- a/lib/editor/atto/plugins/html/tests/behat/html.feature +++ b/lib/editor/atto/plugins/html/tests/behat/html.feature @@ -6,7 +6,7 @@ Feature: Atto edit HTML Scenario: Edit the html source Given I log in as "admin" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Smurf

" And I click on "Show more buttons" "button" And I click on "HTML" "button" diff --git a/lib/editor/atto/plugins/image/tests/behat/image.feature b/lib/editor/atto/plugins/image/tests/behat/image.feature index 744831de47a..c493d0043b8 100644 --- a/lib/editor/atto/plugins/image/tests/behat/image.feature +++ b/lib/editor/atto/plugins/image/tests/behat/image.feature @@ -9,12 +9,12 @@ Feature: Add images to Atto And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "Description" to "

Image test

" And I select the text in the "Description" Atto editor And I click on "Image" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the Moodle" @@ -42,7 +42,7 @@ Feature: Add images to Atto And the field "Height" matches value "456" And I click on "Save image" "button" And I click on "Update profile" "button" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I select the text in the "Description" Atto editor And I click on "Image" "button" Then the field "Describe this image for someone who cannot see it" matches value "It's the Moodle" @@ -53,7 +53,7 @@ Feature: Add images to Atto Scenario: Manually inserting an image Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

Image: .

" And I select the text in the "Description" Atto editor When I click on "Image" "button" @@ -63,7 +63,7 @@ Feature: Add images to Atto And I press "Save image" And I set the field "Description" to "

Image: Awesome!.

" And I press "Update profile" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I select the text in the "Description" Atto editor And I click on "Image" "button" And the field "Enter URL" matches value "/nothing/again" diff --git a/lib/editor/atto/plugins/indent/tests/behat/indent.feature b/lib/editor/atto/plugins/indent/tests/behat/indent.feature index 39827b2c0f0..fc4a773e151 100644 --- a/lib/editor/atto/plugins/indent/tests/behat/indent.feature +++ b/lib/editor/atto/plugins/indent/tests/behat/indent.feature @@ -6,7 +6,7 @@ Feature: Indent text in Atto Scenario: Indent Given I log in as "admin" And I follow "Profile" in the user menu - When I follow "Edit profile" + When I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

I need some space.

" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,14 +16,14 @@ Feature: Indent text in Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "class=\"editor-indent\"" @javascript Scenario: Indent and outdent Given I log in as "admin" And I follow "Profile" in the user menu - When I follow "Edit profile" + When I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "

I need some space.

" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -34,5 +34,5 @@ Feature: Indent text in Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "class=\"editor-indent\"" diff --git a/lib/editor/atto/plugins/italic/tests/behat/italic.feature b/lib/editor/atto/plugins/italic/tests/behat/italic.feature index cd063f069e7..01770e6174a 100644 --- a/lib/editor/atto/plugins/italic/tests/behat/italic.feature +++ b/lib/editor/atto/plugins/italic/tests/behat/italic.feature @@ -6,7 +6,7 @@ Feature: Atto italic button Scenario: Italicise some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Tower of Pisa" And I select the text in the "Description" Atto editor When I click on "Italic" "button" @@ -15,14 +15,14 @@ Feature: Atto italic button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Tower of Pisa" @javascript Scenario: Toggle italics in some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "GHD - for hair" And I select the text in the "Description" Atto editor When I click on "Italic" "button" @@ -32,6 +32,6 @@ Feature: Atto italic button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should not see "GHD - for hair" And I should see "GHD - for hair" diff --git a/lib/editor/atto/plugins/link/tests/behat/link.feature b/lib/editor/atto/plugins/link/tests/behat/link.feature index 0a0234adaea..4d02eb6d73a 100644 --- a/lib/editor/atto/plugins/link/tests/behat/link.feature +++ b/lib/editor/atto/plugins/link/tests/behat/link.feature @@ -9,12 +9,12 @@ Feature: Add links to Atto And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" When I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Super cool" And I select the text in the "Description" Atto editor And I click on "Link" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" And I click on "Update profile" "button" @@ -22,6 +22,6 @@ Feature: Add links to Atto And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Super cool" diff --git a/lib/editor/atto/plugins/media/tests/behat/media.feature b/lib/editor/atto/plugins/media/tests/behat/media.feature index f558f9e4615..5c1326a0bed 100644 --- a/lib/editor/atto/plugins/media/tests/behat/media.feature +++ b/lib/editor/atto/plugins/media/tests/behat/media.feature @@ -16,7 +16,7 @@ Feature: Add media to Atto And I set the field "Entry title" to "The best video in the entire world (not really)" And I click on "Media" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.webm" "link" And I click on "Select this file" "button" And I set the field "Enter name" to "It's the logo" diff --git a/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature b/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature index 65393cb829c..548d9c21c3a 100644 --- a/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature +++ b/lib/editor/atto/plugins/orderedlist/tests/behat/orderedlist.feature @@ -6,7 +6,7 @@ Feature: Atto ordered list button Scenario: Make a list from some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Have you heard the news everyone's talking
Life is good 'cause everything's awesome
" And I select the text in the "Description" Atto editor When I click on "Ordered list" "button" @@ -15,6 +15,6 @@ Feature: Atto ordered list button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "
  1. Have you heard the news everyone's talking" diff --git a/lib/editor/atto/plugins/strike/tests/behat/strike.feature b/lib/editor/atto/plugins/strike/tests/behat/strike.feature index dba4d44bb07..5c38924b921 100644 --- a/lib/editor/atto/plugins/strike/tests/behat/strike.feature +++ b/lib/editor/atto/plugins/strike/tests/behat/strike.feature @@ -6,7 +6,7 @@ Feature: Atto strike button Scenario: Strike some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "MUA" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,6 +16,6 @@ Feature: Atto strike button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "MUA" diff --git a/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature b/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature index 9569b07569a..8581a8bfc9b 100644 --- a/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature +++ b/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature @@ -6,7 +6,7 @@ Feature: Atto subscript button Scenario: Subscript some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Submarine" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,14 +16,14 @@ Feature: Atto subscript button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Submarine" @javascript Scenario: Subscript some text in enclosed in superscript Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Submarine" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -33,6 +33,6 @@ Feature: Atto subscript button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Submarine" diff --git a/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature b/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature index 72ce449397a..2e3ed49cfff 100644 --- a/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature +++ b/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature @@ -6,7 +6,7 @@ Feature: Atto superscript button Scenario: Subscript some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Helicopter" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,14 +16,14 @@ Feature: Atto superscript button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Helicopter" @javascript Scenario: Superscript some text that is enclosed in subscript Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Helicopter" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -33,6 +33,6 @@ Feature: Atto superscript button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Helicopter" diff --git a/lib/editor/atto/plugins/title/tests/behat/title.feature b/lib/editor/atto/plugins/title/tests/behat/title.feature index 4f36ea82ac5..527f28456d9 100644 --- a/lib/editor/atto/plugins/title/tests/behat/title.feature +++ b/lib/editor/atto/plugins/title/tests/behat/title.feature @@ -6,7 +6,7 @@ Feature: Atto title Scenario: Create a heading Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "How The Rock Has Made the WWE World Heavyweight Title More Important Than Ever" And I select the text in the "Description" Atto editor When I click on "Paragraph styles" "button" @@ -16,6 +16,6 @@ Feature: Atto title And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "

    How The Rock" diff --git a/lib/editor/atto/plugins/underline/tests/behat/underline.feature b/lib/editor/atto/plugins/underline/tests/behat/underline.feature index f4dd9917ce5..c30716cecb1 100644 --- a/lib/editor/atto/plugins/underline/tests/behat/underline.feature +++ b/lib/editor/atto/plugins/underline/tests/behat/underline.feature @@ -6,7 +6,7 @@ Feature: Atto underline button Scenario: Underline some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Deprecated HTML Tag" And I select the text in the "Description" Atto editor And I click on "Show more buttons" "button" @@ -16,6 +16,6 @@ Feature: Atto underline button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "Deprecated HTML Tag" diff --git a/lib/editor/atto/plugins/unorderedlist/tests/behat/unorderedlist.feature b/lib/editor/atto/plugins/unorderedlist/tests/behat/unorderedlist.feature index 8dcf84fddbc..fdaaa7c7e3c 100644 --- a/lib/editor/atto/plugins/unorderedlist/tests/behat/unorderedlist.feature +++ b/lib/editor/atto/plugins/unorderedlist/tests/behat/unorderedlist.feature @@ -6,7 +6,7 @@ Feature: Atto unordered list button Scenario: Make a list from some text Given I log in as "admin" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I set the field "Description" to "Things, dogs, clogs, they're awesome
    Rocks, clocks, and socks, they're awesome
    Figs, and wigs, and twigs, that's awesome
    Everything you see or think or say is awesome" And I select the text in the "Description" Atto editor When I click on "Unordered list" "button" @@ -15,6 +15,6 @@ Feature: Atto unordered list button And I follow "Editor preferences" And I set the field "Text editor" to "Plain text area" And I press "Save changes" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" Then I should see "
    • Things, dogs, clogs" diff --git a/lib/editor/atto/tests/behat/autosave.feature b/lib/editor/atto/tests/behat/autosave.feature index 2f3d17ceacb..7a413eaed5c 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -62,7 +62,7 @@ Feature: Atto Autosave And I select the text in the "Course summary" Atto editor And I click on "Image" "button" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image" to "It's the Moodle" diff --git a/lib/form/advcheckbox.php b/lib/form/advcheckbox.php index 66316c96d76..4b9a724cf98 100644 --- a/lib/form/advcheckbox.php +++ b/lib/form/advcheckbox.php @@ -88,6 +88,7 @@ class MoodleQuickForm_advcheckbox extends HTML_QuickForm_advcheckbox implements } parent::__construct($elementName, $elementLabel, $text, $attributes, $values); + $this->_type = 'advcheckbox'; } /** diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 622ddfa57bc..76be37be26a 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -3698,13 +3698,15 @@ class flat_navigation extends navigation_node_collection { $url = new moodle_url('/course/view.php', array('id' => $course->id)); $flat = new flat_navigation_node(navigation_node::create($course->shortname, $url), 0); $flat->key = 'coursehome'; - $this->add($flat); $coursenode = $PAGE->navigation->find_active_node(); - while ($coursenode->type != navigation_node::TYPE_COURSE) { + while (!empty($coursenode) && ($coursenode->type != navigation_node::TYPE_COURSE)) { $coursenode = $coursenode->parent; } - if ($coursenode) { + // There is one very strange page in mod/feedback/view.php which thinks it is both site and course + // context at the same time. That page is broken but we need to handle it (hence the SITEID). + if ($coursenode && $coursenode->key != SITEID) { + $this->add($flat); foreach ($coursenode->children as $child) { if ($child->action) { $flat = new flat_navigation_node($child, 0); diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php index 1455857d583..edc4cca71a1 100644 --- a/lib/tests/behat/behat_general.php +++ b/lib/tests/behat/behat_general.php @@ -86,6 +86,15 @@ class behat_general extends behat_base { $this->getSession()->visit($this->locate_path('/?redirect=0')); } + /** + * Opens course index page. + * + * @Given /^I am on course index$/ + */ + public function i_am_on_course_index() { + $this->getSession()->visit($this->locate_path('/course/index.php')); + } + /** * Reloads the current page. * diff --git a/lib/tests/behat/behat_permissions.php b/lib/tests/behat/behat_permissions.php index 67943bbf327..76cb49b54bc 100644 --- a/lib/tests/behat/behat_permissions.php +++ b/lib/tests/behat/behat_permissions.php @@ -82,7 +82,7 @@ class behat_permissions extends behat_base { ); if (!$this->running_javascript()) { - $this->execute("behat_forms::press_button", get_string('go')); + $this->execute("behat_general::i_click_on_in_the", [get_string('go'), 'button', 'region-main', 'region']); } $this->execute("behat_permissions::i_fill_the_capabilities_form_with_the_following_permissions", $table); diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 6c71317f254..876dcbe3a42 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -3,6 +3,7 @@ information provided here is intended especially for developers. === 3.2 === +* Admin setting "Show My courses expanded on Dashboard" has been removed. * MForms element 'submitlink' has been deprecated. * Node.js versions >=4 are now required to run grunt. * JQuery has been updated to 3.1.0. JQuery migrate plugins are no longer shipped - please read diff --git a/login/tests/behat/change_password.feature b/login/tests/behat/change_password.feature index 93ffb843a82..0bddba3dd9f 100644 --- a/login/tests/behat/change_password.feature +++ b/login/tests/behat/change_password.feature @@ -20,7 +20,7 @@ Feature: Change password And I click on "Save changes" "button" Then I should see "Password has been changed" And I click on "Continue" "button" - And I should see "Preferences" in the "#region-main" "css_element" + And I should see "Preferences" in the "region-main" "region" And I log out And I follow "Log in" And I set the field "Username" to "testuser" diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index 98c0a3aca45..aa068197c8c 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -26,6 +26,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading Then I should see "Changes saved" And I follow "Test ghostscript path" And I should see "The ghostscript path appears to be OK" + And I press "Continue" And I log out And I log in as "teacher1" And I follow "Course 1" diff --git a/mod/assign/feedback/file/tests/behat/feedback_file.feature b/mod/assign/feedback/file/tests/behat/feedback_file.feature index cdd2a026916..0cad53e21df 100644 --- a/mod/assign/feedback/file/tests/behat/feedback_file.feature +++ b/mod/assign/feedback/file/tests/behat/feedback_file.feature @@ -60,7 +60,7 @@ Feature: In an assignment, teacher can submit feedback files during grading Given I set the field "applytoall" to "0" And I press "Save changes" And I click on "Ok" "button" - And I follow "Course 1" + And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element" And I log out And I log in as "student1" And I follow "Course 1" @@ -76,7 +76,7 @@ Feature: In an assignment, teacher can submit feedback files during grading Scenario: A teacher can provide a feedback file when grading an assignment and all students in the group will receive the file. Given I press "Save changes" And I click on "Ok" "button" - And I follow "Course 1" + And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element" And I log out And I log in as "student1" And I follow "Course 1" @@ -86,4 +86,4 @@ Feature: In an assignment, teacher can submit feedback files during grading When I log in as "student2" And I follow "Course 1" And I follow "Test assignment name" - Then I should see "feedback.txt" \ No newline at end of file + Then I should see "feedback.txt" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index f8527bdbc8b..0028337ceb6 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -38,14 +38,14 @@ Feature: In an assignment, the administrator can edit students' submissions And I follow "Test assignment name" And I follow "View all submissions" And I click on "Edit" "link" in the "Student 1" "table_row" - And I follow "Edit submission" + And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | Have you seen the movie Chef? | And I press "Save changes" And I follow "View all submissions" Then I should see "Have you seen the movie Chef?" And I click on "Edit" "link" in the "Student 1" "table_row" - And I follow "Edit submission" + And I choose "Edit submission" in the open action menu And I set the following fields to these values: | Online text | I have seen the movie chef. | And I press "Save changes" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 8dc65dbc037..a008b17879d 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -36,7 +36,7 @@ Feature: Outcome grading And I press "Save changes" And I am on site homepage And I follow "Course 1" - And I follow "Outcomes" + And I navigate to "Outcomes" node in "Course 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 85a6aefe596..854325e871a 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -65,7 +65,7 @@ Feature: In an assignment, teachers grade multiple students on one page | enableoutcomes | 1 | When I log in as "teacher1" And I follow "Course 1" - And I follow "Outcomes" + And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" And I follow "Add a new scale" @@ -74,7 +74,7 @@ Feature: In an assignment, teachers grade multiple students on one page | Scale | Noob, Nub, 1337, HaXor | And I press "Save changes" And I follow "Course 1" - And I follow "Outcomes" + And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" And I set the following fields to these values: @@ -133,7 +133,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should see "I'm the teacher first feedback" And I should see "60.0" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I should see "1337" And I log out And I log in as "student2" @@ -142,7 +142,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should not see "I'm the teacher first feedback" And I should not see "60.0" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I should not see "1337" And I log out And I log in as "teacher1" @@ -172,7 +172,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should see "I'm the teacher first feedback" And I should see "60.0" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I should see "1337" And I log out And I log in as "student2" @@ -181,5 +181,5 @@ Feature: In an assignment, teachers grade multiple students on one page And I should not see "I'm the teacher first feedback" And I should not see "60.0" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I should not see "1337" diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index 35d7967415b..548cf29bc36 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -80,7 +80,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "User report" Then I should see "50" And I should see "Great job! Lol, not really." @@ -108,7 +108,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log out And I log in as "student1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I set the field "Grade report" to "User report" Then I should see "50" And I should see "Great job! Lol, not really." diff --git a/mod/data/tests/behat/view_entries.feature b/mod/data/tests/behat/view_entries.feature index 92018305fe6..b8b5eabeaea 100644 --- a/mod/data/tests/behat/view_entries.feature +++ b/mod/data/tests/behat/view_entries.feature @@ -50,7 +50,7 @@ Feature: Users can view and search database entries And I follow "Next" And I should see "Teacher entry 2" And I should not see "Teacher entry 1" - And I follow "3" + And I click on "3" "link" in the "region-main" "region" And I should see "Teacher entry 3" And I should not see "Teacher entry 2" And I follow "Previous" diff --git a/mod/feedback/tests/behat/anonymous.feature b/mod/feedback/tests/behat/anonymous.feature index f18b618e426..70adbe3f840 100644 --- a/mod/feedback/tests/behat/anonymous.feature +++ b/mod/feedback/tests/behat/anonymous.feature @@ -28,8 +28,8 @@ Feature: Anonymous feedback | feedback | Course feedback | C1 | feedback1 | 1 | 1 | When I log in as "manager" And I am on site homepage - And I follow "Site feedback" - And I follow "Edit questions" + And I navigate to "Site feedback" node in "Site pages" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | | Label | multichoice2 | @@ -48,7 +48,7 @@ Feature: Anonymous feedback Scenario: Complete anonymous feedback on the front page as an authenticated user And I log in as "user1" And I am on site homepage - When I follow "Site feedback" + When I navigate to "Site feedback" node in "Site pages" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -69,7 +69,7 @@ Feature: Anonymous feedback And I log out And I log in as "user1" And I am on site homepage - When I follow "Site feedback" + When I navigate to "Site feedback" node in "Site pages" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -81,7 +81,7 @@ Feature: Anonymous feedback And I log out And I log in as "user2" And I am on site homepage - When I follow "Site feedback" + And I navigate to "Site feedback" node in "Site pages" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -100,7 +100,7 @@ Feature: Anonymous feedback And I log out And I log in as "manager" And I am on site homepage - And I follow "Site feedback" + And I navigate to "Site feedback" node in "Site pages" And I follow "Show responses" And I should not see "Username" And I should see "Anonymous entries (2)" @@ -165,7 +165,7 @@ Feature: Anonymous feedback And I should see "1 (50.00 %)" in the "No" "table_row" And I log in as "manager" And I am on site homepage - And I follow "Site feedback" + And I navigate to "Site feedback" node in "Site pages" And I follow "Show responses" And I should see "Anonymous entries (2)" And I follow "Response number: 1" @@ -178,7 +178,7 @@ Feature: Anonymous feedback When I log in as "teacher" And I follow "Course 1" And I follow "Course feedback" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | | Label | multichoice1 | @@ -236,7 +236,7 @@ Feature: Anonymous feedback And I should see "Response number: 2 (Anonymous)" And I should see "Prev" And I should not see "Next" - And I follow "Back" + And I click on "Back" "link" in the "[role=main]" "css_element" # Delete anonymous response And I click on "Delete entry" "link" in the "Response number: 1" "table_row" And I press "Yes" diff --git a/mod/feedback/tests/behat/coursemapping.feature b/mod/feedback/tests/behat/coursemapping.feature index 8943c07550b..fbb80664243 100644 --- a/mod/feedback/tests/behat/coursemapping.feature +++ b/mod/feedback/tests/behat/coursemapping.feature @@ -36,8 +36,8 @@ Feature: Mapping courses in a feedback | feedback | Another feedback | C1 | feedback1 | 1 | 1 | When I log in as "manager" And I am on site homepage - And I follow "Course feedback" - And I follow "Edit questions" + And I navigate to "Course feedback" node in "Site pages" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | | Label | info | @@ -77,7 +77,7 @@ Feature: Mapping courses in a feedback Scenario: Site feedback is not mapped to any course And I log in as "user1" And I am on site homepage - And I follow "Course feedback" + And I navigate to "Course feedback" node in "Site pages" And I follow "Answer the questions..." And I should see "Acceptance test site" in the ".feedback_form" "css_element" And I set the following fields to these values: @@ -112,7 +112,7 @@ Feature: Mapping courses in a feedback And I log out And I log in as "manager" And I am on site homepage - And I follow "Course feedback" + And I navigate to "Course feedback" node in "Site pages" And I follow "Analysis" And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" @@ -124,7 +124,7 @@ Feature: Mapping courses in a feedback And I follow "Sort by course" And I should see "2.50" in the "C1" "table_row" And I should see "1.00" in the "Acceptance test site" "table_row" - And I follow "Back" + And I click on "Back" "link" in the "region-main" "region" And I set the field "Filter by course" to "Course 1" And I press "Filter" And I should see "Course 1" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" @@ -138,7 +138,7 @@ Feature: Mapping courses in a feedback Scenario: Site feedback is mapped to courses And I log in as "manager" And I am on site homepage - And I follow "Course feedback" + And I navigate to "Course feedback" node in "Site pages" And I follow "Map feedback to courses" And I set the field "Courses" to "Course 2" And I set the field "Courses" to "Course 3" @@ -147,7 +147,7 @@ Feature: Mapping courses in a feedback And I log in as "user1" And I am on site homepage - And I follow "Course feedback" + And I navigate to "Course feedback" node in "Site pages" And I should see "You can only access this feedback from a course" And I should not see "Answer the questions..." @@ -196,7 +196,7 @@ Feature: Mapping courses in a feedback And I log out And I log in as "manager" And I am on site homepage - And I follow "Course feedback" + And I navigate to "Course feedback" node in "Site pages" And I follow "Analysis" And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback @@ -207,7 +207,7 @@ Feature: Mapping courses in a feedback And I click on "Sort by course" "link" And I should see "3.00" in the "C3" "table_row" And I should see "2.50" in the "C2" "table_row" - And I follow "Back" + And I click on "Back" "link" in the "region-main" "region" And I set the field "Filter by course" to "Course 2" And I press "Filter" And I show chart data for the "multichoicerated" feedback @@ -234,8 +234,9 @@ Feature: Mapping courses in a feedback Scenario: Site feedback deletion hides feedback block completely When I log in as "manager" And I am on site homepage - And I follow "Turn editing on" + And I turn editing mode on And I add the "Feedback" block + And I add the "Main menu" block And I click on "Delete" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'Course feedback')]" "xpath_element" And I press "Yes" And I follow "Turn editing off" diff --git a/mod/feedback/tests/behat/export_import.feature b/mod/feedback/tests/behat/export_import.feature index 63484185bd5..9ad877a6129 100644 --- a/mod/feedback/tests/behat/export_import.feature +++ b/mod/feedback/tests/behat/export_import.feature @@ -24,7 +24,7 @@ Feature: Exporting and importing feedbacks When I log in as "teacher" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | | Label | info | @@ -76,7 +76,7 @@ Feature: Exporting and importing feedbacks When I log in as "teacher" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Numeric answer" question to the feedback with: | Question | Existing question | | Label | numeric | @@ -85,7 +85,7 @@ Feature: Exporting and importing feedbacks And I follow "Import questions" And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager And I press "Yes" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" Then I should not see "Existing question" And I should see "this is an information question" And I should see "label text" @@ -103,7 +103,7 @@ Feature: Exporting and importing feedbacks When I log in as "teacher" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Numeric answer" question to the feedback with: | Question | Existing question | | Label | numeric | @@ -113,7 +113,7 @@ Feature: Exporting and importing feedbacks And I set the field "Append new items" to "1" And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager And I press "Yes" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" Then I should see "Existing question" And "Existing question" "text" should appear before "this is an information question" "text" And I should see "this is an information question" diff --git a/mod/feedback/tests/behat/groups.feature b/mod/feedback/tests/behat/groups.feature index 181188d6cbe..359e17fc989 100644 --- a/mod/feedback/tests/behat/groups.feature +++ b/mod/feedback/tests/behat/groups.feature @@ -52,8 +52,8 @@ Feature: Feedbacks in courses with groups | feedback | Course anon feedback | C1 | feedback2 | 1 | 1 | 1 | When I log in as "manager" And I am on site homepage - And I follow "Site feedback" - And I follow "Edit questions" + And I navigate to "Site feedback" node in "Site pages" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | | Label | multichoice2 | @@ -67,7 +67,7 @@ Feature: Feedbacks in courses with groups When I log in as "teacher" And I follow "Course 1" And I follow "Course feedback" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | | Label | multichoice1 | @@ -170,7 +170,7 @@ Feature: Feedbacks in courses with groups When I log in as "teacher" And I follow "Course 1" And I follow "Course anon feedback" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | | Label | multichoice1 | diff --git a/mod/feedback/tests/behat/multichoice.feature b/mod/feedback/tests/behat/multichoice.feature index dc20d35562d..3468d1bbcc5 100644 --- a/mod/feedback/tests/behat/multichoice.feature +++ b/mod/feedback/tests/behat/multichoice.feature @@ -24,7 +24,7 @@ Feature: Testing multichoice questions in feedback And I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" @javascript Scenario: Non-rated single-answer multiple choice questions in feedback @@ -157,7 +157,7 @@ Feature: Testing multichoice questions in feedback And I should not see "%" in the "option h" "table_row" And I should see "1 (100.00 %)" in the "option i" "table_row" # Change the settings so we don't analyse empty submits - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" @@ -301,7 +301,7 @@ Feature: Testing multichoice questions in feedback And I should not see "%" in the "option h" "table_row" And I should see "1 (100.00 %)" in the "option i" "table_row" # Change the settings so we don't analyse empty submits - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" @@ -424,7 +424,7 @@ Feature: Testing multichoice questions in feedback And I should not see "%" in the "option h" "table_row" And I should see "1 (100.00 %)" in the "option i" "table_row" # Change the settings so we don't analyse empty submits - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" And I choose "Edit question" in the open action menu And I set the field "Do not analyse empty submits" to "Yes" diff --git a/mod/feedback/tests/behat/non_anonymous.feature b/mod/feedback/tests/behat/non_anonymous.feature index f657f773109..98419388450 100644 --- a/mod/feedback/tests/behat/non_anonymous.feature +++ b/mod/feedback/tests/behat/non_anonymous.feature @@ -28,8 +28,8 @@ Feature: Non anonymous feedback | feedback | Course feedback | C1 | feedback1 | 2 | 1 | When I log in as "manager" And I am on site homepage - And I follow "Site feedback" - And I follow "Edit questions" + And I navigate to "Site feedback" node in "Site pages" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like our site? | | Label | multichoice2 | @@ -48,7 +48,7 @@ Feature: Non anonymous feedback Scenario: Complete non anonymous feedback on the front page as an authenticated user And I log in as "user1" And I am on site homepage - When I follow "Site feedback" + And I navigate to "Site feedback" node in "Site pages" And I follow "Preview" And I should see "Do you like our site?" And I press "Continue" @@ -69,7 +69,7 @@ Feature: Non anonymous feedback And I log out And I log in as "user1" And I am on site homepage - When I follow "Site feedback" + When I navigate to "Site feedback" node in "Site pages" And I follow "Answer the questions..." And I should see "Do you like our site?" And I set the following fields to these values: @@ -78,7 +78,7 @@ Feature: Non anonymous feedback And I log out And I log in as "user2" And I am on site homepage - When I follow "Site feedback" + When I navigate to "Site feedback" node in "Site pages" And I follow "Answer the questions..." And I set the following fields to these values: | Not at all | 1 | @@ -95,7 +95,7 @@ Feature: Non anonymous feedback And I log out And I log in as "manager" And I am on site homepage - And I follow "Site feedback" + And I navigate to "Site feedback" node in "Site pages" And I follow "Show responses" And I should see "Username" And I should see "Non anonymous entries (2)" @@ -111,7 +111,7 @@ Feature: Non anonymous feedback When I log in as "teacher" And I follow "Course 1" And I follow "Course feedback" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | | Label | multichoice1 | @@ -163,7 +163,7 @@ Feature: Non anonymous feedback And I should see "(Username 2)" And I should not see "Next" And I should see "Prev" - And I follow "Back" + And I click on "Back" "link" in the "region-main" "region" # Delete non anonymous response And I click on "Delete entry" "link" in the "Username 1" "table_row" And I press "Yes" diff --git a/mod/feedback/tests/behat/question_types.feature b/mod/feedback/tests/behat/question_types.feature index 1fddcc3e1c0..96206aa6dc1 100644 --- a/mod/feedback/tests/behat/question_types.feature +++ b/mod/feedback/tests/behat/question_types.feature @@ -25,7 +25,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | | Label | info | diff --git a/mod/feedback/tests/behat/question_types_non_anon.feature b/mod/feedback/tests/behat/question_types_non_anon.feature index 834a146af92..51d2ef2ac9d 100644 --- a/mod/feedback/tests/behat/question_types_non_anon.feature +++ b/mod/feedback/tests/behat/question_types_non_anon.feature @@ -25,7 +25,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f When I log in as "teacher1" And I follow "Course 1" And I follow "Learning experience" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | | Label | info | diff --git a/mod/feedback/tests/behat/show_nonrespondents.feature b/mod/feedback/tests/behat/show_nonrespondents.feature index 73b40cb4308..1d3d63779cb 100644 --- a/mod/feedback/tests/behat/show_nonrespondents.feature +++ b/mod/feedback/tests/behat/show_nonrespondents.feature @@ -46,7 +46,7 @@ Feature: Show users who have not responded to the feedback survey | Record user names | User's name will be logged and shown with answers | | Access restrictions | Grouping: GX1 | And I follow "Frogs" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I set the field "Add question" to "Short text answer" And I set the following fields to these values: | Question | Y/N? | diff --git a/mod/feedback/tests/behat/templates.feature b/mod/feedback/tests/behat/templates.feature index dbf7e1d467b..ae65cf53868 100644 --- a/mod/feedback/tests/behat/templates.feature +++ b/mod/feedback/tests/behat/templates.feature @@ -28,7 +28,7 @@ Feature: Saving, using and deleting feedback templates And I log in as "teacher" And I follow "Course 1" And I follow "Learning experience course 1" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | this is a multiple choice 1 | | Label | multichoice1 | @@ -84,7 +84,7 @@ Feature: Saving, using and deleting feedback templates # Add questions to another feedback And I follow "Course 1" And I follow "Another feedback in course 1" - And I follow "Edit questions" + And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | What is your favourite subject | | Label | subjectchoice | @@ -169,7 +169,7 @@ Feature: Saving, using and deleting feedback templates And I am on site homepage And I follow "Course 1" And I follow "Learning experience course 1" - And I follow "Templates" + And I click on "Templates" "link" in the "[role=main]" "css_element" And I set the field "Name" to "My public template" And I set the field "Public" to "1" And I press "Save as new template" diff --git a/mod/forum/tests/behat/advanced_search.feature b/mod/forum/tests/behat/advanced_search.feature index e38968ee16c..03c5e10fd85 100644 --- a/mod/forum/tests/behat/advanced_search.feature +++ b/mod/forum/tests/behat/advanced_search.feature @@ -20,6 +20,8 @@ Feature: The forum search allows users to perform advanced searches for forum po | student1 | C1 | student | And I log in as "teacher1" And I follow "Course 1" + And I turn editing mode on + And I add the "Latest announcements" block And I navigate to "Edit settings" node in "Course administration" And I set the field "id_newsitems" to "1" And I press "Save and display" diff --git a/mod/forum/tests/behat/edit_post_student.feature b/mod/forum/tests/behat/edit_post_student.feature index 8f42c7fb1eb..d73f74b0982 100644 --- a/mod/forum/tests/behat/edit_post_student.feature +++ b/mod/forum/tests/behat/edit_post_student.feature @@ -52,6 +52,7 @@ Feature: Students can edit or delete their forum posts within a set time limit And I am on site homepage And I follow "Course 1" And I turn editing mode on + And I add the "Recent activity" block And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | diff --git a/mod/lesson/tests/behat/duplicate_lesson_page.feature b/mod/lesson/tests/behat/duplicate_lesson_page.feature index 5f7774c3158..779de6d7d9d 100644 --- a/mod/lesson/tests/behat/duplicate_lesson_page.feature +++ b/mod/lesson/tests/behat/duplicate_lesson_page.feature @@ -40,9 +40,9 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page | id_jumpto_1 | Previous page | # Atto needs focus to add image, select empty p tag to do so. And I select the text in the "id_contents_editor" Atto editor - And I click on "Image" "button" in the "#fitem_id_contents_editor" "css_element" + And I click on "Image" "button" in the "[data-fieldtype=editor]" "css_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle_logo.jpg" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the logo" @@ -76,9 +76,9 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page | id_score_1 | 0 | # Atto needs focus to add image, select empty p tag to do so. And I select the text in the "id_answer_editor_0" Atto editor - And I click on "Image" "button" in the "#fitem_id_answer_editor_0" "css_element" + And I click on "Image" "button" in the "//*[@id='id_answer_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle_logo.jpg" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the logo" @@ -113,9 +113,9 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page | id_score_1 | 0 | # Atto needs focus to add image, select empty p tag to do so. And I select the text in the "id_response_editor_0" Atto editor - And I click on "Image" "button" in the "#fitem_id_response_editor_0" "css_element" + And I click on "Image" "button" in the "//*[@id='id_response_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle_logo.jpg" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the logo" diff --git a/mod/lesson/tests/behat/lesson_group_override.feature b/mod/lesson/tests/behat/lesson_group_override.feature index 78f4a862083..868c078e1e3 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -64,7 +64,7 @@ Feature: Lesson user override | deadline[minute] | 00 | And I press "Save" And I should see "Wednesday, 1 January 2020, 8:00" - Then I click on "Edit" "link" + Then I click on "Edit" "link" in the "region-main" "region" And I set the following fields to these values: | deadline[year] | 2030 | And I press "Save" diff --git a/mod/lesson/tests/behat/lesson_practice.feature b/mod/lesson/tests/behat/lesson_practice.feature index 65eeb3d6fb3..49900ff0a38 100644 --- a/mod/lesson/tests/behat/lesson_practice.feature +++ b/mod/lesson/tests/behat/lesson_practice.feature @@ -71,7 +71,7 @@ Feature: Practice mode in a lesson activity And I press "Submit" Then I should not see "View grades" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "Course 1" "table_row" And I should not see "Practice lesson" Scenario: Practice lesson with scale doesn't record grades in the gradebook @@ -92,5 +92,5 @@ Feature: Practice mode in a lesson activity And I press "Submit" Then I should not see "View grades" And I follow "Grades" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "Course 1" "table_row" And I should not see "Practice lesson with scale" diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index 6cd33ce59af..90eb263e6f8 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -57,7 +57,7 @@ Feature: Lesson user override | deadline[minute] | 00 | And I press "Save" And I should see "Wednesday, 1 January 2020, 8:00" - Then I click on "Edit" "link" + Then I click on "Edit" "link" in the "Sam1 Student1" "table_row" And I set the following fields to these values: | deadline[year] | 2030 | And I press "Save" diff --git a/mod/lesson/tests/behat/questions_images.feature b/mod/lesson/tests/behat/questions_images.feature index c83a7c529a1..630ee850a78 100644 --- a/mod/lesson/tests/behat/questions_images.feature +++ b/mod/lesson/tests/behat/questions_images.feature @@ -49,7 +49,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ And I select the text in the "id_answer_editor_2" Atto editor And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_answer_editor_2']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle_logo.jpg" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the logo" @@ -71,7 +71,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ And I select the text in the "id_response_editor_0" Atto editor And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_response_editor_0']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle_logo.jpg" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "It's the logo" diff --git a/mod/quiz/tests/behat/editing_repaginate.feature b/mod/quiz/tests/behat/editing_repaginate.feature index 2d7b438e847..c86865434ce 100644 --- a/mod/quiz/tests/behat/editing_repaginate.feature +++ b/mod/quiz/tests/behat/editing_repaginate.feature @@ -30,7 +30,7 @@ Feature: Edit quiz page - pagination Then I should see "Editing quiz: Quiz 1" # Add the first Essay question. - And I follow "Add" + And I click on "Add" "link" in the "region-main" "region" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" @@ -42,7 +42,7 @@ Feature: Edit quiz page - pagination And I should see "Essay 01 new" on quiz page "1" # Add the second Essay question. - And I follow "Add" + And I click on "Add" "link" in the "region-main" "region" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" @@ -67,7 +67,7 @@ Feature: Edit quiz page - pagination And I should not see "Page 2" # Add the third Essay question. - And I follow "Add" + And I click on "Add" "link" in the "region-main" "region" And I follow "a new question" And I set the field "item_qtype_essay" to "1" And I press "submitbutton" diff --git a/mod/quiz/tests/behat/settings_form_fields_disableif.feature b/mod/quiz/tests/behat/settings_form_fields_disableif.feature index 587e84b7809..431a0fc5e38 100644 --- a/mod/quiz/tests/behat/settings_form_fields_disableif.feature +++ b/mod/quiz/tests/behat/settings_form_fields_disableif.feature @@ -68,7 +68,7 @@ Feature: Settings form fields disabled if not required When I press "Save and display" And I navigate to "User overrides" node in "Quiz administration" - And I follow "Edit" + And I click on "Edit" "link" in the "region-main" "region" And I set the field "Attempts allowed" to "2" And I press "Save" And I navigate to "Edit settings" node in "Quiz administration" diff --git a/mod/wiki/tests/behat/page_history.feature b/mod/wiki/tests/behat/page_history.feature index 49ac414288c..49b38d8de72 100644 --- a/mod/wiki/tests/behat/page_history.feature +++ b/mod/wiki/tests/behat/page_history.feature @@ -61,7 +61,7 @@ Feature: A history of each wiki page is available And I follow "History" And I click on "3" "link" in the "Student 2" "table_row" And I should see "Third edition" - And I should see "Student 2" in the "#region-main" "css_element" + And I should see "Student 2" in the "region-main" "region" And I follow "History" And I click on "comparewith" "radio" in the "Student 1" "table_row" And I click on "compare" "radio" in the "Teacher 1" "table_row" diff --git a/mod/workshop/tests/behat/embedded_images.feature b/mod/workshop/tests/behat/embedded_images.feature index 03f298aa278..29fa1d2f4dd 100644 --- a/mod/workshop/tests/behat/embedded_images.feature +++ b/mod/workshop/tests/behat/embedded_images.feature @@ -31,9 +31,9 @@ Feature: Teachers can embed images into instructions and conclusion fields And I expand all fieldsets And I set the field "Instructions for submission" to "

      Image test

      " And I select the text in the "Instructions for submission" Atto editor - And I click on "Image" "button" in the "#fitem_id_instructauthorseditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructauthorseditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "How to submit" @@ -44,9 +44,9 @@ Feature: Teachers can embed images into instructions and conclusion fields And I expand all fieldsets And I set the field "Instructions for assessment" to "

      Image test

      " And I select the text in the "Instructions for assessment" Atto editor - And I click on "Image" "button" in the "#fitem_id_instructreviewerseditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructreviewerseditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "How to assess" @@ -57,9 +57,9 @@ Feature: Teachers can embed images into instructions and conclusion fields And I expand all fieldsets And I set the field "Conclusion" to "

      Image test

      " And I select the text in the "Conclusion" Atto editor - And I click on "Image" "button" in the "#fitem_id_conclusioneditor" "css_element" + And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_conclusioneditor']]" "xpath_element" And I click on "Browse repositories..." "button" - And I click on "Private files" "link" + And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodlelogo.png" "link" And I click on "Select this file" "button" And I set the field "Describe this image for someone who cannot see it" to "Well done" diff --git a/notes/index.php b/notes/index.php index 6ba0099c6ef..8bff3392321 100644 --- a/notes/index.php +++ b/notes/index.php @@ -103,11 +103,6 @@ if ($userid && $course->id == SITEID) { $PAGE->navbar->add(get_string('notes', 'notes'), $notesurl); } else if ($course->id != SITEID) { $notenode = $PAGE->navigation->find('currentcoursenotes', null)->make_inactive(); - $participantsurl = new moodle_url('/user/view.php', array('id' => $userid, 'course' => $course->id)); - $currentcoursenode = $PAGE->navigation->find('currentcourse', null); - $participantsnode = $currentcoursenode->find('participants', null); - $usernode = $participantsnode->add(fullname($user), $participantsurl); - $usernode->make_active(); $notesurl = new moodle_url('/notes/index.php', array('user' => $userid, 'course' => $courseid)); $PAGE->navbar->add(get_string('notes', 'notes'), $notesurl); diff --git a/report/log/tests/behat/filter_log.feature b/report/log/tests/behat/filter_log.feature index 623ce581a05..96d25f44fca 100644 --- a/report/log/tests/behat/filter_log.feature +++ b/report/log/tests/behat/filter_log.feature @@ -25,7 +25,7 @@ Feature: In a report, admin can filter log data | loglegacy | 1 | logstore_legacy | And I follow "Home" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" @@ -45,7 +45,7 @@ Feature: In a report, admin can filter log data @javascript Scenario: Filter log report for standard log reader Given I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" And I click on "Log in as" "link" And I press "Continue" diff --git a/report/log/tests/behat/user_log.feature b/report/log/tests/behat/user_log.feature index d8be3c70fe5..354c94af047 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -38,7 +38,7 @@ Feature: User can view activity log. Scenario: View Todays' and all log report for user Given I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" When I follow "Today's logs" And I should see "Assignment: Test assignment name" @@ -54,7 +54,7 @@ Feature: User can view activity log. And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 1" When I follow "Today's logs" And I should see "No log reader enabled" diff --git a/report/outline/tests/behat/user.feature b/report/outline/tests/behat/user.feature index b27700ea5e6..98ade5ea365 100644 --- a/report/outline/tests/behat/user.feature +++ b/report/outline/tests/behat/user.feature @@ -48,12 +48,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Outline report" Then I should see "4 views" in the "Folder name" "table_row" And I should see "3 views" in the "URL name" "table_row" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And I follow "Complete report" And I should see "4 views" And I should see "3 views" @@ -76,12 +76,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Outline report" Then I should see "4 views" in the "Folder name" "table_row" And I should see "3 views" in the "URL name" "table_row" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Complete report" And I should see "4 views" And I should see "3 views" @@ -106,12 +106,12 @@ Feature: View the user page for the outline report And I follow "URL name" And I follow "URL name" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Outline report" Then I should see "4 views" in the "Folder name" "table_row" And I should see "3 views" in the "URL name" "table_row" And I follow "Profile" in the user menu - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" When I follow "Complete report" And I should see "4 views" And I should see "3 views" diff --git a/tag/tests/behat/collections.feature b/tag/tests/behat/collections.feature index ad3dd6994e4..0622be17da4 100644 --- a/tag/tests/behat/collections.feature +++ b/tag/tests/behat/collections.feature @@ -86,7 +86,7 @@ Feature: Managers can create and manage tag collections Scenario: Moving tags when changing tag collections And I follow "Preferences" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I set the field "List of interests" to "Swimming, Tag0, Tag3" And I press "Update profile" diff --git a/tag/tests/behat/standard_tags.feature b/tag/tests/behat/standard_tags.feature index ab40ffd8ba8..465c8ed1818 100644 --- a/tag/tests/behat/standard_tags.feature +++ b/tag/tests/behat/standard_tags.feature @@ -90,7 +90,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags Scenario: Changing standard tags property of tag area When I log in as "manager1" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should not see "Manage standard tags" And I set the following fields to these values: @@ -101,7 +101,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags 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 follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should see "Manage standard tags" And I navigate to "Manage tags" node in "Site administration > Appearance" @@ -111,7 +111,7 @@ Feature: Manager can add standard tags and change the tag type of existing tags And I follow "Profile" in the user menu And I should see "Tag3" And I should see "Tag2" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" And I expand all fieldsets And I should see "Manage standard tags" And I press "Update profile" diff --git a/theme/boost/classes/output/core_renderer.php b/theme/boost/classes/output/core_renderer.php index a14ad7d4c90..85cb1e687bd 100644 --- a/theme/boost/classes/output/core_renderer.php +++ b/theme/boost/classes/output/core_renderer.php @@ -550,7 +550,7 @@ class core_renderer extends \core_renderer { $items = $this->page->navbar->get_items(); $node = end($items); $settingsnode = false; - if ($node->key === 'home') { + if (!empty($node) && $node->key === 'home') { $settingsnode = $this->page->settingsnav->find('frontpage', navigation_node::TYPE_SETTING); if ($settingsnode) { // Build an action menu based on the visible nodes from this navigation tree. @@ -564,7 +564,7 @@ class core_renderer extends \core_renderer { $menu->add_secondary_action($link); } } - } else if ($node->type == navigation_node::TYPE_COURSE) { + } else if (!empty($node) && $node->type == navigation_node::TYPE_COURSE) { $settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE); if ($settingsnode) { // Build an action menu based on the visible nodes from this navigation tree. @@ -582,7 +582,7 @@ class core_renderer extends \core_renderer { } else if ($context->contextlevel == CONTEXT_USER) { $items = $this->page->navbar->get_items(); $node = end($items); - if ($node->key === 'myprofile') { + if (!empty($node) && ($node->key === 'myprofile')) { // Get the course admin node from the settings navigation. $node = $this->page->settingsnav->find('useraccount', navigation_node::TYPE_CONTAINER); if ($node) { @@ -607,7 +607,7 @@ class core_renderer extends \core_renderer { if ($context->contextlevel == CONTEXT_MODULE) { $node = $this->page->navigation->find_active_node(); - if (($node->type == navigation_node::TYPE_ACTIVITY || + if (!empty($node) && ($node->type == navigation_node::TYPE_ACTIVITY || $node->type == navigation_node::TYPE_RESOURCE)) { $items = $this->page->navbar->get_items(); diff --git a/theme/boost/layout/columns2.php b/theme/boost/layout/columns2.php index 356c68f113f..840925d14d8 100644 --- a/theme/boost/layout/columns2.php +++ b/theme/boost/layout/columns2.php @@ -25,8 +25,9 @@ defined('MOODLE_INTERNAL') || die(); user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA); +require_once($CFG->libdir . '/behat/lib.php'); -if (isloggedin()) { +if (isloggedin() && !behat_is_test_site()) { $navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true'); } else { $navdraweropen = false; diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index ef54d261383..2918202d07d 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -1,5 +1,10 @@ /* core.less */ +#region-main > .card { + overflow-x: auto; + overflow-y: visible; + min-height: 45rem; +} .context-header-settings-menu, .region-main-settings-menu { @@ -2207,6 +2212,3 @@ $footer-link-color: $brand-primary !default; color: $body-color; } -#region-main > .card { - overflow: auto; -} diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index 1e0a54a70f5..6e5616ee6e8 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -425,10 +425,6 @@ margin-right: 5px; } -.path-course-view .section .summary { - line-height: normal; -} - .path-site li.activity > div, .path-course-view li.activity > div { position: relative; @@ -496,7 +492,6 @@ span.editinstructions { top: 0; margin-top: -22px; margin-left: 30px; - line-height: 16px; font-size: $font-size-sm; padding: .1em .4em; background-color: $state-info-bg; @@ -609,7 +604,6 @@ span.editinstructions { .coursebox > .info > h3.coursename { margin: 5px; - line-height: 1; } .coursebox > .info > .coursename { @@ -827,7 +821,6 @@ span.editinstructions { .listing-actions { text-align: center; padding: 0.4rem 0.3rem 0.3rem; - line-height: 2.2em; > .moodle-actionmenu { display: inline-block; @@ -843,8 +836,7 @@ span.editinstructions { } } - li { - line-height: 2.2em; + .listitem { > div { &:hover { @@ -867,18 +859,7 @@ span.editinstructions { margin-right: 1em; display: inline-block; - > a img, - .menubar img { - margin: 0 4px; - height: 12px; - padding: 0; - vertical-align: inherit; - } - &.show .menu { - li { - line-height: 20px; - } img { width: 12px; @@ -1038,7 +1019,6 @@ span.editinstructions { > * { display: inline-block; - line-height: 2.2rem; } .pair-key { @@ -1115,7 +1095,6 @@ span.editinstructions { > div { display: inline-block; float: right; - line-height: 40px; > div { margin: 10px 0 10px 1em; diff --git a/theme/boost/scss/moodle/debug.scss b/theme/boost/scss/moodle/debug.scss index 10406ff9dc3..9d7ee0dfd19 100644 --- a/theme/boost/scss/moodle/debug.scss +++ b/theme/boost/scss/moodle/debug.scss @@ -3,9 +3,14 @@ // for fixed positioned elements that end up obscuring the item thus // leading to errors that could be avoided by scrolling an additional amount. body.behat-site { - .navbar-fixed-top { + .navbar-static-top { position: absolute; } + + // We need more spacing in action menus so behat does not click on the wrong menu item. + .dropdown-item { + margin-top: 4px ! important; + } } .phpinfo table, diff --git a/theme/boost/scss/moodle/drawer.scss b/theme/boost/scss/moodle/drawer.scss index c5c507ab49f..1c5eb3c3100 100644 --- a/theme/boost/scss/moodle/drawer.scss +++ b/theme/boost/scss/moodle/drawer.scss @@ -10,6 +10,10 @@ $drawer-offscreen-gutter: 20px; padding-top: ($fixed-header-y + 30px) ! important; /* negative fixed header height */ margin-top: -$fixed-header-y ! important; /* negative fixed header height */ } +.pagelayout-embedded :target { + padding-top: initial; + margin-top: initial; +} #nav-drawer.closed { left: -($drawer-width + $drawer-offscreen-gutter); @@ -27,7 +31,7 @@ $drawer-bg: $gray-lighter !default; width: $drawer-width; top: $fixed-header-y; height: 100%; - overflow-y: scroll; + overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: $zindex-dropdown - 1; background-color: $drawer-bg; @@ -42,6 +46,9 @@ $drawer-bg: $gray-lighter !default; #page { margin-top: $fixed-header-y; } +.pagelayout-embedded #page { + margin-top: 0; +} body.drawer-ease { -webkit-transition: margin-left 0.5s ease, margin-right 0.5s ease; -moz-transition: margin-left 0.5s ease, margin-right 0.5s ease; diff --git a/theme/boost/scss/moodle/modules.scss b/theme/boost/scss/moodle/modules.scss index 6ea872200da..37e93f0f353 100644 --- a/theme/boost/scss/moodle/modules.scss +++ b/theme/boost/scss/moodle/modules.scss @@ -21,6 +21,10 @@ select { margin-bottom: -2rem; } +.path-mod-feedback .itemactions { + float: right; +} + // Forum module .path-mod-forum .forumsearch { @@ -457,6 +461,9 @@ div#dock { .path-mod-assign [data-region="grade-actions-panel"] [data-region="grade-actions"] .collapse-buttons { top: auto; } +.path-mod-assign .no-overflow { + overflow: initial; +} .path-mod-assign [data-region="grade-panel"] .has-popout { background-color: $card-bg; @@ -491,8 +498,13 @@ div#dock { line-height: 40px; } +.path-mod-assign [data-region="assignment-info"] { + overflow-y: hidden; +} + .path-mod-assign [data-region="grading-navigation"] { padding: 6px; + overflow-y: hidden; } .path-mod-assign [data-region="grade-actions"] { diff --git a/theme/boost/scss/preset-default.scss b/theme/boost/scss/preset-default.scss index d25c2c78717..bd3991b148d 100644 --- a/theme/boost/scss/preset-default.scss +++ b/theme/boost/scss/preset-default.scss @@ -196,21 +196,3 @@ $breadcrumb-divider-rtl: "/" !default; } -// Custom transitions for open/close of menus. -.dropdown-menu { - display: block; - max-height: 0px; - overflow: hidden; - opacity: 0; - -webkit-transition: max-height 1s ease, opacity 0.4s ease; - -moz-transition: max-height 1s ease, opacity 0.4s ease; - transition: max-height 1s ease, opacity 0.4s ease; -} -.open { - // Show the menu - > .dropdown-menu { - max-height: 2048px; - opacity: 100; - } -} - diff --git a/theme/boost/tests/behat/behat_theme_boost_behat_course.php b/theme/boost/tests/behat/behat_theme_boost_behat_course.php index d2598d91e83..d3cfa21b60b 100644 --- a/theme/boost/tests/behat/behat_theme_boost_behat_course.php +++ b/theme/boost/tests/behat/behat_theme_boost_behat_course.php @@ -246,4 +246,31 @@ class behat_theme_boost_behat_course extends behat_course { } $actionnode->click(); } + + public function i_turn_editing_mode_on() { + try { + $this->execute("behat_forms::press_button", get_string('turneditingon')); + } catch (Exception $e) { + $this->execute("behat_general::i_click_on_in_the", [get_string('turneditingon'), 'link', 'Administration', 'block']); + } + } + + public function i_turn_editing_mode_off() { + try { + $this->execute("behat_forms::press_button", get_string('turneditingoff')); + } catch (Exception $e) { + $this->execute("behat_general::i_click_on_in_the", [get_string('turneditingoff'), 'link', 'Administration', 'block']); + } + } + + protected function is_course_editor() { + + // We don't need to behat_base::spin() here as all is already loaded. + if (!$this->getSession()->getPage()->findLink(get_string('turneditingoff')) && + !$this->getSession()->getPage()->findLink(get_string('turneditingon'))) { + return false; + } + + return true; + } } 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 8e8a0ea0fa7..97ed9d673de 100644 --- a/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php +++ b/theme/boost/tests/behat/behat_theme_boost_behat_navigation.php @@ -65,24 +65,12 @@ class behat_theme_boost_behat_navigation extends behat_navigation { "/li[contains(concat(' ', normalize-space(@class), ' '), ' contains_branch ')]" . "/ul/li[contains(concat(' ', normalize-space(@class), ' '), ' contains_branch ')]" . "[p[contains(concat(' ', normalize-space(@class), ' '), ' branch ')]" . - "/span[normalize-space(.)=" . $nodetextliteral ."]]" . - "|" . - "//div[contains(concat(' ', normalize-space(@class), ' '), ' card-text ')]/div" . - "/ul[contains(concat(' ', normalize-space(@class), ' '), ' block_tree ')]" . - "/li[contains(concat(' ', normalize-space(@class), ' '), ' contains_branch ')]" . - "/ul/li[contains(concat(' ', normalize-space(@class), ' '), ' contains_branch ')]" . - "[p[contains(concat(' ', normalize-space(@class), ' '), ' branch ')]" . - "/span[normalize-space(.)=" . $nodetextliteral ."]]" . + "/*[normalize-space(.)=" . $nodetextliteral ."]]" . "|" . "//div[contains(concat(' ', normalize-space(@class), ' '), ' card-text ')]/div" . "/ul[contains(concat(' ', normalize-space(@class), ' '), ' block_tree ')]" . "/li[p[contains(concat(' ', normalize-space(@class), ' '), ' branch ')]" . - "/span[normalize-space(.)=" . $nodetextliteral ."]]" . - "|" . - "//div[contains(concat(' ', normalize-space(@class), ' '), ' card-text ')]/div" . - "/ul[contains(concat(' ', normalize-space(@class), ' '), ' block_tree ')]" . - "/li[p[contains(concat(' ', normalize-space(@class), ' '), ' branch ')]" . - "/a[normalize-space(.)=" . $nodetextliteral ."]]"; + "/*[normalize-space(.)=" . $nodetextliteral ."]]"; $node = $this->find('xpath', $xpath, $exception); diff --git a/theme/boost/tests/behat/blacklist.json b/theme/boost/tests/behat/blacklist.json index 1d0c8d840e2..4a8a2cb0c2f 100644 --- a/theme/boost/tests/behat/blacklist.json +++ b/theme/boost/tests/behat/blacklist.json @@ -3,6 +3,7 @@ "lib/tests/behat/action_menu.feature", "course/tests/behat/activities_edit_with_block_dock.feature", "blocks/tests/behat/hide_blocks.feature", - "blocks/tests/behat/move_blocks.feature" + "blocks/tests/behat/move_blocks.feature", + "backup/util/ui/tests/behat/restore_moodle2_courses.feature" ] } diff --git a/user/profile.php b/user/profile.php index 22acc92ca4d..907d986d2ad 100644 --- a/user/profile.php +++ b/user/profile.php @@ -82,6 +82,7 @@ if (!user_can_view_profile($user, null, $context)) { $PAGE->set_context(context_system::instance()); $PAGE->set_title("$SITE->shortname: $struser"); // Do not leak the name. $PAGE->set_heading($struser); + $PAGE->set_pagelayout('mypublic'); $PAGE->set_url('/user/profile.php', array('id' => $userid)); $PAGE->navbar->add($struser); echo $OUTPUT->header(); diff --git a/user/tests/behat/name_fields.feature b/user/tests/behat/name_fields.feature index 0678a643205..96688c7b2c3 100644 --- a/user/tests/behat/name_fields.feature +++ b/user/tests/behat/name_fields.feature @@ -28,7 +28,7 @@ Feature: Both first name and surname are always available for every user | foobar | Foo | Bar | foo@bar.com | And I log in as "foobar" And I follow "Profile" in the user menu - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "First name" to " " And I set the field "Surname" to " " And I click on "Update profile" "button" @@ -42,7 +42,7 @@ Feature: Both first name and surname are always available for every user And I log in as "admin" And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" And I follow "Foo Bar" - And I follow "Edit profile" + And I click on "Edit profile" "link" in the "region-main" "region" When I set the field "First name" to " " And I set the field "Surname" to " " And I click on "Update profile" "button" diff --git a/user/tests/behat/user_grade_navigation.feature b/user/tests/behat/user_grade_navigation.feature index 4c25bc416c0..7997a97ab16 100644 --- a/user/tests/behat/user_grade_navigation.feature +++ b/user/tests/behat/user_grade_navigation.feature @@ -29,7 +29,7 @@ Feature: The student can navigate to their grades page and user grade report. | assign | C2 | a4 | Test assignment four | Submit something! | 150 | And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Grades" node in "Course administration" + And I click on "Grades" "link" in the "Navigation" "block" And I turn editing mode on And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "67.00" to the user "Student 1" for the grade item "Test assignment two" @@ -43,7 +43,7 @@ Feature: The student can navigate to their grades page and user grade report. | Course name | Grade | | Course 2 | - | | Course 1 | 217.00 | - And I follow "Course 1" + And I click on "Course 1" "link" in the "region-main" "region" And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 75.00 % | 150.00 | 0–300 | 50.00 % | 37.50 % | diff --git a/user/tests/behat/view_full_profile.feature b/user/tests/behat/view_full_profile.feature index cc6a7c461fe..71f4111f184 100644 --- a/user/tests/behat/view_full_profile.feature +++ b/user/tests/behat/view_full_profile.feature @@ -26,17 +26,17 @@ Feature: Access to full profiles of users When I log in as "student1" And I follow "Course 1" # Another student's full profile is not visible - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 2" Then I should not see "Full profile" # Teacher's full profile is visible - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Teacher 1" And I follow "Full profile" And I should see "First access to site" # Own full profile is visible And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I click on "Student 1" "link" in the "#participants" "css_element" And I follow "Full profile" And I should see "First access to site" @@ -47,7 +47,7 @@ Feature: Access to full profiles of users | forceloginforprofiles | 0 | When I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 2" And I follow "Full profile" Then I should see "First access to site" @@ -59,7 +59,7 @@ Feature: Access to full profiles of users And I log out When I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 2" And I follow "Full profile" Then I should see "First access to site" @@ -92,7 +92,7 @@ Feature: Access to full profiles of users Given I log in as "admin" And I am on site homepage And I follow "Course 1" - And I follow "Edit settings" + And I navigate to "Edit settings" node in "Course 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 526331c7658..b8cd4c9d242 100644 --- a/user/tests/behat/view_preferences_page.feature +++ b/user/tests/behat/view_preferences_page.feature @@ -28,30 +28,30 @@ Feature: Access to preferences page Scenario: A student and teacher with normal permissions can not view another user's permissions page. Given I log in as "student1" And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "My courses > C1" And I follow "Student 2" - And I should not see "Preferences" in the "#region-main" "css_element" + And I should not see "Preferences" in the "region-main" "region" And I log out And I log in as "teacher1" And I follow "Course 1" - When I navigate to "Participants" node in "Current course > C1" + When I navigate to "Participants" node in "My courses > C1" And I follow "Student 2" - Then I should not see "Preferences" in the "#region-main" "css_element" + Then I should not see "Preferences" in the "region-main" "region" Scenario: Administrators and Managers can view another user's permissions page. Given I log in as "admin" And I am on site homepage And I follow "Course 1" - And I navigate to "Participants" node in "Current course > C1" + And I navigate to "Participants" node in "Courses > C1" And I follow "Student 2" - And I should see "Preferences" in the "#region-main" "css_element" + And I should see "Preferences" in the "region-main" "region" And I log out And I log in as "manager1" And I am on site homepage And I follow "Course 1" - When I navigate to "Participants" node in "Current course > C1" + When I navigate to "Participants" node in "Courses > C1" And I follow "Student 2" - Then I should see "Preferences" in the "#region-main" "css_element" + Then I should see "Preferences" in the "region-main" "region" Scenario: A user with the appropriate permissions can view another user's permissions page. Given I log in as "admin" @@ -81,4 +81,4 @@ Feature: Access to preferences page And I log in as "parent" And I am on site homepage When I follow "Student 1" - Then I should see "Preferences" in the "#region-main" "css_element" + Then I should see "Preferences" in the "region-main" "region"