diff --git a/admin/roles/tests/behat/override_roles_highlighting.feature b/admin/roles/tests/behat/override_roles_highlighting.feature index f7e358ffdc738..f2eac7b969caf 100644 --- a/admin/roles/tests/behat/override_roles_highlighting.feature +++ b/admin/roles/tests/behat/override_roles_highlighting.feature @@ -13,7 +13,7 @@ Feature: Highlight non-inherited permissions @javascript Scenario: Override a permission - Given I follow "Course fullname" + Given I am on course page "Course fullname" And I navigate to "Users > Permissions" in current page administration And I select "Manager (0)" from the "roleid" singleselect And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row" diff --git a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature index c0107b3e875a4..a7f3e5a10379e 100644 --- a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature +++ b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature @@ -50,7 +50,7 @@ Feature: Manage availability conditions # OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked. And I click on "Hide" "icon" in the "Restriction by grade" "table_row" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Page" to section "1" And I expand all fieldsets diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 5560c833be80c..db7a768d2fafb 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -58,7 +58,7 @@ Feature: Set up contextual data for tests | Grouping 2 | C1 | GG2 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" @@ -88,7 +88,7 @@ Feature: Set up contextual data for tests | mod/forum:replynews | Prevent | editingteacher | Course | C1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Permissions" in current page administration And I set the field "Advanced role override" to "Student (1)" Then "mod/forum:editanypost" capability has "Allow" permission @@ -108,7 +108,7 @@ Feature: Set up contextual data for tests | user | course | role | | student1 | C1 | student | When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Topic 1" Scenario: Add role assigns @@ -145,23 +145,23 @@ Feature: Set up contextual data for tests And I log out And I log in as "user2" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user3" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user4" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Turn editing on" "link" should exist in current page administration And I log out And I log in as "user5" And I should see "You are logged in as" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "You can not enrol yourself in this course." Scenario: Add modules @@ -200,7 +200,7 @@ Feature: Set up contextual data for tests | assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Test assignment name" # Assignment 2.2 module type is disabled by default # And I should see "Test assignment22 name" @@ -262,7 +262,7 @@ Feature: Set up contextual data for tests | GG1 | G1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration Then the "groups" select box should contain "Group 1 (1)" And the "groups" select box should contain "Group 2 (1)" @@ -321,7 +321,7 @@ Feature: Set up contextual data for tests | Grade sub category 2 | C1 | Grade category 1 | When I log in as "admin" And I am on course index - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook Then I should see "Grade category 1" And I should see "Grade sub category 2" @@ -345,7 +345,7 @@ Feature: Set up contextual data for tests | Test Grade Item 3 | C1 | Grade sub category 2 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook Then I should see "Test Grade Item 1" And I follow "Edit Test Grade Item 1" @@ -374,7 +374,7 @@ Feature: Set up contextual data for tests | Test Scale 1 | Disappointing, Good, Very good, Excellent | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Scales" in the course gradebook Then I should see "Test Scale 1" And I should see "Disappointing, Good, Very good, Excellent" @@ -396,7 +396,7 @@ Feature: Set up contextual data for tests | enableoutcomes | 1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Outcomes" Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element" And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element" @@ -425,7 +425,7 @@ Feature: Set up contextual data for tests | enableoutcomes | 1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook Then I should see "Test Outcome Grade Item 1" And I follow "Edit Test Outcome Grade Item 1" @@ -443,5 +443,5 @@ Feature: Set up contextual data for tests | online_users | Course | C1 | course-view-* | site-pre | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Online users" diff --git a/admin/tool/behat/tests/behat/datetime_strings.feature b/admin/tool/behat/tests/behat/datetime_strings.feature index 0b4e7e557445b..fcc2e2dd09bf8 100644 --- a/admin/tool/behat/tests/behat/datetime_strings.feature +++ b/admin/tool/behat/tests/behat/datetime_strings.feature @@ -19,7 +19,7 @@ Feature: Transform date time string arguments | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "##yesterday##l, j F Y##" And I log out diff --git a/admin/tool/behat/tests/behat/edit_permissions.feature b/admin/tool/behat/tests/behat/edit_permissions.feature index c0e7cc045f6e6..bba0d7afb1324 100644 --- a/admin/tool/behat/tests/behat/edit_permissions.feature +++ b/admin/tool/behat/tests/behat/edit_permissions.feature @@ -31,7 +31,7 @@ Feature: Edit capabilities Scenario: Course capabilities overrides Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Student" role with: | mod/forum:deleteanypost | Prohibit | @@ -45,7 +45,7 @@ Feature: Edit capabilities Scenario: Module capabilities overrides Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | I'm the name | 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 4b467bc1529cf..bda108e4b8866 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -34,7 +34,7 @@ Feature: Verify that all form fields values can be get and set | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Reset" node in "Course administration" # Select (multi-select) - Checking "the select box should contain". And I expand all fieldsets @@ -49,7 +49,7 @@ Feature: Verify that all form fields values can be get and set And the "Unenrol users" select box should not contain "Baker" And the "Unenrol users" select box should not contain "President, Baker" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test this one" And I press "Create page" @@ -100,7 +100,7 @@ Feature: Verify that all form fields values can be get and set | Default format | HTML | | Force format | 1 | And I press "Cancel" - And I follow "Course 1" + And I am on course page "Course 1" # Radio - Checking "I set the field" and "the field matches value". And I add a "Choice" to section "1" and I fill the form with: | Choice name | Test choice name | @@ -116,7 +116,7 @@ Feature: Verify that all form fields values can be get and set And the field "two" matches value "" # Check if field xpath set/match works. And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number" And the field with xpath "//input[@name='idnumber']" matches value "Course id number" @@ -129,7 +129,7 @@ Feature: Verify that all form fields values can be get and set @javascript Scenario: with JS enabled all form fields getters and setters works as expected - Then I follow "Course 1" + Then I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration # Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain". And I set the field "groups" to "Group 2" @@ -141,7 +141,7 @@ Feature: Verify that all form fields values can be get and set And the "members" select box should contain "Student 2" And the "members" select box should not contain "Student 3" # Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values". - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson | diff --git a/admin/tool/behat/tests/behat/manipulate_forms.feature b/admin/tool/behat/tests/behat/manipulate_forms.feature index 5f5efdf6f018f..163eb4df29fc1 100644 --- a/admin/tool/behat/tests/behat/manipulate_forms.feature +++ b/admin/tool/behat/tests/behat/manipulate_forms.feature @@ -24,7 +24,7 @@ Feature: Forms manipulation | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Quiz" to section "1" When I expand all fieldsets diff --git a/admin/tool/filetypes/tests/behat/add_filetypes.feature b/admin/tool/filetypes/tests/behat/add_filetypes.feature index 0a9f39f712e8c..94de7ae0f289e 100644 --- a/admin/tool/filetypes/tests/behat/add_filetypes.feature +++ b/admin/tool/filetypes/tests/behat/add_filetypes.feature @@ -121,7 +121,7 @@ Feature: Add customised file types And I press "Save changes" # Create a resource activity and add it to a course And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "File" to section "1" And I set the following fields to these values: diff --git a/admin/tool/monitor/tests/behat/rule.feature b/admin/tool/monitor/tests/behat/rule.feature index 0d25c54be30f5..a85dee7bcf3e8 100644 --- a/admin/tool/monitor/tests/behat/rule.feature +++ b/admin/tool/monitor/tests/behat/rule.feature @@ -18,7 +18,7 @@ Feature: tool_monitor_rule And I navigate to "Event monitoring rules" node in "Site administration > Reports" And I click on "Enable" "link" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" And I press "Add a new rule" And I set the following fields to these values: @@ -46,7 +46,7 @@ Feature: tool_monitor_rule Scenario: Add a rule on course level Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" When I press "Add a new rule" And I set the following fields to these values: @@ -66,7 +66,7 @@ Feature: tool_monitor_rule Scenario: Delete a rule on course level Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" When I click on "Delete rule" "link" Then I should see "Are you sure you want to delete the rule \"New rule course level\"?" @@ -76,7 +76,7 @@ Feature: tool_monitor_rule Scenario: Edit a rule on course level Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" When I click on "Edit rule" "link" And I set the following fields to these values: @@ -95,7 +95,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on course level Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" When I click on "Duplicate rule" "link" in the "New rule course level" "table_row" Then I should see "Rule successfully duplicated" @@ -154,7 +154,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on site level Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" When I click on "Duplicate rule" "link" in the "New rule site level" "table_row" Then I should see "Rule successfully duplicated" diff --git a/admin/tool/monitor/tests/behat/subscription.feature b/admin/tool/monitor/tests/behat/subscription.feature index 9acc86d30c4b5..0fb4d72275c81 100644 --- a/admin/tool/monitor/tests/behat/subscription.feature +++ b/admin/tool/monitor/tests/behat/subscription.feature @@ -23,7 +23,7 @@ Feature: tool_monitor_subscriptions And I navigate to "Event monitoring rules" node in "Site administration > Reports" And I click on "Enable" "link" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Event monitoring rules" node in "Course administration > Reports" And I press "Add a new rule" And I set the following fields to these values: @@ -133,7 +133,7 @@ Feature: tool_monitor_subscriptions And I should see "Subscription successfully created" And "#toolmonitorsubs_r0" "css_element" should exist And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I trigger cron And I am on site homepage When I click on ".popover-region-notifications" "css_element" diff --git a/admin/tool/recyclebin/tests/behat/backup_user_data.feature b/admin/tool/recyclebin/tests/behat/backup_user_data.feature index 31065d0ae9588..9066468e72b5e 100644 --- a/admin/tool/recyclebin/tests/behat/backup_user_data.feature +++ b/admin/tool/recyclebin/tests/behat/backup_user_data.feature @@ -23,7 +23,7 @@ Feature: Backup user data @javascript Scenario: Delete and restore a quiz with user data Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Quiz 1 | @@ -44,7 +44,7 @@ Feature: Backup user data | Feedback for the response 'False'. | So you think it is false | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -55,7 +55,7 @@ Feature: Backup user data And I should see "5.00 out of 10.00" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I delete "Quiz 1" activity And I run all adhoc tasks @@ -64,7 +64,7 @@ Feature: Backup user data 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" + And I am on course page "Course 1" When I navigate to "User report" in the course gradebook 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 6b4ea5bf2e564..877a249b68345 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -25,7 +25,7 @@ Feature: Basic recycle bin functionality Scenario: Restore a deleted assignment Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign | @@ -38,7 +38,7 @@ Feature: Basic recycle bin functionality And I should see "'Test assign' has been restored" And I wait to be redirected And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Test assign" in the "Topic 1" "section" Scenario: Restore a deleted course @@ -64,7 +64,7 @@ Feature: Basic recycle bin functionality @javascript Scenario: Deleting a single item from the recycle bin Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign | @@ -84,7 +84,7 @@ Feature: Basic recycle bin functionality @javascript Scenario: Deleting all the items from the recycle bin Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign 1 | diff --git a/admin/tool/uploaduser/tests/behat/upload_users.feature b/admin/tool/uploaduser/tests/behat/upload_users.feature index 7ee6235889f17..f90acd27cbecd 100644 --- a/admin/tool/uploaduser/tests/behat/upload_users.feature +++ b/admin/tool/uploaduser/tests/behat/upload_users.feature @@ -33,8 +33,7 @@ Feature: Upload users And I should see "Tom Jones" And I should see "Trent Reznor" And I should see "reznor@example.com" - And I am on site homepage - And I follow "Maths" + And I am on course page "Maths" And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Section 1 (1)" And the "members" select box should contain "Tom Jones" diff --git a/admin/tool/usertours/tests/behat/tour_filter.feature b/admin/tool/usertours/tests/behat/tour_filter.feature index a0104d454bec5..ff33cad2ce02d 100644 --- a/admin/tool/usertours/tests/behat/tour_filter.feature +++ b/admin/tool/usertours/tests/behat/tour_filter.feature @@ -47,16 +47,16 @@ Feature: Apply tour filters to a tour And I log out And I log in as "editor1" And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" Then I should not see "Welcome to your course tour." And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Welcome to your course tour." And I click on "End tour" "button" And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Welcome to your course tour." diff --git a/availability/condition/completion/tests/behat/availability_completion.feature b/availability/condition/completion/tests/behat/availability_completion.feature index 9ac9f370c7aab..6a1e4478f5e08 100644 --- a/availability/condition/completion/tests/behat/availability_completion.feature +++ b/availability/condition/completion/tests/behat/availability_completion.feature @@ -22,7 +22,7 @@ Feature: availability_completion # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add a Page with a completion tickbox. @@ -49,7 +49,7 @@ Feature: availability_completion When I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Page 2 should not appear yet. Then I should not see "Page 2" in the "region-main" "region" diff --git a/availability/condition/completion/tests/behat/conditional_bug.feature b/availability/condition/completion/tests/behat/conditional_bug.feature index b2d39004c5f7b..b780de4abd26d 100644 --- a/availability/condition/completion/tests/behat/conditional_bug.feature +++ b/availability/condition/completion/tests/behat/conditional_bug.feature @@ -19,7 +19,7 @@ Feature: Confirm that conditions on completion no longer cause a bug Scenario: Multiple completion conditions on glossary # Set up course. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets And I set the field "Enable completion tracking" to "Yes" diff --git a/availability/condition/date/tests/behat/availability_date.feature b/availability/condition/date/tests/behat/availability_date.feature index 161080fe72532..ce9e4960be716 100644 --- a/availability/condition/date/tests/behat/availability_date.feature +++ b/availability/condition/date/tests/behat/availability_date.feature @@ -22,7 +22,7 @@ Feature: availability_date # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add a Page with a date condition that does match (from the past). @@ -56,7 +56,7 @@ Feature: availability_date When I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Page 1 should appear, but page 2 does not. Then I should see "Page 1" in the "region-main" "region" diff --git a/availability/condition/grade/tests/behat/availability_grade.feature b/availability/condition/grade/tests/behat/availability_grade.feature index 60f7920899656..e6cb28c248143 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -22,7 +22,7 @@ Feature: availability_grade # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add an assignment. @@ -71,7 +71,7 @@ Feature: availability_grade And I click on "Edit settings" "link" in the "P3" activity And I expand all fieldsets And the field "Maximum grade percentage (exclusive)" matches value "" - And I follow "Course 1" + And I am on course page "Course 1" # Add a Page with a grade condition for 10%. And I add a "Page" to section "4" @@ -92,7 +92,7 @@ Feature: availability_grade When I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Do the assignment. And I follow "A1" @@ -111,7 +111,7 @@ Feature: availability_grade When I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Give the assignment 40%. And I follow "A1" @@ -127,7 +127,7 @@ Feature: availability_grade And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Check pages are visible. Then I should see "P2" in the "region-main" "region" diff --git a/availability/condition/group/tests/behat/availability_group.feature b/availability/condition/group/tests/behat/availability_group.feature index 31d65d21026e9..65f69196f22b3 100644 --- a/availability/condition/group/tests/behat/availability_group.feature +++ b/availability/condition/group/tests/behat/availability_group.feature @@ -22,7 +22,7 @@ Feature: availability_group # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Start to add a Page. If there aren't any groups, there's no Group option. @@ -40,7 +40,7 @@ Feature: availability_group # This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb # is not clickable, so we'll go via the home page instead. And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Page" to section "1" And I expand all fieldsets And I click on "Add restriction..." "button" @@ -86,7 +86,7 @@ Feature: availability_group When I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # No pages should appear yet. Then I should not see "P1" in the "region-main" "region" @@ -100,7 +100,7 @@ Feature: availability_group And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # P1 (any groups) and P2 should show but not P3. Then I should see "P1" in the "region-main" "region" diff --git a/availability/condition/grouping/tests/behat/availability_grouping.feature b/availability/condition/grouping/tests/behat/availability_grouping.feature index 3c1ccb1ad38de..5d8affe7cfebd 100644 --- a/availability/condition/grouping/tests/behat/availability_grouping.feature +++ b/availability/condition/grouping/tests/behat/availability_grouping.feature @@ -28,7 +28,7 @@ Feature: availability_grouping # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Start to add a Page. If there aren't any groupings, there's no Grouping option. @@ -42,7 +42,7 @@ Feature: availability_grouping # This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb # is not clickable, so we'll go via the home page instead. And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And the following "groupings" exist: | name | course | idnumber | | GX1 | C1 | GXI1 | @@ -78,7 +78,7 @@ Feature: availability_grouping # Log back in as student. When I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" # No pages should appear yet. Then I should not see "P1" in the "region-main" "region" @@ -91,7 +91,7 @@ Feature: availability_grouping | GXI1 | GI1 | And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # P1 should show but not B2. Then I should see "P1" in the "region-main" "region" diff --git a/availability/condition/profile/tests/behat/availability_profile.feature b/availability/condition/profile/tests/behat/availability_profile.feature index a5b01b7cfa9aa..9a8b093b269a8 100644 --- a/availability/condition/profile/tests/behat/availability_profile.feature +++ b/availability/condition/profile/tests/behat/availability_profile.feature @@ -22,7 +22,7 @@ Feature: availability_profile # Basic setup. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add @@ -57,7 +57,7 @@ Feature: availability_profile When I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # I see P1 but not P2. Then I should see "P1" in the "region-main" "region" @@ -83,7 +83,7 @@ Feature: availability_profile # Set Page activity which has requirement on this field. And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Page" to section "1" And I set the following fields to these values: @@ -110,5 +110,5 @@ Feature: availability_profile And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "P1" in the "region-main" "region" diff --git a/availability/tests/behat/display_availability.feature b/availability/tests/behat/display_availability.feature index 0daeee26e5b40..eae600edd6600 100644 --- a/availability/tests/behat/display_availability.feature +++ b/availability/tests/behat/display_availability.feature @@ -40,7 +40,7 @@ Feature: display_availability # Set up. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add a Page with 1 restriction. @@ -103,7 +103,7 @@ Feature: display_availability Given I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Page 1 display still there but should be dimmed and not a link. Then I should see "Page 1" in the "#section-1 .dimmed_text" "css_element" @@ -124,7 +124,7 @@ Feature: display_availability # Set up. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Add a restriction to section 1 (visible to students). @@ -148,7 +148,7 @@ Feature: display_availability # This is necessary because otherwise it fails in Chrome, see MDL-44959 And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Add Pages to each section. And I add a "Page" to section "1" and I fill the form with: @@ -173,7 +173,7 @@ Feature: display_availability Given I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # The contents of both sections should be hidden. Then I should not see "Page 1" in the "region-main" "region" diff --git a/availability/tests/behat/edit_availability.feature b/availability/tests/behat/edit_availability.feature index 7193088a9b4b2..6956c6bef399d 100644 --- a/availability/tests/behat/edit_availability.feature +++ b/availability/tests/behat/edit_availability.feature @@ -33,7 +33,7 @@ Feature: edit_availability | enableavailability | 0 | When I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Page" to section "1" Then "Restrict access" "fieldset" should not exist @@ -46,7 +46,7 @@ Feature: edit_availability | enableavailability | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Page" to section "1" Then "Restrict access" "fieldset" should exist @@ -58,7 +58,7 @@ Feature: edit_availability Scenario: Edit availability using settings in activity form # Set up. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Add a Page and check it has None in so far. And I turn editing mode on @@ -150,7 +150,7 @@ Feature: edit_availability # Set up. Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Edit a section @@ -172,7 +172,7 @@ Feature: edit_availability | enableavailability | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" When I expand all fieldsets @@ -186,7 +186,7 @@ Feature: edit_availability | GX1 | C1 | GXI1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" And I set the following fields to these values: diff --git a/backup/util/ui/tests/behat/duplicate_activities.feature b/backup/util/ui/tests/behat/duplicate_activities.feature index 4c252d096a734..6b2cb8b4e5799 100644 --- a/backup/util/ui/tests/behat/duplicate_activities.feature +++ b/backup/util/ui/tests/behat/duplicate_activities.feature @@ -15,7 +15,7 @@ Feature: Duplicate activities | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Database" to section "1" and I fill the form with: | Name | Test database name | diff --git a/backup/util/ui/tests/behat/import_course.feature b/backup/util/ui/tests/behat/import_course.feature index 111c339b60c0f..ef285716946da 100644 --- a/backup/util/ui/tests/behat/import_course.feature +++ b/backup/util/ui/tests/behat/import_course.feature @@ -17,7 +17,7 @@ Feature: Import course's contents into another course | teacher1 | C1 | editingteacher | | teacher1 | C2 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Database" to section "1" and I fill the form with: | Name | Test database name | diff --git a/backup/util/ui/tests/behat/import_groups.feature b/backup/util/ui/tests/behat/import_groups.feature index d5745421672ce..5bed8bc629e71 100644 --- a/backup/util/ui/tests/behat/import_groups.feature +++ b/backup/util/ui/tests/behat/import_groups.feature @@ -25,7 +25,7 @@ Feature: Option to include groups and groupings when importing a course to anoth | Grouping 1 | C1 | GROUPING1 | | Grouping 2 | C1 | GROUPING2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Include groups and groupings when importing a course to another course Given I import "Course 1" course into "Course 2" course using this options: diff --git a/backup/util/ui/tests/behat/restore_moodle2_courses.feature b/backup/util/ui/tests/behat/restore_moodle2_courses.feature index 32c1cd7e7f1a7..1ec988ece59e0 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -16,7 +16,7 @@ Feature: Restore Moodle 2 course backups | data | C3 | data1 | Test database name | Database description | 2 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -63,7 +63,7 @@ Feature: Restore Moodle 2 course backups Scenario: Restore a backup into the same course removing it's contents before that When I backup "Course 1" course using this options: | Confirmation | Filename | test_backup.mbz | - And I follow "Course 1" + And I am on course page "Course 1" 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 | diff --git a/badges/tests/behat/award_badge.feature b/badges/tests/behat/award_badge.feature index a1d2fb4a63ed0..17791c2857c3f 100644 --- a/badges/tests/behat/award_badge.feature +++ b/badges/tests/behat/award_badge.feature @@ -86,7 +86,7 @@ Feature: Award badges | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" And I set the following fields to these values: @@ -106,7 +106,7 @@ Feature: Award badges And I press "Award badge" And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" - And I follow "Course Badge" + And I am on course page "Course Badge" Then I should see "Recipients (2)" And I log out And I log in as "student1" @@ -128,7 +128,7 @@ Feature: Award badges | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Enable completion tracking | Yes | @@ -137,7 +137,7 @@ Feature: Award badges And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" And I set the following fields to these values: @@ -157,8 +157,8 @@ Feature: Award badges 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 click on "Not completed: Test assignment name. Select to mark as complete." "icon" + And I am on course page "Course 1" + And I press "Mark as complete: Test assignment name" And I follow "Profile" in the user menu And I click on "Course 1" "link" in the "region-main" "region" Then I should see "Course Badge" @@ -177,7 +177,7 @@ Feature: Award badges | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Enable completion tracking | Yes | @@ -192,7 +192,7 @@ Feature: Award badges And I click on "Condition: Activity completion" "link" And I set the field "Assignment - Test assignment name" to "1" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" And I set the following fields to these values: @@ -212,7 +212,7 @@ Feature: Award badges 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 am on course page "Course 1" And I click on "Not completed: Test assignment name. Select to mark as complete." "icon" And I log out # Completion cron won't mark the whole course completed unless the @@ -242,7 +242,7 @@ Feature: Award badges | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Create course badge 1. And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" @@ -325,7 +325,7 @@ Feature: Award badges | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" And I set the following fields to these values: @@ -345,7 +345,7 @@ Feature: Award badges And I press "Award badge" And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" When I press "Award badge" - And I follow "Course Badge" + And I am on course page "Course Badge" Then I should see "Recipients (2)" And I follow "Recipients (2)" And I press "Award badge" @@ -353,5 +353,5 @@ Feature: Award badges And I press "Revoke badge" And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)" When I press "Revoke badge" - And I follow "Course Badge" + And I am on course page "Course Badge" Then I should see "Recipients (0)" diff --git a/blocks/activity_modules/tests/behat/block_activity_modules.feature b/blocks/activity_modules/tests/behat/block_activity_modules.feature index 462ef805ccb84..5dd47ae289af8 100644 --- a/blocks/activity_modules/tests/behat/block_activity_modules.feature +++ b/blocks/activity_modules/tests/behat/block_activity_modules.feature @@ -110,48 +110,48 @@ Feature: Block activity modules When I log in as "admin" And I am on course index - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Activities" block And I click on "Assignments" "link" in the "Activities" "block" Then I should see "Test assignment name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Chats" "link" in the "Activities" "block" And I should see "Test chat name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Choices" "link" in the "Activities" "block" And I should see "Test choice name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Databases" "link" in the "Activities" "block" And I should see "Test database name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Feedback" "link" in the "Activities" "block" And I should see "Test feedback name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Forums" "link" in the "Activities" "block" And I should see "Test forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "External tools" "link" in the "Activities" "block" And I should see "Test lti name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Quizzes" "link" in the "Activities" "block" And I should see "Test quiz name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Glossaries" "link" in the "Activities" "block" And I should see "Test glossary name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "SCORM packages" "link" in the "Activities" "block" And I should see "Test scorm name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Lessons" "link" in the "Activities" "block" And I should see "Test lesson name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Wikis" "link" in the "Activities" "block" And I should see "Test wiki name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Workshop" "link" in the "Activities" "block" And I should see "Test workshop name" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Resources" "link" in the "Activities" "block" And I should see "Test book name" And I should see "Test page name" diff --git a/blocks/activity_results/tests/behat/addblockinactivity.feature b/blocks/activity_results/tests/behat/addblockinactivity.feature index de4a14926fdff..4e917d709a609 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -25,30 +25,30 @@ Feature: The activity results block displays student scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 2 | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 3 | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Page" to section "1" And I set the following fields to these values: | Name | Test page name | | Description | Test page description | | Page content | This is a page | And I press "Save and return to course" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Test page name" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on @@ -58,7 +58,7 @@ Feature: The activity results block displays student scores And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment 1" And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment 1" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on a non-graded activity to show 3 high scores Given I follow "Test page name" @@ -84,19 +84,19 @@ Feature: The activity results block displays student scores And I configure the "Activity results" block Then the field "id_config_activitygradeitemid" matches value "Test assignment 1" And I press "Cancel" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 2" And I add the "Activity results" block And I configure the "Activity results" block And the field "id_config_activitygradeitemid" matches value "Test assignment 2" And I press "Cancel" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 3" And I add the "Activity results" block And I configure the "Activity results" block And the field "id_config_activitygradeitemid" matches value "Test assignment 3" And I press "Cancel" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test page name" And I add the "Activity results" block And I configure the "Activity results" block diff --git a/blocks/activity_results/tests/behat/addunconfiguredblock.feature b/blocks/activity_results/tests/behat/addunconfiguredblock.feature index f53d8eae84e89..d28476d0e3c61 100644 --- a/blocks/activity_results/tests/behat/addunconfiguredblock.feature +++ b/blocks/activity_results/tests/behat/addunconfiguredblock.feature @@ -15,7 +15,7 @@ Feature: The activity results block doesn't displays student scores for unconfig | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Add the block to a the course diff --git a/blocks/activity_results/tests/behat/addunsupportedactivity.feature b/blocks/activity_results/tests/behat/addunsupportedactivity.feature index d3f5c991ef8e3..14d7784ac8f8a 100644 --- a/blocks/activity_results/tests/behat/addunsupportedactivity.feature +++ b/blocks/activity_results/tests/behat/addunsupportedactivity.feature @@ -15,7 +15,7 @@ Feature: The activity results block doesn't display student scores for unsupport | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Try to configure the block to use an activity without grades diff --git a/blocks/activity_results/tests/behat/defaultsettings.feature b/blocks/activity_results/tests/behat/defaultsettings.feature index ca45c84449a59..f7d0a442fc070 100644 --- a/blocks/activity_results/tests/behat/defaultsettings.feature +++ b/blocks/activity_results/tests/behat/defaultsettings.feature @@ -24,13 +24,13 @@ Feature: The activity results block can have administrator set defaults | config_gradeformat | 2 | block_activity_results | | config_nameformat | 2 | block_activity_results | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I add the "Activity results" block When I configure the "Activity results" block And the following fields match these values: @@ -48,13 +48,13 @@ Feature: The activity results block can have administrator set defaults | config_showworst | 0 | block_activity_results | | config_showworst_locked | 1 | block_activity_results | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I add the "Activity results" block When I configure the "Activity results" block And the following fields match these values: diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index 620aac1cead3e..81511ce70accf 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -25,13 +25,13 @@ Feature: The activity results block displays student high scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" @@ -40,7 +40,7 @@ Feature: The activity results block displays student high scores And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 0 high scores Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index d121c97b9da66..191933ee0587e 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -25,14 +25,14 @@ Feature: The activity results block displays students high scores in group as sc | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Scales" in the course gradebook And I press "Add a new scale" And I set the following fields to these values: | Name | My Scale | | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | @@ -40,7 +40,7 @@ Feature: The activity results block displays students high scores in group as sc | assignsubmission_file_enabled | 0 | | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" @@ -49,7 +49,7 @@ Feature: The activity results block displays students high scores in group as sc And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment" And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index 6b9c9727594fd..c295748ef6f6c 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays student in group high scores as sca | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Scales" in the course gradebook And I press "Add a new scale" And I set the following fields to these values: | Name | My Scale | | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | @@ -58,7 +58,7 @@ Feature: The activity results block displays student in group high scores as sca | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | | Group mode | Separate groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" @@ -68,7 +68,7 @@ Feature: The activity results block displays student in group high scores as sca And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment" And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Try to configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -83,7 +83,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Excellent!" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" @@ -104,7 +104,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 3" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -125,7 +125,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User S1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" And I should see "User S2" in the "Activity results" "block" @@ -146,7 +146,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index 0c1ccdd077d94..bb53eb673df08 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays student in separate groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | | Group mode | Separate groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" @@ -59,7 +59,7 @@ Feature: The activity results block displays student in separate groups scores And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -89,7 +89,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "95.00/100.00" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 1" in the "Activity results" "block" And I should see "100.00/100.00" in the "Activity results" "block" @@ -107,7 +107,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "95.00" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 1" in the "Activity results" "block" And I should see "100.00" in the "Activity results" "block" @@ -130,7 +130,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "75%" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 1" in the "Activity results" "block" And I should see "100%" in the "Activity results" "block" And I should see "Student 2" in the "Activity results" "block" @@ -154,7 +154,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "75.00/100.00" in the "Activity results" "block" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 3" in the "Activity results" "block" And I should see "90.00/100.00" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -178,7 +178,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "75.00" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 1" in the "Activity results" "block" And I should see "100.00" in the "Activity results" "block" And I should see "Student 2" in the "Activity results" "block" @@ -200,7 +200,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "75.00%" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" And I should see "User S2" in the "Activity results" "block" @@ -222,7 +222,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "75.00%" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "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" diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index 0e64d0544fe42..576b8ff5a1d04 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays student in visible groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | | Group mode | Visible groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" @@ -59,7 +59,7 @@ Feature: The activity results block displays student in visible groups scores And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -87,7 +87,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 1" in the "Activity results" "block" And I should see "95.00/100.00" in the "Activity results" "block" @@ -103,7 +103,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" @@ -120,7 +120,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 1" in the "Activity results" "block" And I should see "95%" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -140,7 +140,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 1" in the "Activity results" "block" And I should see "95.00/100.00" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -160,7 +160,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -180,7 +180,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" 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" @@ -198,7 +198,7 @@ Feature: The activity results block displays student in visible groups scores And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" 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" diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index e2c8729b9850a..5dfa377eb5b9f 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -25,13 +25,13 @@ Feature: The activity results block displays student low scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" @@ -40,7 +40,7 @@ Feature: The activity results block displays student low scores And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 5068a7b364251..dadd85504d821 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -25,14 +25,14 @@ Feature: The activity results block displays student low scores as scales | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Scales" in the course gradebook And I press "Add a new scale" And I set the following fields to these values: | Name | My Scale | | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | @@ -40,7 +40,7 @@ Feature: The activity results block displays student low scores as scales | assignsubmission_file_enabled | 0 | | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" @@ -49,7 +49,7 @@ Feature: The activity results block displays student low scores as scales And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment" And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index 30602ff07468d..64a59a7b56b7f 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays students in groups low scores as sc | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Scales" in the course gradebook And I press "Add a new scale" And I set the following fields to these values: | Name | My Scale | | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | @@ -58,7 +58,7 @@ Feature: The activity results block displays students in groups low scores as sc | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | | Group mode | Separate groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" @@ -68,7 +68,7 @@ Feature: The activity results block displays students in groups low scores as sc And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment" And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Try to configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -83,7 +83,7 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 6" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" @@ -102,7 +102,7 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 3" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -122,7 +122,7 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User S5" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I should see "User S6" in the "Activity results" "block" @@ -142,7 +142,7 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Good" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index 5d73692b9da1f..71500e4a87632 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays students in separate groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | | Group mode | Separate groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" @@ -59,7 +59,7 @@ Feature: The activity results block displays students in separate groups scores And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -89,7 +89,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00/100.00" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 6" in the "Activity results" "block" And I should see "70.00/100.00" in the "Activity results" "block" @@ -107,7 +107,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 6" in the "Activity results" "block" And I should see "70.00" in the "Activity results" "block" @@ -128,7 +128,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75%" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 6" in the "Activity results" "block" And I should see "70%" in the "Activity results" "block" And I should see "Student 5" in the "Activity results" "block" @@ -150,7 +150,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00/100.00" in the "Activity results" "block" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 3" in the "Activity results" "block" And I should see "90.00/100.00" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -172,7 +172,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Student 5" in the "Activity results" "block" And I should see "80.00" in the "Activity results" "block" And I should see "Student 6" in the "Activity results" "block" @@ -193,7 +193,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00%" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" And I should see "User S2" in the "Activity results" "block" @@ -214,7 +214,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "75.00%" in the "Activity results" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "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" diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index e137f929104d2..b8488ca31415d 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -42,14 +42,14 @@ Feature: The activity results block displays student in visible groups low score | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | | assignsubmission_file_enabled | 0 | | Group mode | Visible groups | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" @@ -59,7 +59,7 @@ Feature: The activity results block displays student in visible groups low score And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -87,7 +87,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00/100.00" in the "Activity results" "block" @@ -103,7 +103,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" @@ -124,7 +124,7 @@ Feature: The activity results block displays student in visible groups low score And I should see "75%" in the "Activity results" "block" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Group 2" in the "Activity results" "block" And I should see "85%" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -142,7 +142,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 2" in the "Activity results" "block" And I should see "85.00/100.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -160,7 +160,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Group 2" in the "Activity results" "block" And I should see "85.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -178,7 +178,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "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" @@ -195,7 +195,7 @@ Feature: The activity results block displays student in visible groups low score And I press "Save changes" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "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" diff --git a/blocks/badges/tests/behat/block_badges.feature b/blocks/badges/tests/behat/block_badges.feature index e9da78ac5ae0d..5c8a2337acc50 100644 --- a/blocks/badges/tests/behat/block_badges.feature +++ b/blocks/badges/tests/behat/block_badges.feature @@ -21,14 +21,14 @@ Feature: Enable Block Badges in a course without badges | enablebadges | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Latest badges" block Then I should see "Badges are not enabled on this site." in the "Latest badges" "block" Scenario: Add the block to a the course when badges are enabled Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Latest badges" block Then I should see "You have no badges to display" in the "Latest badges" "block" diff --git a/blocks/badges/tests/behat/block_badges_course.feature b/blocks/badges/tests/behat/block_badges_course.feature index 3f16fa421e0b6..88415ab560a99 100644 --- a/blocks/badges/tests/behat/block_badges_course.feature +++ b/blocks/badges/tests/behat/block_badges_course.feature @@ -15,7 +15,7 @@ Feature: Enable Block Badges in a course | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: @@ -54,7 +54,7 @@ Feature: Enable Block Badges in a course Scenario: Add the recent badges block to a course. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Latest badges" block Then I should see "Badge 1" in the "Latest badges" "block" @@ -62,7 +62,7 @@ Feature: Enable Block Badges in a course Scenario: Add the recent badges block to a course and limit it to only display 1 badge. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Latest badges" block And I configure the "Latest badges" block diff --git a/blocks/badges/tests/behat/block_badges_dashboard.feature b/blocks/badges/tests/behat/block_badges_dashboard.feature index 3f87995725ef0..6240fe4efda51 100644 --- a/blocks/badges/tests/behat/block_badges_dashboard.feature +++ b/blocks/badges/tests/behat/block_badges_dashboard.feature @@ -15,7 +15,7 @@ Feature: Enable Block Badges on the dashboard and view awarded badges | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: diff --git a/blocks/badges/tests/behat/block_badges_frontpage.feature b/blocks/badges/tests/behat/block_badges_frontpage.feature index c6b0425861e32..edb484b4a39ac 100644 --- a/blocks/badges/tests/behat/block_badges_frontpage.feature +++ b/blocks/badges/tests/behat/block_badges_frontpage.feature @@ -20,7 +20,7 @@ Feature: Enable Block Badges on the frontpage and view awarded badges And I add the "Latest badges" block And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: diff --git a/blocks/blog_menu/tests/behat/block_blog_menu.feature b/blocks/blog_menu/tests/behat/block_blog_menu.feature index b93728f81be6b..87b516f92d781 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu.feature @@ -21,7 +21,7 @@ Feature: Enable Block blog menu in a course | enableblogs | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should see "Blogging is disabled!" in the "Blog menu" "block" @@ -32,7 +32,7 @@ Feature: Enable Block blog menu in a course | useblogassociations | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" @@ -47,7 +47,7 @@ Feature: Enable Block blog menu in a course | useblogassociations | 1 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" @@ -62,7 +62,7 @@ Feature: Enable Block blog menu in a course | enablerssfeeds | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should not see "Blog RSS feed" in the "Blog menu" "block" @@ -74,7 +74,7 @@ Feature: Enable Block blog menu in a course | enablerssfeeds | 1 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should see "Blog RSS feed" in the "Blog menu" "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 6b8001f6c09be..fcd297a638e5e 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature @@ -19,7 +19,7 @@ Feature: Enable Block blog menu in an activity | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 | @@ -31,7 +31,7 @@ Feature: Enable Block blog menu in an activity Scenario: Students use the blog menu block to post blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add a new entry" When I set the following fields to these values: @@ -41,7 +41,7 @@ Feature: Enable Block blog menu in an activity Then I should see "S1 First Blog" And I should see "This is my awesome blog!" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Blog entries" And I should see "S1 First Blog" @@ -49,7 +49,7 @@ Feature: Enable Block blog menu in an activity Scenario: Students use the blog menu block to view their blogs about the activity Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -61,7 +61,7 @@ Feature: Enable Block blog menu in an activity And I should see "Associated Assignment: Test assignment 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -72,7 +72,7 @@ Feature: Enable Block blog menu in an activity And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -83,7 +83,7 @@ Feature: Enable Block blog menu in an activity And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" When I follow "View my entries about this Assignment" Then I should see "S2 First Blog" @@ -92,7 +92,7 @@ Feature: Enable Block blog menu in an activity Scenario: Students use the blog menu block to view all blogs about the assignment Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -104,7 +104,7 @@ Feature: Enable Block blog menu in an activity And I should see "Associated Assignment: Test assignment 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -115,7 +115,7 @@ Feature: Enable Block blog menu in an activity And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -126,7 +126,7 @@ Feature: Enable Block blog menu in an activity And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" When I follow "View all entries about this Assignment" Then I should see "S1 First Blog" @@ -135,7 +135,7 @@ Feature: Enable Block blog menu in an activity Scenario: Students use the blog menu block to view all their blog entries Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -147,7 +147,7 @@ Feature: Enable Block blog menu in an activity And I should see "Associated Assignment: Test assignment 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -158,7 +158,7 @@ Feature: Enable Block blog menu in an activity And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -169,7 +169,7 @@ Feature: Enable Block blog menu in an activity And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" When I follow "Blog entries" Then I should see "S2 First Blog" @@ -178,7 +178,7 @@ Feature: Enable Block blog menu in an activity Scenario: Teacher searches for student blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -190,7 +190,7 @@ Feature: Enable Block blog menu in an activity And I should see "Associated Assignment: Test assignment 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -201,7 +201,7 @@ Feature: Enable Block blog menu in an activity And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -213,7 +213,7 @@ Feature: Enable Block blog menu in an activity And I should see "Associated Assignment: Test assignment 1" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I set the field "blogsearchquery" to "First" And I press "Search" diff --git a/blocks/blog_menu/tests/behat/block_blog_menu_course.feature b/blocks/blog_menu/tests/behat/block_blog_menu_course.feature index 76ceb37c78c3c..5ea35dd4c498f 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_course.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_course.feature @@ -19,14 +19,14 @@ Feature: Students can use block blog menu in a course | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Blog menu" block And I log out Scenario: Students use the blog menu block to post blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | @@ -35,14 +35,14 @@ Feature: Students can use block blog menu in a course Then I should see "S1 First Blog" And I should see "This is my awesome blog!" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Blog entries" And I should see "S1 First Blog" And I should see "This is my awesome blog!" Scenario: Students use the blog menu block to view their blogs about the course Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -53,7 +53,7 @@ Feature: Students can use block blog menu in a course And I should see "Associated Course: C1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -63,7 +63,7 @@ Feature: Students can use block blog menu in a course And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -73,7 +73,7 @@ Feature: Students can use block blog menu in a course And I should see "My course blog is better!" And I should see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "View my entries about this course" Then I should see "S2 First Blog" And I should not see "S2 Second Blog" @@ -81,7 +81,7 @@ Feature: Students can use block blog menu in a course Scenario: Students use the blog menu block to view all blogs about the course Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -92,7 +92,7 @@ Feature: Students can use block blog menu in a course And I should see "Associated Course: C1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -102,7 +102,7 @@ Feature: Students can use block blog menu in a course And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -112,7 +112,7 @@ Feature: Students can use block blog menu in a course And I should see "My course blog is better!" And I should see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "View all entries for this course" Then I should see "S1 First Blog" And I should see "S2 First Blog" @@ -120,7 +120,7 @@ Feature: Students can use block blog menu in a course Scenario: Students use the blog menu block to view all their blog entries Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -131,7 +131,7 @@ Feature: Students can use block blog menu in a course And I should see "Associated Course: C1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -141,7 +141,7 @@ Feature: Students can use block blog menu in a course And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -151,7 +151,7 @@ Feature: Students can use block blog menu in a course And I should see "My course blog is better!" And I should see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Blog entries" Then I should see "S2 First Blog" And I should see "S2 Second Blog" @@ -159,7 +159,7 @@ Feature: Students can use block blog menu in a course Scenario: Teacher searches for student blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -170,7 +170,7 @@ Feature: Students can use block blog menu in a course And I should see "Associated Course: C1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -180,7 +180,7 @@ Feature: Students can use block blog menu in a course And I should see "My unrelated blog!" And I should not see "Associated Course: C1" And I follow "Dashboard" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -191,7 +191,7 @@ Feature: Students can use block blog menu in a course And I should see "Associated Course: C1" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I set the field "blogsearchquery" to "First" And I press "Search" Then I should see "S1 First Blog" diff --git a/blocks/blog_recent/tests/behat/block_blog_recent.feature b/blocks/blog_recent/tests/behat/block_blog_recent.feature index 6c3f73b773567..e5c15081dfd3c 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent.feature @@ -21,14 +21,14 @@ Feature: Feature: Users can use the recent blog entries block to view recent blo | enableblogs | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Recent blog entries" block Then I should see "Blogging is disabled!" in the "Recent blog entries" "block" Scenario: Add the recent blogs block to a course when there are not any blog posts Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Recent blog entries" block Then I should see "No recent entries" in the "Recent blog entries" "block" diff --git a/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature b/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature index fae3f4a35dcb4..dae2c8c2ae995 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature @@ -19,7 +19,7 @@ Feature: Students can use the recent blog entries block to view recent entries o | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 | @@ -32,7 +32,7 @@ Feature: Students can use the recent blog entries block to view recent entries o Scenario: Students use the recent blog entries block to view blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" When I set the following fields to these values: @@ -48,7 +48,7 @@ Feature: Students can use the recent blog entries block to view recent entries o Scenario: Students only see a few entries in the recent blog entries block Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" # Blog 1 of 5 @@ -106,7 +106,7 @@ Feature: Students can use the recent blog entries block to view recent entries o And I should see "This is my awesome blog!" Then I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test assignment 1" And I configure the "Recent blog entries" block diff --git a/blocks/blog_recent/tests/behat/block_blog_recent_course.feature b/blocks/blog_recent/tests/behat/block_blog_recent_course.feature index f06fad337e996..7bf2e3af5edba 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent_course.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent_course.feature @@ -17,7 +17,7 @@ Feature: Students can use the recent blog entries block to view recent entries o | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Blog menu" block And I add the "Recent blog entries" block @@ -25,7 +25,7 @@ Feature: Students can use the recent blog entries block to view recent entries o Scenario: Students use the recent blog entries block to view blogs Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" When I set the following fields to these values: | Entry title | S1 First Blog | @@ -40,7 +40,7 @@ Feature: Students can use the recent blog entries block to view recent entries o Scenario: Students only see a few entries in the recent blog entries block Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Add an entry about this course" # Blog 1 of 5 And I set the following fields to these values: @@ -97,7 +97,7 @@ Feature: Students can use the recent blog entries block to view recent entries o And I should see "This is my awesome blog!" Then I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I configure the "Recent blog entries" block And I set the following fields to these values: diff --git a/blocks/blog_tags/tests/behat/blogtag.feature b/blocks/blog_tags/tests/behat/blogtag.feature index 60572e16a7f2b..c6b06b3fe39d9 100644 --- a/blocks/blog_tags/tests/behat/blogtag.feature +++ b/blocks/blog_tags/tests/behat/blogtag.feature @@ -21,7 +21,7 @@ Feature: Adding blog tag block | teacher1 | c1 | editingteacher | | student1 | c1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Blog tags" block # TODO MDL-57120 site "Blogs" link not accessible without navigation block. @@ -37,7 +37,7 @@ Feature: Adding blog tag block And I press "Save changes" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I click on "Course blogs" "link" in the "Navigation" "block" And I follow "Blog about this Course" diff --git a/blocks/calendar_month/tests/behat/block_calendar_month.feature b/blocks/calendar_month/tests/behat/block_calendar_month.feature index e4952e8829fa4..7503e3ae83495 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month.feature @@ -21,7 +21,7 @@ Feature: Enable the calendar block in a course and test it's functionality Scenario: Add the block to a the course Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Calendar" block Then I should see "Events key" in the "Calendar" "block" @@ -34,7 +34,7 @@ Feature: Enable the calendar block in a course and test it's functionality | id_name | Site Event | And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I hover over today in the calendar @@ -48,13 +48,13 @@ Feature: Enable the calendar block in a course and test it's functionality | id_name | Site Event | And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | Course | | id_name | Course Event | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Hide global events" And I hover over today in the calendar Then I should not see "Site Event" @@ -63,31 +63,31 @@ Feature: Enable the calendar block in a course and test it's functionality @javascript Scenario: View a course event in the calendar block Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | Course | | id_name | Course Event | - When I follow "Course 1" + When I am on course page "Course 1" And I hover over today in the calendar Then I should see "Course Event" @javascript Scenario: Filter course events in the calendar block Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | Course | | id_name | Course Event | - And I follow "Course 1" + And I am on course page "Course 1" And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Hide course events" And I hover over today in the calendar Then I should not see "Course Event" @@ -96,32 +96,32 @@ Feature: Enable the calendar block in a course and test it's functionality @javascript Scenario: View a user event in the calendar block Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I hover over today in the calendar Then I should see "User Event" @javascript Scenario: Filter user events in the calendar block Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I create a calendar event with form data: | id_eventtype | Course | | id_name | Course Event | - And I follow "Course 1" + And I am on course page "Course 1" And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Hide user events" And I hover over today in the calendar Then I should not see "User Event" @@ -138,7 +138,7 @@ Feature: Enable the calendar block in a course and test it's functionality | student1 | G1 | | student2 | G2 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | id_groupmode | Separate groups | @@ -152,12 +152,12 @@ Feature: Enable the calendar block in a course and test it's functionality | id_name | Group Event | And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I hover over today in the calendar And I should see "Group Event" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I hover over today in the calendar And I should not see "Group Event" @@ -172,7 +172,7 @@ Feature: Enable the calendar block in a course and test it's functionality | student1 | G1 | | student2 | G2 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | id_groupmode | Separate groups | @@ -183,14 +183,14 @@ Feature: Enable the calendar block in a course and test it's functionality And I create a calendar event with form data: | id_eventtype | Course | | id_name | Course Event 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I create a calendar event with form data: | id_eventtype | Group | | id_groupid | Group 1 | | id_name | Group Event 1 | And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Hide group events" And I hover over today in the calendar And I should not see "Group Event 1" diff --git a/blocks/calendar_month/tests/behat/block_calendar_month_course.feature b/blocks/calendar_month/tests/behat/block_calendar_month_course.feature index 1c59a6021f4ea..e87bd084e8cb7 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month_course.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month_course.feature @@ -21,7 +21,7 @@ Feature: Enable the calendar block in a course | id_name | Site Event | And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block And I hover over today in the calendar diff --git a/blocks/comments/tests/behat/add_comment.feature b/blocks/comments/tests/behat/add_comment.feature index 7aa437f546a1b..d400237f6aee4 100644 --- a/blocks/comments/tests/behat/add_comment.feature +++ b/blocks/comments/tests/behat/add_comment.feature @@ -17,12 +17,12 @@ Feature: Add a comment to the comments block | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Comments" block And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Add a comment with Javascript enabled @@ -69,7 +69,7 @@ Feature: Add a comment to the comments block And I add "Super test comment 31" comment to comments block Then I should see "Super test comment 01" And I should see "Super test comment 31" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Super test comment 01" And I should not see "Super test comment 02" And I should not see "Super test comment 16" diff --git a/blocks/comments/tests/behat/block_comment_activity.feature b/blocks/comments/tests/behat/block_comment_activity.feature index d2a3180351f8d..d8006741bce4e 100644 --- a/blocks/comments/tests/behat/block_comment_activity.feature +++ b/blocks/comments/tests/behat/block_comment_activity.feature @@ -20,7 +20,7 @@ Feature: Enable Block comments on an activity page and view comments | activity | course | idnumber | name | intro | | page | C1 | page1 | Test page name | Test page description | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" And I add the "Comments" block @@ -28,7 +28,7 @@ Feature: Enable Block comments on an activity page and view comments And I add "I'm a comment from the teacher" comment to comments block And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test page name" And I follow "Show comments" Then I should see "I'm a comment from the teacher" diff --git a/blocks/comments/tests/behat/block_comment_course.feature b/blocks/comments/tests/behat/block_comment_course.feature index c3acbc43a62cc..9ee5143399b12 100644 --- a/blocks/comments/tests/behat/block_comment_course.feature +++ b/blocks/comments/tests/behat/block_comment_course.feature @@ -17,13 +17,13 @@ Feature: Enable Block comments on a course page and view comments | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Comments" block And I follow "Show comments" And I add "I'm a comment from the teacher" comment to comments block And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Show comments" Then I should see "I'm a comment from the teacher" diff --git a/blocks/comments/tests/behat/delete_comment.feature b/blocks/comments/tests/behat/delete_comment.feature index 73f78dd4670d3..52421fcead258 100644 --- a/blocks/comments/tests/behat/delete_comment.feature +++ b/blocks/comments/tests/behat/delete_comment.feature @@ -18,16 +18,16 @@ Feature: Delete comment block messages | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Comments" block And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add "Comment from student1" comment to comments block And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add "Comment from teacher1" comment to comments block When I delete "Comment from student1" comment from comments block Then I should not see "Comment from student1" diff --git a/blocks/completionstatus/tests/behat/block_completionstatus.feature b/blocks/completionstatus/tests/behat/block_completionstatus.feature index 9fd829510aa6c..f01348eee8752 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus.feature @@ -19,7 +19,7 @@ Feature: Enable Block Completion in a course Scenario: Add the block to a the course where completion is disabled Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: @@ -30,7 +30,7 @@ Feature: Enable Block Completion in a course Scenario: Add the block to a the course where completion is not set Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Course completion status" block Then I should see "No completion criteria set for this course" in the "Course completion status" "block" @@ -40,7 +40,7 @@ Feature: Enable Block Completion in a course | activity | course | idnumber | name | intro | | page | C1 | page1 | Test page name | Test page description | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature index 0a31bb7bb36ad..2d207c63c6eba 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature @@ -22,7 +22,7 @@ Feature: Enable Block Completion in a course using activity completion Scenario: Add the block to a the course and add course completion items Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration @@ -38,13 +38,13 @@ Feature: Enable Block Completion in a course using activity completion And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Status: Not yet started" in the "Course completion status" "block" And I should see "0 of 1" in the "Activity completion" "table_row" Scenario: Add the block to a the course and add course completion items Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration @@ -60,14 +60,14 @@ Feature: Enable Block Completion in a course using activity completion And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test page name" And I follow "C1" Then I should see "Status: Pending" in the "Course completion status" "block" And I should see "0 of 1" in the "Activity completion" "table_row" And I trigger cron And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "1 of 1" in the "Activity completion" "table_row" And I follow "More details" And I should see "Yes" in the "Activity completion" "table_row" diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature index 7d4c3f6c0f023..bc3c00c032c99 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature @@ -21,7 +21,7 @@ Feature: Enable Block Completion in a course using manual completion by others Scenario: Add the block to a the course and mark a student complete. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Course completion status" block And I navigate to "Course completion" node in "Course administration" @@ -31,12 +31,12 @@ Feature: Enable Block Completion in a course using manual completion by others And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Status: Not yet started" in the "Course completion status" "block" And I should see "No" in the "Teacher" "table_row" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record @@ -46,7 +46,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I am on site homepage And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Status: Complete" in the "Course completion status" "block" And I should see "Yes" in the "Teacher" "table_row" And I follow "More details" @@ -54,7 +54,7 @@ Feature: Enable Block Completion in a course using manual completion by others Scenario: Add the block to a the course and require multiple roles to mark a student complete. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Course completion status" block And I navigate to "Course completion" node in "Course administration" @@ -66,18 +66,18 @@ Feature: Enable Block Completion in a course using manual completion by others And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Status: Not yet started" in the "Course completion status" "block" And I should see "No" in the "Teacher" "table_row" And I should see "No" in the "Non-editing teacher" "table_row" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Status: In progress" in the "Course completion status" "block" And I should see "Yes" in the "Teacher" "table_row" And I should see "No" in the "Non-editing teacher" "table_row" @@ -86,7 +86,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I should see "No" in the "Marked complete by Non-editing teacher" "table_row" And I log out And I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record @@ -96,7 +96,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I am on site homepage And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Status: Complete" in the "Course completion status" "block" And I should see "Yes" in the "Teacher" "table_row" And I should see "Yes" in the "Non-editing teacher" "table_row" diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature index 81b02980442bc..e46596f6e29f7 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature @@ -17,7 +17,7 @@ Feature: Enable Block Completion in a course using manual self completion | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Course completion status" block And I add the "Self completion" block @@ -28,7 +28,7 @@ Feature: Enable Block Completion in a course using manual self completion And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Status: Not yet started" in the "Course completion status" "block" And I should see "No" in the "Self completion" "table_row" And I follow "Complete course" @@ -40,7 +40,7 @@ Feature: Enable Block Completion in a course using manual self completion And I wait "1" seconds And I run the scheduled task "core\task\completion_regular_task" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Status: Complete" in the "Course completion status" "block" And I should see "Yes" in the "Self completion" "table_row" And I follow "More details" 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 c4273008f28b4..ebb64e40232dc 100644 --- a/blocks/course_list/tests/behat/block_course_list_category.feature +++ b/blocks/course_list/tests/behat/block_course_list_category.feature @@ -58,7 +58,7 @@ Feature: Enable the course_list block on a category page and view it's contents And I should see "Course 2" in the "My courses" "block" And I should see "Course 3" in the "My courses" "block" And I should not see "Course 4" in the "My courses" "block" - And I follow "Course 3" + And I am on course page "Course 3" And I should see "Course 3" Scenario: Add the course list block on category page and view as an admin diff --git a/blocks/course_list/tests/behat/block_course_list_course.feature b/blocks/course_list/tests/behat/block_course_list_course.feature index 0441dfbb82555..393da8e1c4063 100644 --- a/blocks/course_list/tests/behat/block_course_list_course.feature +++ b/blocks/course_list/tests/behat/block_course_list_course.feature @@ -27,7 +27,7 @@ Feature: Enable the course_list block on a course page and view it's contents Scenario: Add the course list block on course page and navigate to the course listing Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Courses" block Then I should see "Course 1" in the "My courses" "block" @@ -39,20 +39,20 @@ Feature: Enable the course_list block on a course page and view it's contents Scenario: Add the course list block on course page and navigate to another course Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Courses" block Then I should see "Course 1" in the "My courses" "block" And I should see "Course 2" in the "My courses" "block" And I should see "Course 3" in the "My courses" "block" And I should not see "Course 4" in the "My courses" "block" - And I follow "Course 3" + And I am on course page "Course 3" And I should see "Course 3" Scenario: Add the course list block on course page and view as an admin Given I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Courses" block Then I should see "Miscellaneous" in the "Course categories" "block" @@ -68,7 +68,7 @@ Feature: Enable the course_list block on a course page and view it's contents Given the following config values are set as admin: | block_course_list_hideallcourseslink | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Courses" block Then I should not see "All courses" in the "My courses" "block" @@ -81,7 +81,7 @@ Feature: Enable the course_list block on a course page and view it's contents | admin | C1 | editingteacher | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Courses" block Then I should not see "Miscellaneous" in the "My courses" "block" diff --git a/blocks/course_list/tests/behat/block_course_list_dashboard.feature b/blocks/course_list/tests/behat/block_course_list_dashboard.feature index 33f50594cf5e5..42211ed53a65c 100644 --- a/blocks/course_list/tests/behat/block_course_list_dashboard.feature +++ b/blocks/course_list/tests/behat/block_course_list_dashboard.feature @@ -44,7 +44,7 @@ Feature: Enable the course_list block on the dashboard and view it's contents And I should see "Course 2" in the "My courses" "block" And I should see "Course 3" in the "My courses" "block" And I should not see "Course 4" in the "My courses" "block" - And I follow "Course 3" + And I am on course page "Course 3" And I should see "Course 3" Scenario: Add the course list block on the dashboard and view as an admin diff --git a/blocks/course_list/tests/behat/block_course_list_frontpage.feature b/blocks/course_list/tests/behat/block_course_list_frontpage.feature index e13a38019bd65..02189f140da94 100644 --- a/blocks/course_list/tests/behat/block_course_list_frontpage.feature +++ b/blocks/course_list/tests/behat/block_course_list_frontpage.feature @@ -52,7 +52,7 @@ Feature: Enable the course_list block on the frontpage and view it's contents And I should see "Course 2" in the "My courses" "block" And I should see "Course 3" in the "My courses" "block" And I should not see "Course 4" in the "My courses" "block" - And I follow "Course 3" + And I am on course page "Course 3" And I should see "Course 3" Scenario: Add the course list block on the frontpage page and view as an admin diff --git a/blocks/course_summary/tests/behat/block_course_summary_course.feature b/blocks/course_summary/tests/behat/block_course_summary_course.feature index defb9f7f52772..e8ff436e6d926 100644 --- a/blocks/course_summary/tests/behat/block_course_summary_course.feature +++ b/blocks/course_summary/tests/behat/block_course_summary_course.feature @@ -17,21 +17,21 @@ Feature: Course summary block used in a course | student1 | C101 | student | | teacher1 | C101 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Course/site summary" block And I log out Scenario: Student can view course summary When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then "Course summary" "block" should exist And I should see "Course summary" in the "Course summary" "block" And I should see "Proved the course summary block works!" in the "Course summary" "block" Scenario: Teacher can not see edit icon when edit mode is off When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Proved the course summary block works!" in the "Course summary" "block" And I should see "Course summary" in the "Course summary" "block" And "Edit" "link" should not exist in the "Course summary" "block" diff --git a/blocks/glossary_random/tests/behat/glossary_random.feature b/blocks/glossary_random/tests/behat/glossary_random.feature index 974a1ffafe101..73eebd0abfa8e 100644 --- a/blocks/glossary_random/tests/behat/glossary_random.feature +++ b/blocks/glossary_random/tests/behat/glossary_random.feature @@ -19,13 +19,13 @@ Feature: Random glossary entry block is used in a course Scenario: Student can not see the block if it is not configured When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Random glossary entry" block Then I should see "Please configure this block using the edit icon" in the "block_glossary_random" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "block_glossary_random" "block" should not exist And I log out @@ -34,7 +34,7 @@ Feature: Random glossary entry block is used in a course | activity | name | intro | course | idnumber | defaultapproval | | glossary | GlossaryAuto | Test glossary description | C1 | glossary1 | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block @@ -45,14 +45,14 @@ Feature: Random glossary entry block is used in a course And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block" And I click on "Add a new entry" "link" in the "AutoGlossaryblock" "block" And I set the following fields to these values: | Concept | Concept1 | | Definition | Definition1 | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Concept1" in the "AutoGlossaryblock" "block" And I should see "Definition1" in the "AutoGlossaryblock" "block" And I should not see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block" @@ -61,7 +61,7 @@ Feature: Random glossary entry block is used in a course | Concept | Concept2 | | Definition | Definition2 | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" # Only the last entry appears in the block And I should not see "Concept1" in the "AutoGlossaryblock" "block" And I should not see "Definition1" in the "AutoGlossaryblock" "block" @@ -78,7 +78,7 @@ Feature: Random glossary entry block is used in a course | activity | name | intro | course | idnumber | defaultapproval | | glossary | GlossaryManual | Test glossary description | C1 | glossary2 | 0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block @@ -89,18 +89,18 @@ Feature: Random glossary entry block is used in a course And I press "Save changes" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" And I click on "Add a new entry" "link" in the "ManualGlossaryblock" "block" And I set the following fields to these values: | Concept | Concept1 | | Definition | Definition1 | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" And I follow "GlossaryManual" And I follow "Waiting approval" diff --git a/blocks/glossary_random/tests/behat/glossary_random_global.feature b/blocks/glossary_random/tests/behat/glossary_random_global.feature index 2eea426a972c4..eabde287f82d8 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_global.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_global.feature @@ -24,7 +24,7 @@ Feature: Random glossary entry block linking to global glossary Scenario: View random (last) entry in the global glossary When I log in as "admin" And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Tips and Tricks" And I press "Add a new entry" And I set the following fields to these values: @@ -34,7 +34,7 @@ Feature: Random glossary entry block linking to global glossary And I log out # As a teacher add a block to the course page linking to the global glossary. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block @@ -49,7 +49,7 @@ Feature: Random glossary entry block linking to global glossary And I log out # Student who can't see the module is still able to view entries in this block (because the glossary was marked as global) And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Never come late" in the "Tip of the day" "block" And I should not see "Add a new entry" in the "Tip of the day" "block" And I should see "View all entries" in the "Tip of the day" "block" @@ -57,7 +57,7 @@ Feature: Random glossary entry block linking to global glossary Scenario: Removing the global glossary that is used in random glossary block And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block @@ -69,16 +69,16 @@ Feature: Random glossary entry block linking to global glossary And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Tips and Tricks" And I follow "Edit settings" And I set the field "globalglossary" to "0" And I press "Save and return to course" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Please configure this block using the edit icon." in the "Tip of the day" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "Tip of the day" "block" should not exist And I log out diff --git a/blocks/html/tests/behat/course_block.feature b/blocks/html/tests/behat/course_block.feature index 0815badd43d2c..a31d6262cab63 100644 --- a/blocks/html/tests/behat/course_block.feature +++ b/blocks/html/tests/behat/course_block.feature @@ -17,7 +17,7 @@ Feature: HTML blocks in a course | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "HTML" block And I configure the "(new HTML block)" block @@ -31,6 +31,6 @@ Feature: HTML blocks in a course And I press "Save changes" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "First block content" in the "First block header" "block" And I should see "Second block content" in the "Second block header" "block" \ No newline at end of file diff --git a/blocks/messages/tests/behat/block_messages_course.feature b/blocks/messages/tests/behat/block_messages_course.feature index 43446c2e82a30..a7ac54d24a85e 100644 --- a/blocks/messages/tests/behat/block_messages_course.feature +++ b/blocks/messages/tests/behat/block_messages_course.feature @@ -21,14 +21,14 @@ Feature: The messages block allows users to list new messages an a course Given the following config values are set as admin: | messaging | 0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I turn editing mode on And I add the "Messages" block Then I should see "Messaging is disabled on this site" in the "Messages" "block" Scenario: View the block by a user who does not have any messages. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I turn editing mode on And I add the "Messages" block Then I should see "No messages" in the "Messages" "block" @@ -41,7 +41,7 @@ Feature: The messages block allows users to list new messages an a course And I send "This is message 2" message to "Teacher 1" user And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I turn editing mode on And I add the "Messages" block Then I should see "Student 1" in the "Messages" "block" @@ -49,12 +49,12 @@ Feature: The messages block allows users to list new messages an a course @javascript Scenario: Use the block to send a message to a user. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Messages" block And I click on "//a[normalize-space(.) = 'Messages']" "xpath_element" in the "Messages" "block" And I send "This is message 1" message to "Student 1" user And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Teacher 1" in the "Messages" "block" diff --git a/blocks/myprofile/tests/behat/block_myprofile_activity.feature b/blocks/myprofile/tests/behat/block_myprofile_activity.feature index fb7cfd2d08465..fd229d04ee2f1 100644 --- a/blocks/myprofile/tests/behat/block_myprofile_activity.feature +++ b/blocks/myprofile/tests/behat/block_myprofile_activity.feature @@ -18,7 +18,7 @@ Feature: The logged in user block allows users to view their profile information | activity | course | idnumber | name | intro | | page | C1 | page1 | Test page name | Test page description | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" When I add the "Logged in user" block diff --git a/blocks/myprofile/tests/behat/block_myprofile_course.feature b/blocks/myprofile/tests/behat/block_myprofile_course.feature index 81d22767a6c0d..8be34f6354a8a 100644 --- a/blocks/myprofile/tests/behat/block_myprofile_course.feature +++ b/blocks/myprofile/tests/behat/block_myprofile_course.feature @@ -15,7 +15,7 @@ Feature: The logged in user block allows users to view their profile information | user | course | role | | teacher1 | C1 | editingteacher | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Logged in user" block Then I should see "Teacher One" in the "Logged in user" "block" diff --git a/blocks/navigation/tests/behat/expand_courses_node.feature b/blocks/navigation/tests/behat/expand_courses_node.feature index 56c85bf877df1..bf7da76657401 100644 --- a/blocks/navigation/tests/behat/expand_courses_node.feature +++ b/blocks/navigation/tests/behat/expand_courses_node.feature @@ -45,7 +45,7 @@ Feature: Expand the courses nodes within the navigation block | Page contexts | Display throughout the entire site | And I press "Save changes" And I turn editing mode off - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Enrolment methods" node in "Course administration > Users" And I click on "Edit" "link" in the "Guest access" "table_row" And I set the following fields to these values: diff --git a/blocks/news_items/tests/behat/display_news.feature b/blocks/news_items/tests/behat/display_news.feature index 2093c763d26ae..0cbf8616e9693 100644 --- a/blocks/news_items/tests/behat/display_news.feature +++ b/blocks/news_items/tests/behat/display_news.feature @@ -17,7 +17,7 @@ Feature: Latest announcements block displays the course latest news And I enrol "Teacher 1" user as "Teacher" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Latest announcements" block And I turn editing mode off @@ -30,7 +30,7 @@ Feature: Latest announcements block displays the course latest news And I add a new topic to "Announcements" forum with: | Subject | Discussion Three | | Message | Not important | - And I follow "Course 1" + And I am on course page "Course 1" 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" diff --git a/blocks/online_users/tests/behat/block_online_users_course.feature b/blocks/online_users/tests/behat/block_online_users_course.feature index f2022354fc368..2e147e265adbf 100644 --- a/blocks/online_users/tests/behat/block_online_users_course.feature +++ b/blocks/online_users/tests/behat/block_online_users_course.feature @@ -21,21 +21,21 @@ Feature: The online users block allow you to see who is currently online Scenario: Add the online users on course page and see myself Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Online users" block Then I should see "Teacher 1" in the "Online users" "block" Scenario: Add the online users on course page and see other logged in users Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Online users" block And I log out And I log in as "student2" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Teacher 1" in the "Online users" "block" And I should see "Student 1" in the "Online users" "block" And I should not see "Student 2" in the "Online users" "block" diff --git a/blocks/participants/tests/behat/block_participants_course.feature b/blocks/participants/tests/behat/block_participants_course.feature index b50286e7734ac..449212051998c 100644 --- a/blocks/participants/tests/behat/block_participants_course.feature +++ b/blocks/participants/tests/behat/block_participants_course.feature @@ -16,20 +16,20 @@ Feature: People Block used in a course | student1 | C101 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "People" block And I log out Scenario: Student can view participants link When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then "People" "block" should exist And I should see "Participants" in the "People" "block" Scenario: Student can follow participants link and be directed to the correct page When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Participants" "link" in the "People" "block" Then I should see "All participants" in the "#page-content" "css_element" And the "My courses" select box should contain "C101" @@ -39,5 +39,5 @@ Feature: People Block used in a course | capability | permission | role | contextlevel | reference | | moodle/course:viewparticipants | Prevent | student | Course | C101 | When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then "People" "block" should not exist diff --git a/blocks/private_files/tests/behat/block_private_files_activity.feature b/blocks/private_files/tests/behat/block_private_files_activity.feature index d857871988233..389b837922da8 100644 --- a/blocks/private_files/tests/behat/block_private_files_activity.feature +++ b/blocks/private_files/tests/behat/block_private_files_activity.feature @@ -18,7 +18,7 @@ Feature: The private files block allows users to store files privately in moodle | activity | course | idnumber | name | intro | | page | C1 | page1 | Test page name | Test page description | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test page name" And I add the "Private files" block diff --git a/blocks/private_files/tests/behat/block_private_files_course.feature b/blocks/private_files/tests/behat/block_private_files_course.feature index b56c15b522b27..b086353b824e4 100644 --- a/blocks/private_files/tests/behat/block_private_files_course.feature +++ b/blocks/private_files/tests/behat/block_private_files_course.feature @@ -15,7 +15,7 @@ Feature: The private files block allows users to store files privately in moodle | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Private files" block And I should see "No files available" in the "Private files" "block" diff --git a/blocks/recent_activity/tests/behat/structural_changes.feature b/blocks/recent_activity/tests/behat/structural_changes.feature index 067b5730dad86..8195b2ee1188b 100644 --- a/blocks/recent_activity/tests/behat/structural_changes.feature +++ b/blocks/recent_activity/tests/behat/structural_changes.feature @@ -47,7 +47,7 @@ Feature: View structural changes in recent activity block Scenario: Check that Added module information is displayed respecting view capability Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "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: @@ -100,7 +100,7 @@ Feature: View structural changes in recent activity block And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block" @@ -111,7 +111,7 @@ Feature: View structural changes in recent activity block And I should not see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block" @@ -122,7 +122,7 @@ Feature: View structural changes in recent activity block And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "ForumVisibleGroups" in the "Recent activity" "block" And I should see "ForumSeparateGroups" in the "Recent activity" "block" And I should see "ForumNoGroups" in the "Recent activity" "block" @@ -134,7 +134,7 @@ Feature: View structural changes in recent activity block And I log out # Teachers have capability to see all groups and hidden activities And I log in as "assistant1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "ForumHidden" in the "Recent activity" "block" And I should see "ForumVisibleGroupsG1" in the "Recent activity" "block" And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block" @@ -144,7 +144,7 @@ Feature: View structural changes in recent activity block Scenario: Updates and deletes in recent activity block When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "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: @@ -155,7 +155,7 @@ Feature: View structural changes in recent activity block And I log out And I wait "1" seconds And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Added Forum" in the "Recent activity" "block" And I should see "ForumNew" in the "Recent activity" "block" And I log out @@ -163,7 +163,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Update forum as a teacher And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "ForumNew" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -173,7 +173,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Student 1 already saw that forum was created, now he can see that forum was updated And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block" And I should see "Updated Forum" in the "Recent activity" "block" @@ -182,7 +182,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Student 2 has bigger interval and he can see one entry that forum was created but with the new name And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Added Forum" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block" @@ -191,7 +191,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Delete forum as a teacher And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I delete "ForumUpdated" activity And I run all adhoc tasks @@ -199,7 +199,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Students 1 and 2 see that forum was deleted And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block" @@ -209,7 +209,7 @@ Feature: View structural changes in recent activity block And I wait "1" seconds # Student 3 never knew that forum was created, so he does not see anything And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Added Forum" in the "Recent activity" "block" And I should not see "ForumNew" in the "Recent activity" "block" And I should not see "Updated Forum" in the "Recent activity" "block" 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 dedc8bcd1b4cb..ba59a4e1ea311 100644 --- a/blocks/search_forums/tests/behat/block_search_forums_course.feature +++ b/blocks/search_forums/tests/behat/block_search_forums_course.feature @@ -17,7 +17,7 @@ Feature: The search forums block allows users to search for forum posts on cours | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" 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" @@ -28,7 +28,7 @@ Feature: The search forums block allows users to search for forum posts on cours Scenario: Use the search forum block in a course without any forum posts Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I set the following fields to these values: | searchform_search | Moodle | And I press "Go" @@ -36,11 +36,11 @@ Feature: The search forums block allows users to search for forum posts on cours Scenario: Use the search forum block in a course with a hidden forum and search for posts Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new topic to "Announcements" forum with: | Subject | My subject | | Message | My message | - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Announcements" And I navigate to "Edit settings" in current page administration @@ -49,7 +49,7 @@ Feature: The search forums block allows users to search for forum posts on cours And I press "Save and return to course" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "Search forums" "block" should exist And I set the following fields to these values: | searchform_search | message | @@ -58,13 +58,13 @@ Feature: The search forums block allows users to search for forum posts on cours Scenario: Use the search forum block in a course and search for posts Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new topic to "Announcements" forum with: | Subject | My subject | | Message | My message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "Search forums" "block" should exist And I set the following fields to these values: | searchform_search | message | diff --git a/blocks/section_links/tests/behat/block_section_links_course.feature b/blocks/section_links/tests/behat/block_section_links_course.feature index f43f6fd9287af..e677a5a48b859 100644 --- a/blocks/section_links/tests/behat/block_section_links_course.feature +++ b/blocks/section_links/tests/behat/block_section_links_course.feature @@ -15,7 +15,7 @@ Feature: The section links block allows users to quickly navigate around a moodl | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "5" and I fill the form with: | Assignment name | Test assignment 1 | diff --git a/blocks/social_activities/tests/behat/edit_activities.feature b/blocks/social_activities/tests/behat/edit_activities.feature index a29b0666fe351..4b496d082cda9 100644 --- a/blocks/social_activities/tests/behat/edit_activities.feature +++ b/blocks/social_activities/tests/behat/edit_activities.feature @@ -20,7 +20,7 @@ Feature: Edit activities in social activities block @javascript Scenario: Edit name of acitivity in-place in social activities block Given I log in as "user1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on 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" @@ -41,7 +41,7 @@ Feature: Edit activities in social activities block | allowstealth | 1 | And I log out And I log in as "user1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Recent activity" block And I set the field "Add an activity to section 'section 0'" to "Forum" @@ -81,7 +81,7 @@ Feature: Edit activities in social activities block And I log out # Student will not see the module on the course page but can access it from other reports and blocks: And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "My forum name" in the "Social activities" "block" And I click on "My forum name" "link" in the "Recent activity" "block" And I should see "My forum name" in the ".breadcrumb" "css_element" diff --git a/blocks/tags/tests/behat/tagcloud.feature b/blocks/tags/tests/behat/tagcloud.feature index 9c7ee6b56335c..394ab3adff2e1 100644 --- a/blocks/tags/tests/behat/tagcloud.feature +++ b/blocks/tags/tests/behat/tagcloud.feature @@ -35,12 +35,12 @@ Feature: Block tags displaying tag cloud Scenario: Add Tags block in a course When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Tags" block And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Dogs" in the "Tags" "block" And I should see "Cats" in the "Tags" "block" And I should not see "Neverusedtag" in the "Tags" "block" diff --git a/blocks/tests/behat/add_blocks.feature b/blocks/tests/behat/add_blocks.feature index 5d17e01ade67a..fd77dd4cd8286 100644 --- a/blocks/tests/behat/add_blocks.feature +++ b/blocks/tests/behat/add_blocks.feature @@ -18,7 +18,7 @@ Feature: Add blocks | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Blog menu" block Then I should see "View my entries about this course" diff --git a/blocks/tests/behat/configure_block_throughout_site.feature b/blocks/tests/behat/configure_block_throughout_site.feature index a9d31d7af1b8d..188bda64b9d6c 100644 --- a/blocks/tests/behat/configure_block_throughout_site.feature +++ b/blocks/tests/behat/configure_block_throughout_site.feature @@ -36,7 +36,7 @@ Feature: Add and configure blocks throughout the site And I set the following fields to these values: | Page contexts | Display throughout the entire site | And I press "Save changes" - When I follow "Course 1" + When I am on course page "Course 1" Then I should see "Comments" in the "Comments" "block" And I should see "Save comment" in the "Comments" "block" And I am on site homepage @@ -44,7 +44,7 @@ Feature: Add and configure blocks throughout the site And I set the following fields to these values: | Default weight | -10 (first) | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" # The first block matching the pattern should be top-left block And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::*[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element" @@ -55,7 +55,7 @@ Feature: Add and configure blocks throughout the site Scenario: Blocks on courses can have roles assigned to them Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "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" diff --git a/blocks/tests/behat/hidden_block_region.feature b/blocks/tests/behat/hidden_block_region.feature index 6abadca1865e5..7fa1a8ee55212 100644 --- a/blocks/tests/behat/hidden_block_region.feature +++ b/blocks/tests/behat/hidden_block_region.feature @@ -12,7 +12,7 @@ Feature: Show hidden blocks in a docked block region when editing | user | course | role | | admin | C1 | editingteacher | And I log in as "admin" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Search forums" block And I add the "Latest announcements" block diff --git a/blocks/tests/behat/hide_blocks.feature b/blocks/tests/behat/hide_blocks.feature index c83bd02c4f3bd..07fb5d32454d1 100644 --- a/blocks/tests/behat/hide_blocks.feature +++ b/blocks/tests/behat/hide_blocks.feature @@ -10,7 +10,7 @@ Feature: Block visibility | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript diff --git a/blocks/tests/behat/manage_blocks.feature b/blocks/tests/behat/manage_blocks.feature index 8cca1cf1b9a08..340c4afe09423 100644 --- a/blocks/tests/behat/manage_blocks.feature +++ b/blocks/tests/behat/manage_blocks.feature @@ -16,7 +16,7 @@ Feature: Block appearances | teacher1 | C1 | editingteacher | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Turn editing on" And I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | @@ -32,7 +32,7 @@ Feature: Block appearances And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Turn editing on" And I add the "Comments" block And I configure the "Comments" block @@ -43,7 +43,7 @@ Feature: Block appearances Scenario: Block settings can be modified so that a block apprears on any page When I follow "Test survey name" Then I should see "Comments" in the "Comments" "block" - And I follow "Course 1" + And I am on course page "Course 1" And I configure the "Comments" block And I set the following fields to these values: | Display on page types | Any course page | diff --git a/blocks/tests/behat/move_blocks.feature b/blocks/tests/behat/move_blocks.feature index 8771a9fc78705..49fac620d360e 100644 --- a/blocks/tests/behat/move_blocks.feature +++ b/blocks/tests/behat/move_blocks.feature @@ -16,7 +16,7 @@ Feature: Block region moving | teacher1 | C1 | editingteacher | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Turn editing on" And I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | @@ -32,7 +32,7 @@ Feature: Block region moving And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Turn editing on" And I add the "Comments" block And I configure the "Comments" block diff --git a/blocks/tests/behat/restrict_available_blocks.feature b/blocks/tests/behat/restrict_available_blocks.feature index 6a5c2a11ff21e..bfc6ec4c90bb4 100644 --- a/blocks/tests/behat/restrict_available_blocks.feature +++ b/blocks/tests/behat/restrict_available_blocks.feature @@ -17,7 +17,7 @@ Feature: Allowed blocks controls Scenario: Blocks can be added with the default permissions Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add the "Course completion status" block And I add the "Activities" block @@ -29,13 +29,13 @@ Feature: Allowed blocks controls And I set the following system permissions of "Teacher" role: | block/activity_modules:addinstance | Prohibit | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | block/completionstatus:addinstance | Prohibit | And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Then the add block selector should not contain "Activities" block And the add block selector should not contain "Course completion status" block diff --git a/blocks/tests/behat/return_block_original_state.feature b/blocks/tests/behat/return_block_original_state.feature index 98226cdffaa5a..73613bfa77ef6 100644 --- a/blocks/tests/behat/return_block_original_state.feature +++ b/blocks/tests/behat/return_block_original_state.feature @@ -10,7 +10,7 @@ Feature: The context of a block can always be returned to it's original state. | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Turn editing on" And I add the "Tags" block Then I should see "Tags" in the "Tags" "block" @@ -19,7 +19,7 @@ Feature: The context of a block can always be returned to it's original state. And I set the following fields to these values: | Display on page types | Any page | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Assignment1 | | Description | Description | @@ -29,11 +29,11 @@ Feature: The context of a block can always be returned to it's original state. | Display on page types | Any assignment module page | And I press "Save changes" And I should see "Tags" in the "Tags" "block" - And I follow "Course 1" + And I am on course page "Course 1" And "Tags" "block" should not exist And I navigate to course participants And "Tags" "block" should not exist - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Assignment2 | | Description | Description | @@ -43,7 +43,7 @@ Feature: The context of a block can always be returned to it's original state. And I set the following fields to these values: | Display on page types | Any page | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Tags" in the "Tags" "block" And I navigate to course participants And I should see "Tags" in the "Tags" "block" diff --git a/blog/tests/behat/blog_visibility.feature b/blog/tests/behat/blog_visibility.feature index e135681073142..5087b47757626 100644 --- a/blog/tests/behat/blog_visibility.feature +++ b/blog/tests/behat/blog_visibility.feature @@ -26,7 +26,7 @@ Feature: Blogs can be set to be only visible by the author. Scenario: A student can not see another student's blog entries. Given I log in as "testuser" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Test2 User2" And I should see "Miscellaneous" diff --git a/calendar/tests/behat/calendar.feature b/calendar/tests/behat/calendar.feature index c026cfe4360f6..b1589e5a02d99 100644 --- a/calendar/tests/behat/calendar.feature +++ b/calendar/tests/behat/calendar.feature @@ -25,7 +25,7 @@ Feature: Perform basic calendar functionality | student1 | G1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Calendar" block @@ -37,7 +37,7 @@ Feature: Perform basic calendar functionality And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "This month" And I should see "Really awesome event!" And I log out @@ -53,7 +53,7 @@ Feature: Perform basic calendar functionality And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "This month" And I should see "Really awesome event!" And I log out @@ -70,7 +70,7 @@ Feature: Perform basic calendar functionality And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "This month" And I follow "Really awesome event!" And "Group 1" "text" should exist in the ".eventlist" "css_element" @@ -87,7 +87,7 @@ Feature: Perform basic calendar functionality And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "This month" And I should not see "Really awesome event!" diff --git a/calendar/tests/behat/calendar_lookahead.feature b/calendar/tests/behat/calendar_lookahead.feature index 9c6c046fd0dbe..dc0b16b4f1bec 100644 --- a/calendar/tests/behat/calendar_lookahead.feature +++ b/calendar/tests/behat/calendar_lookahead.feature @@ -37,5 +37,5 @@ Feature: Limit displayed upcoming events And I press "Save changes" And I wait to be redirected And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Two months away event" diff --git a/cohort/tests/behat/access_visible_cohorts.feature b/cohort/tests/behat/access_visible_cohorts.feature index e9131933857a3..917e127923b43 100644 --- a/cohort/tests/behat/access_visible_cohorts.feature +++ b/cohort/tests/behat/access_visible_cohorts.feature @@ -46,7 +46,7 @@ Feature: Access visible and hidden cohorts Scenario: Teacher can see visible cohorts defined in the above contexts When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" @@ -58,10 +58,10 @@ Feature: Access visible and hidden cohorts And the "Cohort" select box should contain "System empty cohort" And I set the field "Cohort" to "System cohort" And I press "Add method" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolled users" node in "Course administration > Users" And I should see "student@example.com" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Groups" node in "Course administration > Users" And I press "Auto-create groups" And the "Select members from cohort" select box should contain "Cohort in category 1" @@ -75,7 +75,7 @@ Feature: Access visible and hidden cohorts Scenario: System manager can see all cohorts defined in the above contexts When I log in as "user1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" @@ -102,7 +102,7 @@ Feature: Access visible and hidden cohorts Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above When I log in as "user2" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I select "Cohort sync" from the "Add method" singleselect Then the "Cohort" select box should contain "Cohort in category 1" diff --git a/cohort/tests/behat/upload_cohort_users.feature b/cohort/tests/behat/upload_cohort_users.feature index 68adda85f835a..76cbe33f3fd93 100644 --- a/cohort/tests/behat/upload_cohort_users.feature +++ b/cohort/tests/behat/upload_cohort_users.feature @@ -16,11 +16,11 @@ Feature: Upload users to a cohort | Course 2 | C2 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add "Cohort sync" enrolment method with: | Cohort | Cohort 1 | And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I add "Cohort sync" enrolment method with: | Cohort | Cohort 2 | When I navigate to "Upload users" node in "Site administration > Users > Accounts" @@ -37,13 +37,13 @@ Feature: Upload users to a cohort And the "Current users" select box should contain "Mary Smith (marysmith@example.com)" And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Enrolled users" in current page administration And I should see "Tom Jones" And I should see "Bob Jones" And I should not see "Mary Smith" And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Users > Enrolled users" in current page administration And I should see "Mary Smith" And I should see "Alice Smith" diff --git a/completion/tests/behat/enable_manual_complete_mark.feature b/completion/tests/behat/enable_manual_complete_mark.feature index 848b3155566c9..6d9a0068144cd 100644 --- a/completion/tests/behat/enable_manual_complete_mark.feature +++ b/completion/tests/behat/enable_manual_complete_mark.feature @@ -19,7 +19,7 @@ Feature: Allow students to manually mark an activity as complete | student1 | C1 | student | And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -32,12 +32,12 @@ Feature: Allow students to manually mark an activity as complete And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I click on "Not completed: Test forum name. Select to mark as complete." "icon" Then the "Test forum name" "forum" activity with "manual" completion should be marked as complete And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Reports > Activity completion" in current page administration And "Student First" user has completed "Test forum name" activity diff --git a/completion/tests/behat/restrict_activity_by_date.feature b/completion/tests/behat/restrict_activity_by_date.feature index 3f94122bc0f99..7f6b126d314a8 100644 --- a/completion/tests/behat/restrict_activity_by_date.feature +++ b/completion/tests/behat/restrict_activity_by_date.feature @@ -18,7 +18,7 @@ Feature: Restrict activity availability through date conditions | student1 | C1 | student | And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Adding the page like this because id_available*_enabled needs to be clicked to trigger the action. And I add a "Assignment" to section "1" @@ -40,7 +40,7 @@ Feature: Restrict activity availability through date conditions And I log out When I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Available from 31 December 2037" And "Test assignment 1" activity should be dimmed And "Test assignment 1" "link" should not exist @@ -65,5 +65,5 @@ Feature: Restrict activity availability through date conditions And I log out When I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should not see "Test assignment 2" diff --git a/completion/tests/behat/restrict_activity_by_grade.feature b/completion/tests/behat/restrict_activity_by_grade.feature index 6c970e87da2a0..5706d957fca82 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -19,7 +19,7 @@ Feature: Restrict activity availability through grade conditions | student1 | C1 | student | And I log in as "teacher1" #And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Grade assignment | @@ -42,7 +42,7 @@ Feature: Restrict activity availability through grade conditions And I log out When I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Not available unless: You achieve a required score in Grade assignment" And "Test page name" activity should be dimmed And "Test page name" "link" should not exist @@ -55,7 +55,7 @@ Feature: Restrict activity availability through grade conditions And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Grade assignment" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student First" "table_row" @@ -67,6 +67,6 @@ Feature: Restrict activity availability through grade conditions And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Test page name" activity should be visible And I should not see "Not available unless: You achieve a required score in Grade assignment" diff --git a/completion/tests/behat/restrict_section_availability.feature b/completion/tests/behat/restrict_section_availability.feature index f00c39f496046..58dfa275caa39 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -21,7 +21,7 @@ Feature: Restrict sections availability through completion or grade conditions Scenario: Show section greyed-out to student when completion condition is not satisfied Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -45,7 +45,7 @@ Feature: Restrict sections availability through completion or grade conditions And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Not available unless: The activity Test label is marked complete" And I should not see "Test page name" And I click on "Not completed: Test label. Select to mark as complete." "icon" @@ -56,7 +56,7 @@ Feature: Restrict sections availability through completion or grade conditions Scenario: Show section greyed-out to student when grade condition is not satisfied Given I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Grade assignment | @@ -79,7 +79,7 @@ Feature: Restrict sections availability through completion or grade conditions And I log out When I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Not available unless: You achieve a required score in Grade assignment" And "Test page name" activity should be hidden And I follow "Grade assignment" @@ -91,7 +91,7 @@ Feature: Restrict sections availability through completion or grade conditions And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Grade assignment" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student First" "table_row" @@ -103,6 +103,6 @@ Feature: Restrict sections availability through completion or grade conditions And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Test page name" activity should be visible And I should not see "Not available unless: You achieve a required score in Grade assignment" diff --git a/completion/tests/behat/teacher_manual_completion.feature b/completion/tests/behat/teacher_manual_completion.feature index ca0c35d90f03e..06a7fa29faa32 100644 --- a/completion/tests/behat/teacher_manual_completion.feature +++ b/completion/tests/behat/teacher_manual_completion.feature @@ -17,8 +17,7 @@ Feature: Allow teachers to manually mark users as complete when configured | student1 | CC1 | student | | teacher1 | CC1 | editingteacher | And I log in as "admin" - And I am on site homepage - And I follow "Completion course" + And I am on course page "Completion course" And completion tracking is "Enabled" in current course And I follow "Course completion" And I set the field "Teacher" to "1" @@ -27,13 +26,11 @@ Feature: Allow teachers to manually mark users as complete when configured And I add the "Course completion status" block And I log out And I log in as "student1" - And I am on site homepage - And I follow "Completion course" + And I am on course page "Completion course" And I should see "Status: Not yet started" And I log out When I log in as "teacher1" - And I am on site homepage - And I follow "Completion course" + And I am on course page "Completion course" And I follow "View course report" And I should see "Student First" And I follow "Click to mark user complete" @@ -44,6 +41,5 @@ Feature: Allow teachers to manually mark users as complete when configured And I am on site homepage And I log out Then I log in as "student1" - And I am on site homepage - And I follow "Completion course" + And I am on course page "Completion course" And I should see "Status: Complete" diff --git a/course/format/social/tests/behat/social_adjust_discussion_count.feature b/course/format/social/tests/behat/social_adjust_discussion_count.feature index 4c83c5a320cb1..343cee80824b0 100644 --- a/course/format/social/tests/behat/social_adjust_discussion_count.feature +++ b/course/format/social/tests/behat/social_adjust_discussion_count.feature @@ -15,14 +15,14 @@ Feature: Change number of discussions displayed | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I press "Add a new discussion topic" And I set the following fields to these values: | Subject | Forum Post 10 | | Message | This is forum post ten | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -30,7 +30,7 @@ Feature: Change number of discussions displayed | Message | This is forum post nine | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -38,7 +38,7 @@ Feature: Change number of discussions displayed | Message | This is forum post eight | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -46,7 +46,7 @@ Feature: Change number of discussions displayed | Message | This is forum post seven | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -54,7 +54,7 @@ Feature: Change number of discussions displayed | Message | This is forum post six | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -62,7 +62,7 @@ Feature: Change number of discussions displayed | Message | This is forum post five | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -70,7 +70,7 @@ Feature: Change number of discussions displayed | Message | This is forum post four | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -78,7 +78,7 @@ Feature: Change number of discussions displayed | Message | This is forum post three | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -86,7 +86,7 @@ Feature: Change number of discussions displayed | Message | This is forum post two | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I wait "1" seconds And I press "Add a new discussion topic" And I set the following fields to these values: @@ -94,7 +94,7 @@ Feature: Change number of discussions displayed | Message | This is forum post one | And I press "Post to forum" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" Scenario: When number of discussions is decreased fewer discussions appear Given I navigate to "Edit settings" in current page administration diff --git a/course/format/topics/tests/behat/edit_delete_sections.feature b/course/format/topics/tests/behat/edit_delete_sections.feature index 1c836478c7b03..26946f3cb255a 100644 --- a/course/format/topics/tests/behat/edit_delete_sections.feature +++ b/course/format/topics/tests/behat/edit_delete_sections.feature @@ -21,7 +21,7 @@ Feature: Sections can be edited and deleted in topics format | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: View the default name of the general section in topics format @@ -62,7 +62,7 @@ Feature: Sections can be edited and deleted in topics format 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 am on course page "Course 1" 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" diff --git a/course/format/weeks/tests/behat/edit_delete_sections.feature b/course/format/weeks/tests/behat/edit_delete_sections.feature index 6269da09f5ae8..788f84ff6e07f 100644 --- a/course/format/weeks/tests/behat/edit_delete_sections.feature +++ b/course/format/weeks/tests/behat/edit_delete_sections.feature @@ -21,7 +21,7 @@ Feature: Sections can be edited and deleted in weeks format | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: View the default name of the general section in weeks format @@ -67,7 +67,7 @@ Feature: Sections can be edited and deleted in weeks format 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 am on course page "Course 1" 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" diff --git a/course/tests/behat/activities_edit_completion.feature b/course/tests/behat/activities_edit_completion.feature index c4f44b7b95948..2004776ac4d6b 100644 --- a/course/tests/behat/activities_edit_completion.feature +++ b/course/tests/behat/activities_edit_completion.feature @@ -10,7 +10,7 @@ Feature: Edit completion settings of an activity | Course 1 | C1 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Page" to section "1" and I fill the form with: | Name | TestPage | @@ -18,7 +18,7 @@ Feature: Edit completion settings of an activity | Page content | x | | Completion tracking | 2 | | Require view | 1 | - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Completion is not locked when the activity has not yet been viewed Given I click on "Edit settings" "link" in the "TestPage" activity diff --git a/course/tests/behat/activities_edit_name.feature b/course/tests/behat/activities_edit_name.feature index 2d53b7cc8fc3b..7dbcefb7150b8 100644 --- a/course/tests/behat/activities_edit_name.feature +++ b/course/tests/behat/activities_edit_name.feature @@ -16,7 +16,7 @@ Feature: Edit activity name in-place | user | course | role | | teacher1 | C1 | editingteacher | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -28,7 +28,7 @@ Feature: Edit activity name in-place Then I should not see "Test forum name" in the ".course-content" "css_element" And "New name for activity Test forum name" "field" should not exist And I should see "Good news" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Good news" And I should not see "Test forum name" # Cancel renaming @@ -38,7 +38,7 @@ Feature: Edit activity name in-place And "New name for activity Good news" "field" should not exist And I should see "Good news" And I should not see "Terrible news" - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Good news" And I should not see "Terrible news" And I log out diff --git a/course/tests/behat/activities_edit_with_block_dock.feature b/course/tests/behat/activities_edit_with_block_dock.feature index 735288ec59caf..70374e6c8d145 100644 --- a/course/tests/behat/activities_edit_with_block_dock.feature +++ b/course/tests/behat/activities_edit_with_block_dock.feature @@ -16,7 +16,7 @@ Feature: Open the edit menu when a block is docked | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | diff --git a/course/tests/behat/activities_group_icons.feature b/course/tests/behat/activities_group_icons.feature index 4429b2a104071..61a52145d2936 100644 --- a/course/tests/behat/activities_group_icons.feature +++ b/course/tests/behat/activities_group_icons.feature @@ -16,7 +16,7 @@ Feature: Toggle activities groups mode from the course page | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | diff --git a/course/tests/behat/activities_indentation.feature b/course/tests/behat/activities_indentation.feature index ded5b0ec55134..9bacdfd991d81 100644 --- a/course/tests/behat/activities_indentation.feature +++ b/course/tests/behat/activities_indentation.feature @@ -18,7 +18,7 @@ Feature: Indent items on the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | diff --git a/course/tests/behat/activities_visibility_icons.feature b/course/tests/behat/activities_visibility_icons.feature index a89880c5a3a29..34c266eeb6788 100644 --- a/course/tests/behat/activities_visibility_icons.feature +++ b/course/tests/behat/activities_visibility_icons.feature @@ -18,7 +18,7 @@ Feature: Toggle activities visibility from the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -60,7 +60,7 @@ Feature: Toggle activities visibility from the course page And I log out # Student should not see this activity. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Test forum name" And I log out @@ -78,7 +78,7 @@ Feature: Toggle activities visibility from the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Recent activity" block And I add a "Forum" to section "2" and I fill the form with: @@ -115,7 +115,7 @@ Feature: Toggle activities visibility from the course page And I log out # Student will not see the module on the course page but can access it from other reports and blocks: And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "Test forum name" activity should be hidden And I click on "Test forum name" "link" in the "Recent activity" "block" And I should see "Test forum name" @@ -134,7 +134,7 @@ Feature: Toggle activities visibility from the course page | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "2" and I fill the form with: | Forum name | Test forum name | @@ -173,7 +173,7 @@ Feature: Toggle activities visibility from the course page | allowstealth | 1 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Recent activity" block And I add a "Assignment" to section "2" and I fill the form with: @@ -208,7 +208,7 @@ Feature: Toggle activities visibility from the course page And I log out # Student will not see the module on the course page but can access it from other reports and blocks: And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And "Test assignment name" activity should be hidden And I click on "Test assignment name" "link" in the "Recent activity" "block" And I should see "Test assignment name" diff --git a/course/tests/behat/add_activities.feature b/course/tests/behat/add_activities.feature index b318d8046d04b..ad3aa3f1fb856 100644 --- a/course/tests/behat/add_activities.feature +++ b/course/tests/behat/add_activities.feature @@ -18,7 +18,7 @@ Feature: Add activities to courses | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript @@ -49,7 +49,7 @@ Feature: Add activities to courses Given I set the following administration settings values: | requiremodintro | Yes | When I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Database" to section "3" and I fill the form with: | Name | Test name | Then I should see "Required" diff --git a/course/tests/behat/course_controls.feature b/course/tests/behat/course_controls.feature index fda72f91b5a7f..d1f1a7dca5d4b 100644 --- a/course/tests/behat/course_controls.feature +++ b/course/tests/behat/course_controls.feature @@ -27,7 +27,7 @@ Feature: Course activity controls works as expected | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow And I turn editing mode on And I add the "Recent activity" block @@ -99,7 +99,7 @@ Feature: Course activity controls works as expected | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow And I turn editing mode on And I add the "Recent activity" block diff --git a/course/tests/behat/course_creation.feature b/course/tests/behat/course_creation.feature index 8b6c46c58bc32..32118bbe10007 100644 --- a/course/tests/behat/course_creation.feature +++ b/course/tests/behat/course_creation.feature @@ -18,7 +18,7 @@ Feature: Managers can create courses And I enrol "Student 1" user as "Student" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Latest announcements" block Then "Latest announcements" "block" should exist @@ -28,7 +28,7 @@ Feature: Managers can create courses And "Subscription mode > Forced subscription" "text" should exist in current page administration And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And "Add a new topic" "button" should not exist And "Forced subscription" "text" should exist in current page administration diff --git a/course/tests/behat/coursetags.feature b/course/tests/behat/coursetags.feature index fe1d331bc0ba8..50b4bc25b878b 100644 --- a/course/tests/behat/coursetags.feature +++ b/course/tests/behat/coursetags.feature @@ -24,7 +24,7 @@ Feature: Tagging courses | teacher1 | c2 | editingteacher | | teacher2 | c2 | teacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Tags | Mathematics | @@ -33,7 +33,7 @@ Feature: Tagging courses Scenario: Set course tags using the course edit form When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" @@ -41,7 +41,7 @@ Feature: Tagging courses | Tags | Algebra | And I press "Save and display" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Tags | Mathematics, Geometry | @@ -71,14 +71,14 @@ Feature: Tagging courses | moodle/course:tag | Allow | And I log out When I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course tags" in current page administration Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" And I set the following fields to these values: | Tags | Algebra | And I press "Save changes" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Course tags" in current page administration And I set the following fields to these values: | Tags | Mathematics, Geometry | diff --git a/course/tests/behat/edit_settings.feature b/course/tests/behat/edit_settings.feature index 1ef2c67cb6468..96ccf58f87156 100644 --- a/course/tests/behat/edit_settings.feature +++ b/course/tests/behat/edit_settings.feature @@ -16,7 +16,7 @@ Feature: Edit course settings | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Course full name | Edited course fullname | diff --git a/course/tests/behat/force_group_mode.feature b/course/tests/behat/force_group_mode.feature index 284a59dd1716d..1004439667a06 100644 --- a/course/tests/behat/force_group_mode.feature +++ b/course/tests/behat/force_group_mode.feature @@ -15,7 +15,7 @@ Feature: Force group mode in a course | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Chat" to section "1" and I fill the form with: | Name of this chat room | Chat room | diff --git a/course/tests/behat/move_activities.feature b/course/tests/behat/move_activities.feature index ba900d446bf42..8ee31cd4f7acb 100644 --- a/course/tests/behat/move_activities.feature +++ b/course/tests/behat/move_activities.feature @@ -15,7 +15,7 @@ Feature: Activities can be moved between sections | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Recent activity" block And I follow "Delete Recent activity block" diff --git a/course/tests/behat/move_sections.feature b/course/tests/behat/move_sections.feature index d1efdde9dd1d3..92864f23cb925 100644 --- a/course/tests/behat/move_sections.feature +++ b/course/tests/behat/move_sections.feature @@ -15,7 +15,7 @@ Feature: Sections can be moved | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Move up and down a section with Javascript disabled in a single page course diff --git a/course/tests/behat/navigate_course_list.feature b/course/tests/behat/navigate_course_list.feature index acd8219f2473f..ae2869c5aca0c 100644 --- a/course/tests/behat/navigate_course_list.feature +++ b/course/tests/behat/navigate_course_list.feature @@ -26,7 +26,7 @@ Feature: Browse course list and return back from enrolment page Then I should see "Courses" in the ".breadcrumb-nav" "css_element" And I click on "Courses" "link" in the ".breadcrumb-nav" "css_element" And I follow "Sample category" - And I follow "Course 1" + And I am on course page "Course 1" And I press "Continue" And I should see "Sample category" in the ".breadcrumb-nav" "css_element" @@ -45,7 +45,7 @@ Feature: Browse course list and return back from enrolment page And I open my profile in edit mode And I expand "Courses" node And I expand "Sample category" node - And I follow "Course 1" + And I am on course page "Course 1" And I press "Continue" Then I should see "Edit profile" in the ".breadcrumb-nav" "css_element" diff --git a/course/tests/behat/paged_course_navigation.feature b/course/tests/behat/paged_course_navigation.feature index 8be6ae11c5794..69e5f197117ec 100644 --- a/course/tests/behat/paged_course_navigation.feature +++ b/course/tests/behat/paged_course_navigation.feature @@ -11,7 +11,7 @@ Feature: Course paged mode | Course 1 | C1 | 0 | | 1 | 3 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I click on "link" in the "section" And I follow "C1" And I click on "link" in the "section" @@ -45,7 +45,7 @@ Feature: Course paged mode | Course 1 | C1 | 0 | | 1 | 3 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then I click on "link" in the "section" And I follow "C1" And I click on "link" in the "section" diff --git a/course/tests/behat/rename_roles.feature b/course/tests/behat/rename_roles.feature index 253aebdb49c1b..af1a8d69facdf 100644 --- a/course/tests/behat/rename_roles.feature +++ b/course/tests/behat/rename_roles.feature @@ -20,7 +20,7 @@ Feature: Rename roles within a course | teacher2 | C1 | teacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Your word for 'Non-editing teacher' | Tutor | @@ -33,7 +33,7 @@ Feature: Rename roles within a course And the "roleid" select box should contain "Tutor" And the "roleid" select box should contain "Learner" And the "roleid" select box should not contain "Student" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Your word for 'Non-editing teacher' | | diff --git a/course/tests/behat/restrict_available_activities.feature b/course/tests/behat/restrict_available_activities.feature index dc240de804827..4f299485b9803 100644 --- a/course/tests/behat/restrict_available_activities.feature +++ b/course/tests/behat/restrict_available_activities.feature @@ -18,7 +18,7 @@ Feature: Restrict activities availability @javascript Scenario: Activities can be added with the default permissions Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | @@ -34,13 +34,13 @@ Feature: Restrict activities availability And I set the following system permissions of "Teacher" role: | mod/chat:addinstance | Prohibit | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | mod/glossary:addinstance | Prohibit | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I turn editing mode on Then the "Add an activity to section 'Topic 1'" select box should not contain "Chat" Then the "Add an activity to section 'Topic 1'" select box should not contain "Glossary" diff --git a/course/tests/behat/role_renaming.feature b/course/tests/behat/role_renaming.feature index 3101265035787..c578d02664cac 100644 --- a/course/tests/behat/role_renaming.feature +++ b/course/tests/behat/role_renaming.feature @@ -19,7 +19,7 @@ Feature: Rename roles in a course Scenario: Teacher can rename roles Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" in current page administration And I should see "Role renaming" When I set the following fields to these values: @@ -37,7 +37,7 @@ Feature: Rename roles in a course | moodle/course:renameroles | Inherit | And I follow "Log out" When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" in current page administration Then I should not see "Role renaming" And I should not see "Your word for 'Teacher'" diff --git a/course/tests/behat/section_highlighting.feature b/course/tests/behat/section_highlighting.feature index af8c941d2a84f..2b31a0daef3a6 100644 --- a/course/tests/behat/section_highlighting.feature +++ b/course/tests/behat/section_highlighting.feature @@ -18,7 +18,7 @@ Feature: Topic's course sections highlighting | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I turn section "1" highlighting on Then section "1" should be highlighted @@ -26,7 +26,7 @@ Feature: Topic's course sections highlighting And section "2" should be highlighted And section "1" should not be highlighted And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And section "2" should be highlighted And section "1" should not be highlighted And I turn section "2" highlighting off @@ -35,11 +35,11 @@ Feature: Topic's course sections highlighting And I reload the page And section "2" should not be highlighted And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And section "2" should not be highlighted And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And section "1" should not be highlighted And section "2" should not be highlighted diff --git a/course/tests/behat/section_visibility.feature b/course/tests/behat/section_visibility.feature index f1360eb9fcd0c..33096728d6969 100644 --- a/course/tests/behat/section_visibility.feature +++ b/course/tests/behat/section_visibility.feature @@ -18,7 +18,7 @@ Feature: Show/hide course sections | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test hidden forum 11 name | @@ -44,7 +44,7 @@ Feature: Show/hide course sections | Forum name | Test hidden forum 32 name | | Description | Test hidden forum 32 description | | Visible | Show | - And I follow "Course 1" + And I am on course page "Course 1" When I hide section "1" Then section "1" should be hidden And section "2" should be visible @@ -65,7 +65,7 @@ Feature: Show/hide course sections And all activities in section "1" should be hidden And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And section "1" should be hidden And all activities in section "1" should be hidden And section "2" should be visible diff --git a/course/tests/behat/view_subfolders_inline.feature b/course/tests/behat/view_subfolders_inline.feature index 14194c068b328..3fa3d211500eb 100644 --- a/course/tests/behat/view_subfolders_inline.feature +++ b/course/tests/behat/view_subfolders_inline.feature @@ -15,7 +15,7 @@ Feature: View subfolders in a course in-line | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "3" and I fill the form with: | Name | Test folder | @@ -30,7 +30,7 @@ Feature: View subfolders in a course in-line @javascript Scenario: Add a folder with two subfolders - view on separate page - Given I follow "Course 1" + Given I am on course page "Course 1" And I should not see "Test subfolder 1" And I follow "Test folder" And I should see "Test subfolder 1" @@ -39,7 +39,7 @@ Feature: View subfolders in a course in-line And I set the field "New folder name" to "Test subfolder 2" And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element" And I press "Save changes" - When I follow "Course 1" + When I am on course page "Course 1" Then I should not see "Test subfolder 2" And I follow "Test folder" And I should see "Test subfolder 2" diff --git a/enrol/guest/tests/behat/guest_access.feature b/enrol/guest/tests/behat/guest_access.feature index 621482a358ae7..97675da33c6a7 100644 --- a/enrol/guest/tests/behat/guest_access.feature +++ b/enrol/guest/tests/behat/guest_access.feature @@ -16,7 +16,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -31,7 +31,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test forum name" Then I should not see "Subscribe to this forum" @@ -45,7 +45,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al And I log out And I log in as "student1" And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" Then I should see "Guest access" And I set the following fields to these values: | Password | moodle_rules | diff --git a/enrol/lti/tests/behat/basic_settings.feature b/enrol/lti/tests/behat/basic_settings.feature index eeb24b129d461..380258488c5f1 100644 --- a/enrol/lti/tests/behat/basic_settings.feature +++ b/enrol/lti/tests/behat/basic_settings.feature @@ -30,7 +30,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolment methods" node in "Course administration > Users" And I select "Publish as LTI tool" from the "Add method" singleselect When I expand all fieldsets diff --git a/enrol/lti/tests/behat/index_page.feature b/enrol/lti/tests/behat/index_page.feature index 46b553fd09ade..3794ed0a4cf73 100644 --- a/enrol/lti/tests/behat/index_page.feature +++ b/enrol/lti/tests/behat/index_page.feature @@ -21,7 +21,7 @@ Feature: Check that the page listing the shared external tools is functioning as Scenario: I want to edit an external tool Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | diff --git a/enrol/meta/tests/behat/enrol_meta.feature b/enrol/meta/tests/behat/enrol_meta.feature index e28b005e25a64..b891bc04ce29e 100644 --- a/enrol/meta/tests/behat/enrol_meta.feature +++ b/enrol/meta/tests/behat/enrol_meta.feature @@ -34,7 +34,7 @@ Feature: Enrolments are synchronised with meta courses And I am on course index Scenario: Add meta enrolment instance without groups - When I follow "Course 3" + When I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C1C1 | And I navigate to "Enrolled users" node in "Course administration > Users" @@ -43,11 +43,11 @@ Feature: Enrolments are synchronised with meta courses And I should not see "Groupcourse" in the "table.userenrolment" "css_element" Scenario: Add meta enrolment instance with groups - When I follow "Course 3" + When I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Groupcourse 1 | - And I follow "Course 3" + And I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C2C2 | | Add to group | Groupcourse 2 | @@ -62,7 +62,7 @@ Feature: Enrolments are synchronised with meta courses And I should not see "Groupcourse 2" in the "Student 4" "table_row" Scenario: Add meta enrolment instance with auto-created groups - When I follow "Course 3" + When I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Create new group | @@ -75,11 +75,11 @@ Feature: Enrolments are synchronised with meta courses And the "Groups" select box should contain "Course 1 course (4)" Scenario: Backup and restore of meta enrolment instance - When I follow "Course 3" + When I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Groupcourse 1 | - And I follow "Course 3" + And I am on course page "Course 3" And I add "Course meta link" enrolment method with: | Link course | C2C2 | When I backup "Course 3" course using this options: @@ -94,7 +94,7 @@ Feature: Enrolments are synchronised with meta courses And I press "Perform restore" And I trigger cron And I am on course index - And I follow "Course 4" + And I am on course page "Course 4" And I navigate to "Enrolment methods" node in "Course administration > Users" Then I should see "Course meta link (Course 1)" And I should see "Course meta link (Course 2)" diff --git a/enrol/self/tests/behat/key_holder.feature b/enrol/self/tests/behat/key_holder.feature index 31f4a8214ebab..082f582869e84 100644 --- a/enrol/self/tests/behat/key_holder.feature +++ b/enrol/self/tests/behat/key_holder.feature @@ -35,14 +35,14 @@ Feature: Users can be defined as key holders in courses where self enrolment is Scenario: The key holder name is displayed on site home page Given I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | | Enrolment key | moodle_rules | And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should see "You should have received this enrolment key from:" And I should see "Manager 1" And I set the following fields to these values: diff --git a/enrol/self/tests/behat/self_enrolment.feature b/enrol/self/tests/behat/self_enrolment.feature index a0c53dd7dde51..992073ed1e09a 100644 --- a/enrol/self/tests/behat/self_enrolment.feature +++ b/enrol/self/tests/behat/self_enrolment.feature @@ -21,11 +21,11 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe @javascript Scenario: Self-enrolment enabled as guest Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | And I log out - When I follow "Course 1" + When I am on course page "Course 1" And I press "Log in as a guest" Then I should see "Guests cannot access this course. Please log in." And I press "Continue" @@ -33,27 +33,27 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe Scenario: Self-enrolment enabled Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I press "Enrol me" Then I should see "Topic 1" And I should not see "Enrolment options" Scenario: Self-enrolment enabled requiring an enrolment key Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | | Enrolment key | moodle_rules | And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I set the following fields to these values: | Enrolment key | moodle_rules | And I press "Enrol me" @@ -64,17 +64,17 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe Scenario: Self-enrolment disabled Given I log in as "student1" And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" Then I should see "You can not enrol yourself in this course" Scenario: Self-enrolment enabled requiring a group enrolment key Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | | Enrolment key | moodle_rules | | Use group enrolment keys | Yes | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: @@ -84,7 +84,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe And I log out And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I set the following fields to these values: | Enrolment key | Test-groupenrolkey1 | And I press "Enrol me" diff --git a/enrol/tests/behat/add_to_group.feature b/enrol/tests/behat/add_to_group.feature index a57e441cff9a6..62eeee5914e6d 100644 --- a/enrol/tests/behat/add_to_group.feature +++ b/enrol/tests/behat/add_to_group.feature @@ -24,7 +24,7 @@ Feature: Users can be added to multiple groups at once Scenario: Adding a user to one group Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolled users" node in "Course administration > Users" And I click on "Add user into group" "link" in the "student1" "table_row" When I set the field "Add user into group" to "Group 1" @@ -33,7 +33,7 @@ Feature: Users can be added to multiple groups at once Scenario: Adding a user to multiple group Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolled users" node in "Course administration > Users" And I click on "Add user into group" "link" in the "student1" "table_row" When I set the field "Add user into group" to "Group 1, Group 2, Group 3" diff --git a/enrol/tests/behat/enrol_user.feature b/enrol/tests/behat/enrol_user.feature index 94a80c5519643..a436eb327c9e4 100644 --- a/enrol/tests/behat/enrol_user.feature +++ b/enrol/tests/behat/enrol_user.feature @@ -13,7 +13,7 @@ Feature: User can be enrolled into a course | Course 001 | C001 | And I log in as "admin" And I am on course index - And I follow "Course 001" + And I am on course page "Course 001" Scenario: User can be enrolled without javascript When I enrol "Studie One" user as "Student" diff --git a/enrol/tests/behat/filter_enrolled_users.feature b/enrol/tests/behat/filter_enrolled_users.feature index d284305671068..7b69c9bb959f4 100644 --- a/enrol/tests/behat/filter_enrolled_users.feature +++ b/enrol/tests/behat/filter_enrolled_users.feature @@ -39,7 +39,7 @@ Feature: Enrolled users can be filtered by group Scenario Outline: Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Enrolled users" node in "Course administration > Users" When I set the field "Group" to "" diff --git a/enrol/tests/behat/manage_enrolments_from_participants.feature b/enrol/tests/behat/manage_enrolments_from_participants.feature index d50bde399d887..4ecc222c34d32 100644 --- a/enrol/tests/behat/manage_enrolments_from_participants.feature +++ b/enrol/tests/behat/manage_enrolments_from_participants.feature @@ -19,7 +19,7 @@ Feature: Manage enrollments from participants page | student2 | C1 | student | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants Scenario: Check the participants link when "All partipants" selected diff --git a/files/tests/behat/add_custom_file_type.feature b/files/tests/behat/add_custom_file_type.feature index 0ed9a61ced732..27ef86ba272d2 100644 --- a/files/tests/behat/add_custom_file_type.feature +++ b/files/tests/behat/add_custom_file_type.feature @@ -28,13 +28,13 @@ Feature: Add a new custom file type And I should see "application/x-moodle-rules" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "File" to section "1" and I fill the form with: | Name | Test file | | Select files | files/tests/fixtures/custom_filetype.mdlr | | Show type | 1 | | Display resource description | 1 | - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "Test file" And I should see "Moodle rules" in the "span.resourcelinkdetails" "css_element" diff --git a/files/tests/behat/course_files.feature b/files/tests/behat/course_files.feature index af9f65ab038c4..616d371bc086e 100644 --- a/files/tests/behat/course_files.feature +++ b/files/tests/behat/course_files.feature @@ -14,7 +14,7 @@ Feature: Course files | legacyfilesaddallowed | 1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" @@ -31,7 +31,7 @@ Feature: Course files | legacyfilesaddallowed | 0 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" diff --git a/grade/export/txt/tests/behat/export.feature b/grade/export/txt/tests/behat/export.feature index ea92bf6ae29d5..c643ce58efa8b 100644 --- a/grade/export/txt/tests/behat/export.feature +++ b/grade/export/txt/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: I need to export grades as text | assign | C1 | a1 | Test assignment name | Submit your online text | 1 | | 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 am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/export/xml/tests/behat/export.feature b/grade/export/xml/tests/behat/export.feature index 9e6450a01817e..d790e3b275050 100644 --- a/grade/export/xml/tests/behat/export.feature +++ b/grade/export/xml/tests/behat/export.feature @@ -20,7 +20,7 @@ Feature: I need to export grades as xml | activity | course | idnumber | name | intro | | assign | C1 | a1 | Test assignment name | Submit something! | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/grading/form/guide/tests/behat/edit_guide.feature b/grade/grading/form/guide/tests/behat/edit_guide.feature index 37a256317d48b..9a870b0aec09d 100644 --- a/grade/grading/form/guide/tests/behat/edit_guide.feature +++ b/grade/grading/form/guide/tests/behat/edit_guide.feature @@ -17,7 +17,7 @@ Feature: Marking guides can be created and edited | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | @@ -93,7 +93,7 @@ Feature: Marking guides can be created and edited And I log out # Viewing it as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should see "80" in the ".feedback" "css_element" And I should see "Marking guide test description" in the ".feedback" "css_element" diff --git a/grade/grading/form/rubric/tests/behat/edit_rubric.feature b/grade/grading/form/rubric/tests/behat/edit_rubric.feature index 6500d05d1698e..3644bb4dcd0ac 100644 --- a/grade/grading/form/rubric/tests/behat/edit_rubric.feature +++ b/grade/grading/form/rubric/tests/behat/edit_rubric.feature @@ -18,7 +18,7 @@ Feature: Rubrics can be created and edited | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | @@ -72,7 +72,7 @@ Feature: Rubrics can be created and edited And I log out # Viewing it as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should see "35" in the ".feedback" "css_element" And I should see "Rubric test description" in the ".feedback" "css_element" @@ -82,7 +82,7 @@ Feature: Rubrics can be created and edited And the level with "5" points is selected for the rubric criterion "Criterion 3" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" # Editing a rubric definition without regrading students. And I go to "Test assignment 1 name" advanced grading definition page And "Save as draft" "button" should not exist @@ -95,14 +95,14 @@ Feature: Rubrics can be created and edited And I log out # Check that the student still sees the grade. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should see "35" in the ".feedback" "css_element" And the level with "20" points is selected for the rubric criterion "Criterion 1" And I log out # Editing a rubric with significant changes. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I click on "Move down" "button" in the "Criterion 2" "table_row" And I replace "1" rubric level with "60" in "Criterion 1" criterion @@ -112,14 +112,14 @@ Feature: Rubrics can be created and edited And I log out # Check that the student doesn't see the grade. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should see "35" in the ".feedback" "css_element" And the level with "20" points is not selected for the rubric criterion "Criterion 1" And I log out # Regrade student. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I go to "Student 1" "Test assignment 1 name" activity advanced grading page And I should see "The rubric definition was changed after this student had been graded. The student can not see this rubric until you check the rubric and update the grade." @@ -127,14 +127,14 @@ Feature: Rubrics can be created and edited And I log out # Check that the student sees the grade again. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should see "31.82" in the ".feedback" "css_element" And the level with "20" points is not selected for the rubric criterion "Criterion 1" # Hide all rubric info for students And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I set the field "Allow users to preview rubric (otherwise it will only be displayed after grading)" to "" And I set the field "Display rubric description during evaluation" to "" @@ -147,7 +147,7 @@ Feature: Rubrics can be created and edited And I log out # Students should not see anything. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment 1 name" And I should not see "Criterion 1" in the ".submissionstatustable" "css_element" And I should not see "Criterion 2" in the ".submissionstatustable" "css_element" diff --git a/grade/grading/form/rubric/tests/behat/grade_calculation.feature b/grade/grading/form/rubric/tests/behat/grade_calculation.feature index 3e647147b311b..4207337b4e654 100644 --- a/grade/grading/form/rubric/tests/behat/grade_calculation.feature +++ b/grade/grading/form/rubric/tests/behat/grade_calculation.feature @@ -23,7 +23,7 @@ Feature: Converting rubric score to grades | activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions | | assign | Test assignment 1 | Test | C1 | assign1 | | rubric | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I go to "Test assignment 1" advanced grading definition page And I set the following fields to these values: diff --git a/grade/grading/form/rubric/tests/behat/negative_points.feature b/grade/grading/form/rubric/tests/behat/negative_points.feature index 83ee60b9f8e7c..9653b439c0032 100644 --- a/grade/grading/form/rubric/tests/behat/negative_points.feature +++ b/grade/grading/form/rubric/tests/behat/negative_points.feature @@ -27,7 +27,7 @@ Feature: Rubrics can have levels with negative scores | activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions | | assign | Test assignment 1 | Test | C1 | assign1 | 100 | rubric | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I go to "Test assignment 1" advanced grading definition page And I set the following fields to these values: diff --git a/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature b/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature index e755151d403e5..db165d67a7e59 100644 --- a/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature +++ b/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature @@ -24,7 +24,7 @@ Feature: Publish rubrics as templates | manager1 | manager | System | | And I log in as "manager1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I set the following fields to these values: | Name | Assignment 1 rubric | @@ -36,7 +36,7 @@ Feature: Publish rubrics as templates When I publish "Test assignment 1 name" grading form definition as a public template And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form Then I should see "Advanced grading: Test assignment 2 name (Submissions)" And I should see "Criterion 1" diff --git a/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature b/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature index 5effb3d0e32cd..dda862c62204e 100644 --- a/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature +++ b/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature @@ -15,7 +15,7 @@ Feature: Reuse my rubrics in other activities | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | @@ -30,7 +30,7 @@ Feature: Reuse my rubrics in other activities | Criterion 2 | Level 21 | 21 | Level 22 | 22 | Level 3 | 23 | | Criterion 3 | Level 31 | 31 | Level 32 | 32 | | | And I press "Save rubric and make it ready" - And I follow "Course 1" + And I am on course page "Course 1" When I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 2 name | | Description | Test assignment 2 description | @@ -40,7 +40,7 @@ Feature: Reuse my rubrics in other activities And I should see "Criterion 1" And I should see "Criterion 2" And I should see "Criterion 3" - And I follow "Course 1" + And I am on course page "Course 1" And I go to "Test assignment 1 name" advanced grading definition page And I should see "Criterion 1" And I should see "Criterion 2" diff --git a/grade/report/grader/tests/behat/ajax_grader.feature b/grade/report/grader/tests/behat/ajax_grader.feature index dddab82eb2285..6c72dfca0f7a2 100644 --- a/grade/report/grader/tests/behat/ajax_grader.feature +++ b/grade/report/grader/tests/behat/ajax_grader.feature @@ -53,7 +53,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_overridecat | 1 | | grade_report_showquickfeedback | 0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" @@ -105,7 +105,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_overridecat | 1 | | grade_report_showquickfeedback | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" @@ -142,7 +142,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_overridecat | 0 | | grade_report_showquickfeedback | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" @@ -162,7 +162,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe | grade_overridecat | 1 | | grade_report_showquickfeedback | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on Then I should not see a grade 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_overridecat | 0 | | grade_report_showquickfeedback | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I change window size to "large" diff --git a/grade/report/grader/tests/behat/switch_views.feature b/grade/report/grader/tests/behat/switch_views.feature index 54bed2bbf64ce..19efa2fd11892 100644 --- a/grade/report/grader/tests/behat/switch_views.feature +++ b/grade/report/grader/tests/behat/switch_views.feature @@ -18,7 +18,7 @@ Feature: We can change what we are viewing on the grader report | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name 1 | @@ -30,14 +30,14 @@ Feature: We can change what we are viewing on the grader report | assignsubmission_onlinetext_enabled | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name 1" When I press "Add submission" And I set the following fields to these values: | Online text | This is a submission for assignment 1 | And I press "Save changes" Then I should see "Submitted for grading" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name 2" When I press "Add submission" And I set the following fields to these values: @@ -46,7 +46,7 @@ Feature: We can change what we are viewing on the grader report Then I should see "Submitted for grading" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" @@ -56,11 +56,11 @@ Feature: We can change what we are viewing on the grader report @javascript Scenario: View and minimise the grader report containing hidden activities - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on 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 am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I should see "Test assignment name 1" And I should see "Test assignment name 2" @@ -85,7 +85,7 @@ Feature: We can change what we are viewing on the grader report @javascript Scenario: View and minimise the grader report containing hidden activities without the 'moodle/grade:viewhidden' capability - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I open "Test assignment name 2" actions menu And I click on "Hide" "link" in the "Test assignment name 2" activity @@ -99,7 +99,7 @@ Feature: We can change what we are viewing on the grader report | user | course | role | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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 3704c3ad4202e..7dc399d03954b 100644 --- a/grade/report/history/tests/behat/basic_functionality.feature +++ b/grade/report/history/tests/behat/basic_functionality.feature @@ -22,7 +22,7 @@ Feature: A teacher checks the grade history report in a course | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | The greatest assignment ever | @@ -39,7 +39,7 @@ Feature: A teacher checks the grade history report in a course And I press "Save changes" And I log out And I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/report/singleview/tests/behat/bulk_insert_grades.feature b/grade/report/singleview/tests/behat/bulk_insert_grades.feature index fe94e1fcf2f8d..18ca00a60844d 100644 --- a/grade/report/singleview/tests/behat/bulk_insert_grades.feature +++ b/grade/report/singleview/tests/behat/bulk_insert_grades.feature @@ -31,7 +31,7 @@ Feature: We can bulk insert grades for students in a course Scenario: I can bulk insert grades and check their override flags for grade view. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment one" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -39,7 +39,7 @@ Feature: We can bulk insert grades for students in a course | Grade out of 100 | 50 | And I press "Save changes" And I press "Ok" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I follow "Single view for Test assignment one" Then the field "Grade for james (Student) 1" matches value "50.00" @@ -72,7 +72,7 @@ Feature: We can bulk insert grades for students in a course Scenario: I can bulk insert grades and check their override flags for user view. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment two" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -80,7 +80,7 @@ Feature: We can bulk insert grades for students in a course | Grade out of 100 | 50 | And I press "Save changes" And I press "Ok" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook # And I click on "input[title='Dock Navigation block']" "css_element" # And I click on "input[title='Dock Administration block']" "css_element" diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index cd1774fd9a2c1..c99d9e24b0e99 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -51,7 +51,7 @@ Feature: We can use Single view | moodle/grade:edit | Allow | teacher | Course | C1 | | gradereport/singleview:view | Allow | teacher | Course | C1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Given I navigate to "View > Grader report" in the course gradebook @javascript @@ -96,7 +96,7 @@ Feature: We can use Single view | james (Student) 1 | Very good | And I log out And I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" Given I navigate to "View > Single view" in the course gradebook 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 e54ac6f187ea8..e6c5ae4f461d7 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -31,7 +31,7 @@ Feature: View the user report as the student will see it | assign | C1 | a5 | Test assignment five | Submit something! | 100 | | assign | C1 | a6 | Test assignment six | Submit something! | 100 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I hide the grade item "Test assignment six" And I hide the grade item "Sub category 2" @@ -82,7 +82,7 @@ Feature: View the user report as the student will see it | Test assignment six | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -120,7 +120,7 @@ Feature: View the user report as the student will see it | Test assignment six | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -158,7 +158,7 @@ Feature: View the user report as the student will see it | Test assignment six | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -182,7 +182,7 @@ Feature: View the user report as the student will see it | moodle/grade:viewhidden | Allow | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Course grade settings" in the course gradebook And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items" And I press "Save changes" @@ -202,7 +202,7 @@ Feature: View the user report as the student will see it | Course total | - | 383.00 | 0–600 | 63.83 % | - | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook 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/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 3fc9563afe551..fa6449f1d22d8 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -11,7 +11,7 @@ Feature: We can use the user report Scenario: Verify we can view a user grade report with no users enrolled. Given I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > User report" in the course gradebook 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 5661e329b05da..2f6cb202072e0 100644 --- a/grade/tests/behat/grade_UI_settings.feature +++ b/grade/tests/behat/grade_UI_settings.feature @@ -19,7 +19,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI | assign | C1 | assign1 | Assignment1 | Assignment 1 intro | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on @@ -31,7 +31,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I set the field "Show minimum grade" to "0" And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I click on "Edit assign Assignment1" "link" And I should not see "Minimum grade" @@ -43,7 +43,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I set the field "Show calculations" to "0" And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook Then "Edit calculation for Course total" "link" should not exist @@ -54,6 +54,6 @@ Feature: Site settings can be used to hide parts of the gradebook UI And I set the field "Allow category grades to be manually overridden" to "0" And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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 df80dd3d24fae..7021b5c0eedbe 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -41,7 +41,7 @@ Feature: We can use calculated grade totals | 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 log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I change window size to "large" @@ -256,7 +256,7 @@ Feature: We can use calculated grade totals 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 am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Test outcome item one": | Extra credit | 1 | @@ -268,7 +268,7 @@ Feature: We can use calculated grade totals 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 am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Course 1": | Aggregation | Natural | @@ -371,7 +371,7 @@ Feature: We can use calculated grade totals When I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on And I set the following settings for grade item "Sub category 1": diff --git a/grade/tests/behat/grade_aggregation_changes.feature b/grade/tests/behat/grade_aggregation_changes.feature index 89db8d5680ef5..157bf7e6e5c5e 100644 --- a/grade/tests/behat/grade_aggregation_changes.feature +++ b/grade/tests/behat/grade_aggregation_changes.feature @@ -34,7 +34,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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 f60cfa1582149..ca3927d1c0d77 100644 --- a/grade/tests/behat/grade_average.feature +++ b/grade/tests/behat/grade_average.feature @@ -22,7 +22,7 @@ Feature: Average grades are displayed in the gradebook | student3 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" # Enable averages And I navigate to "Setup > Course grade settings" in the course gradebook And I set the following fields to these values: @@ -59,7 +59,7 @@ Feature: Average grades are displayed in the gradebook # Check the user grade table And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook 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" diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index 57046899f7b84..7c9e9d7147334 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -20,7 +20,7 @@ Feature: Calculated grade items can be used in the gradebook | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook @javascript diff --git a/grade/tests/behat/grade_calculated_grade_items_20150627.feature b/grade/tests/behat/grade_calculated_grade_items_20150627.feature index e1eb3fbf9699c..555df8e7cd365 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -21,7 +21,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook @javascript diff --git a/grade/tests/behat/grade_calculated_weights.feature b/grade/tests/behat/grade_calculated_weights.feature index 47a30400de87e..b4816a653ddfb 100644 --- a/grade/tests/behat/grade_calculated_weights.feature +++ b/grade/tests/behat/grade_calculated_weights.feature @@ -29,7 +29,7 @@ Feature: We can understand the gradebook user report | 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 log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/tests/behat/grade_category_validation.feature b/grade/tests/behat/grade_category_validation.feature index 74cff6208a596..ee012e7379a4a 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -33,7 +33,7 @@ Feature: Editing a grade item And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I press "Add category" And I set the following fields to these values: diff --git a/grade/tests/behat/grade_contribution_with_extra_credit.feature b/grade/tests/behat/grade_contribution_with_extra_credit.feature index 05311952deca4..d507a1ff3b2d2 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -20,7 +20,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I set the following administration settings values: | 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 am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I press "Add grade item" And I set the following fields to these values: @@ -45,7 +45,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index 16d6abd043099..e48046c0da43a 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -21,7 +21,7 @@ Feature: We can change the maximum and minimum number of points for manual items | student2 | C1 | student | And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I press "Add grade item" And I set the following fields to these values: @@ -35,7 +35,7 @@ Feature: We can change the maximum and minimum number of points for manual items And I press "Save changes" Scenario: Change maximum number of points on a graded item. - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index fd7aa450f2d8d..b2fa02c9d9521 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -34,7 +34,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I press "Save changes" When I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" @@ -43,7 +43,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I set the following settings for grade item "Test assignment four": | Hidden | 1 | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > User report" in the course gradebook And I select "Myself" from the "View report as" singleselect And I select "Student 1" from the "Select all or one user" singleselect @@ -55,7 +55,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when | Course total | - | 100.00 | 0–200 | 50.00 % | - | When I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook 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_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index ef381aad6aec5..0449f4c7e5ed5 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -29,7 +29,7 @@ Feature: Grade item validation | Scale | Disappointing, Good, Very good, Excellent | And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I press "Add grade item" And I set the following fields to these values: diff --git a/grade/tests/behat/grade_letter_boundary.feature b/grade/tests/behat/grade_letter_boundary.feature index 33466731920ee..5d985790eb795 100644 --- a/grade/tests/behat/grade_letter_boundary.feature +++ b/grade/tests/behat/grade_letter_boundary.feature @@ -21,7 +21,7 @@ Feature: We can customise the letter boundary of a course. | activity | course | idnumber | name | intro | grade | | assign | C1 | a1 | Test assignment one | Submit something! | 100 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Course grade settings" in the course gradebook 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 8ec6dafd5714f..9b75574ddc0b3 100644 --- a/grade/tests/behat/grade_letter_boundary_20160518.feature +++ b/grade/tests/behat/grade_letter_boundary_20160518.feature @@ -22,7 +22,7 @@ Feature: We can customise the letter boundary of a course in gradebook version 2 | activity | course | idnumber | name | intro | grade | | assign | C1 | a1 | Test assignment one | Submit something! | 100 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Course grade settings" in the course gradebook 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 0011f2086e43b..361785e710a6a 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -26,7 +26,7 @@ Feature: We can use a minimum grade different than zero And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I press "Add grade item" And I set the following fields to these values: @@ -84,7 +84,7 @@ Feature: We can use a minimum grade different than zero | Exclude empty grades | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/grade/tests/behat/grade_natural_exclude_empty.feature b/grade/tests/behat/grade_natural_exclude_empty.feature index 37f411d4e56de..e9f6daaad82d0 100644 --- a/grade/tests/behat/grade_natural_exclude_empty.feature +++ b/grade/tests/behat/grade_natural_exclude_empty.feature @@ -24,7 +24,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f | assign | C1 | a4 | Test assignment four (extra) | x | 20 | | assign | C1 | a5 | Test assignment five (extra) | x | 10 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | diff --git a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature index 54dfc00d25dba..38eaf046c428f 100644 --- a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature +++ b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature @@ -25,7 +25,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 | assign | C1 | a4 | Test assignment four (extra) | x | 20 | | assign | C1 | a5 | Test assignment five (extra) | x | 10 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | diff --git a/grade/tests/behat/grade_natural_normalisation.feature b/grade/tests/behat/grade_natural_normalisation.feature index 82dbd8d05b716..2f308078d0215 100644 --- a/grade/tests/behat/grade_natural_normalisation.feature +++ b/grade/tests/behat/grade_natural_normalisation.feature @@ -31,7 +31,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota | assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 | | 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 am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook @javascript diff --git a/grade/tests/behat/grade_natural_normalisation_20150619.feature b/grade/tests/behat/grade_natural_normalisation_20150619.feature index b302102589a7a..172f269ffdd1f 100644 --- a/grade/tests/behat/grade_natural_normalisation_20150619.feature +++ b/grade/tests/behat/grade_natural_normalisation_20150619.feature @@ -32,7 +32,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix | assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 | | 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 am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook @javascript diff --git a/grade/tests/behat/grade_override_letter.feature b/grade/tests/behat/grade_override_letter.feature index be0ff3dd9079f..3fc42d7272a3f 100644 --- a/grade/tests/behat/grade_override_letter.feature +++ b/grade/tests/behat/grade_override_letter.feature @@ -15,7 +15,7 @@ Feature: Grade letters can be overridden | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Letters > Edit" in the course gradebook Scenario Outline: Grade letters can be completely overridden diff --git a/grade/tests/behat/grade_point_maximum.feature b/grade/tests/behat/grade_point_maximum.feature index 347b9860c3a8a..62c4596b3e128 100644 --- a/grade/tests/behat/grade_point_maximum.feature +++ b/grade/tests/behat/grade_point_maximum.feature @@ -20,7 +20,7 @@ Feature: We can change the grading type and maximum grade point values | Grade point default | 800 | And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Validate that switching the type of grading used correctly disables input form elements @@ -98,7 +98,7 @@ Feature: We can change the grading type and maximum grade point values | Grade point maximum | 100 | And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Assignment 1" And I navigate to "Edit settings" in current page administration And I press "Save and display" diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index 400e96fb43d8a..bc97a09f8bf02 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -42,7 +42,7 @@ Feature: View gradebook when scales are used | activity | course | idnumber | name | intro | gradecategory | | assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment one" And I navigate to "Edit settings" in current page administration And I expand all fieldsets @@ -70,7 +70,7 @@ Feature: View gradebook when scales are used And I set the field "Grade" to "F" And I press "Save changes" And I press "Ok" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Course grade settings" in the course gradebook 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_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index dc2092b9d7892..2788591380f16 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -38,7 +38,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 am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on When I give the grade "10" to the user "Student 1" for the grade item "Grade me" @@ -59,7 +59,7 @@ Feature: Control the aggregation of the scales | grade_includescalesinaggregation | 1 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > User report" in the course gradebook And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: @@ -83,7 +83,7 @@ Feature: Control the aggregation of the scales @javascript 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 am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on When I set the following settings for grade item "Course 1": @@ -98,7 +98,7 @@ Feature: Control the aggregation of the scales And I should not see "Weight" And the following config values are set as admin: | grade_includescalesinaggregation | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Gradebook setup" in the course gradebook 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 2f4a7cc158a1d..5cbb88d1987c3 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -36,7 +36,7 @@ Feature: View gradebook when single item scales are used | activity | course | idnumber | name | intro | gradecategory | | assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment one" And I navigate to "Edit settings" in current page administration And I expand all fieldsets @@ -48,7 +48,7 @@ Feature: View gradebook when single item scales are used And I set the field "Grade" to "A" And I press "Save changes" And I press "Ok" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Setup > Course grade settings" in the course gradebook 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 b108e06b107ef..af87876862270 100644 --- a/grade/tests/behat/grade_to_pass.feature +++ b/grade/tests/behat/grade_to_pass.feature @@ -19,7 +19,7 @@ Feature: We can set the grade to pass value | name | scale | | Test Scale 1 | Disappointing, Good, Very good, Excellent | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Validate that switching the type of grading used correctly disables grade to pass @@ -58,7 +58,7 @@ Feature: We can set the grade to pass value 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" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Assignment 1" And I follow "Edit settings" And I expand all fieldsets @@ -83,7 +83,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "3" And I set the field "Grade to pass" to "4" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Assignment 1" And I follow "Edit settings" And the field "Grade to pass" matches value "4" @@ -119,7 +119,7 @@ Feature: We can set the grade to pass value And the field "Grade to pass" matches value "10" And I set the field "Grade to pass" to "15" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Workshop 1" And I follow "Edit settings" And the field "Submission grade to pass" matches value "45" @@ -149,7 +149,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "9.5" And I set the field "Grade to pass" to "8" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Quiz 1" And I follow "Edit settings" And the field "Grade to pass" matches value "8.00" @@ -167,7 +167,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "90" And I set the field "Grade to pass" to "80" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Lesson 1" And I follow "Edit settings" And the field "Grade to pass" matches value "80" @@ -186,7 +186,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "90" And I set the field "Grade to pass" to "80" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Edit settings" "link" in the "Test Database 1" activity And the field "Grade to pass" matches value "80" @@ -214,7 +214,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "90" And I set the field "Grade to pass" to "80" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Forum 1" And I follow "Edit settings" And the field "Grade to pass" matches value "80" @@ -233,7 +233,7 @@ Feature: We can set the grade to pass value Then the field "Grade to pass" matches value "90" And I set the field "Grade to pass" to "80" And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test Glossary 1" And I follow "Edit settings" And the field "Grade to pass" matches value "80" diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index f2c85c47bcda6..f1a7c07d5a999 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -22,7 +22,7 @@ Feature: We can enter in grades and view reports from the gradebook | 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 log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name 1 | @@ -34,14 +34,14 @@ Feature: We can enter in grades and view reports from the gradebook | assignsubmission_onlinetext_enabled | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name 1" When I press "Add submission" And I set the following fields to these values: | Online text | This is a submission for assignment 1 | And I press "Save changes" Then I should see "Submitted for grading" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name 2" When I press "Add submission" And I set the following fields to these values: @@ -50,7 +50,7 @@ Feature: We can enter in grades and view reports from the gradebook Then I should see "Submitted for grading" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/group/tests/behat/auto_creation.feature b/group/tests/behat/auto_creation.feature index e41b32fc9d8a3..f68e8aa76db56 100644 --- a/group/tests/behat/auto_creation.feature +++ b/group/tests/behat/auto_creation.feature @@ -37,7 +37,7 @@ Feature: Automatic creation of groups | student10 | C1 | student | 0 | | suspendedstudent11 | C1 | student | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration When I press "Auto-create groups" And I expand all fieldsets @@ -163,7 +163,7 @@ Feature: Automatic creation of groups | moodle/course:viewsuspendedusers | Prevent | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration When I press "Auto-create groups" Then I should not see "Include only active enrolments" diff --git a/group/tests/behat/create_groups.feature b/group/tests/behat/create_groups.feature index b2cdd223dffda..bc42e7ff3f279 100644 --- a/group/tests/behat/create_groups.feature +++ b/group/tests/behat/create_groups.feature @@ -24,7 +24,7 @@ Feature: Organize students into groups | student2 | C1 | student | | student3 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: @@ -71,7 +71,7 @@ Feature: Organize students into groups | moodle/course:changeidnumber | Prevent | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration When I press "Create group" Then the "idnumber" "field" should be readonly @@ -94,7 +94,7 @@ Feature: Organize students into groups | Course 2 | C2 | 0 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration When I press "Create group" And I set the following fields to these values: @@ -117,7 +117,7 @@ Feature: Organize students into groups And I press "Save changes" And the "groups" select box should contain "Group B (0)" And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: diff --git a/group/tests/behat/delete_groups.feature b/group/tests/behat/delete_groups.feature index b77d0007c0bae..12ab8bf7f6aa5 100644 --- a/group/tests/behat/delete_groups.feature +++ b/group/tests/behat/delete_groups.feature @@ -15,7 +15,7 @@ Feature: Automatic deletion of groups and groupings | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: @@ -64,7 +64,7 @@ Feature: Automatic deletion of groups and groupings | moodle/course:changeidnumber | Prevent | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration When I set the field "groups" to "Group (with ID) (0)" Then the "Delete selected group" "button" should be disabled diff --git a/group/tests/behat/groups_import.feature b/group/tests/behat/groups_import.feature index eaea7d4c4396e..826865282a0fc 100644 --- a/group/tests/behat/groups_import.feature +++ b/group/tests/behat/groups_import.feature @@ -18,7 +18,7 @@ Feature: Importing of groups and groupings @javascript Scenario: Import groups and groupings as teacher Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager @@ -42,7 +42,7 @@ Feature: Importing of groups and groupings @javascript Scenario: Import groups with idnumber when the user has proper permissions for the idnumber field Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager @@ -79,13 +79,13 @@ Feature: Importing of groups and groupings Scenario: Import groups with idnumber when the user does not have proper permissions for the idnumber field Given I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Permissions" in current page administration And I override the system permissions of "Teacher" role with: | moodle/course:changeidnumber | Prevent | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Import groups" When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager diff --git a/group/tests/behat/id_uniqueness.feature b/group/tests/behat/id_uniqueness.feature index 14c18c461901b..5be84e110005b 100644 --- a/group/tests/behat/id_uniqueness.feature +++ b/group/tests/behat/id_uniqueness.feature @@ -15,7 +15,7 @@ Feature: Uniqueness of Group ID number | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration Scenario: Group ID number uniqueness diff --git a/group/tests/behat/overview.feature b/group/tests/behat/overview.feature index 422c0738174b7..ba362638c353a 100644 --- a/group/tests/behat/overview.feature +++ b/group/tests/behat/overview.feature @@ -57,7 +57,7 @@ Feature: Group overview Scenario: Filter the overview in various different ways Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Groups" node in "Course administration > Users" And I follow "Overview" diff --git a/group/tests/behat/update_groups.feature b/group/tests/behat/update_groups.feature index 6da490d0c7fa6..c2720a525514e 100644 --- a/group/tests/behat/update_groups.feature +++ b/group/tests/behat/update_groups.feature @@ -15,7 +15,7 @@ Feature: Automatic updating of groups and groupings | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: @@ -71,7 +71,7 @@ Feature: Automatic updating of groups and groupings | moodle/course:changeidnumber | Prevent | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Group (with ID)" When I press "Edit group settings" @@ -108,7 +108,7 @@ Feature: Automatic updating of groups and groupings | teacher1 | C2 | editingteacher | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Group (with ID)" And I press "Edit group settings" @@ -134,7 +134,7 @@ Feature: Automatic updating of groups and groupings And I press "Save changes" And I should not see "This enrolment key is already used for another group." And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: diff --git a/lib/editor/atto/tests/behat/autosave.feature b/lib/editor/atto/tests/behat/autosave.feature index fc45d208bdada..277c39109d54a 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -20,7 +20,7 @@ Feature: Atto Autosave And I set the field with xpath "//select[@name='s_editor_atto_autosavefrequency[u]']" to "seconds" And I click on "Save changes" "button" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field with xpath "//select[@name='summary_editor[format]']" to "1" And I click on "Save and display" "button" @@ -29,14 +29,14 @@ Feature: Atto Autosave @javascript Scenario: Restore a draft Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "This is my draft" # Wait for the autosave And I wait "5" seconds And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" # Wait for the autorestore And I wait "2" seconds @@ -45,7 +45,7 @@ Feature: Atto Autosave @javascript Scenario: Do not restore a draft if files have been modified Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "This is my draft" # Wait for the autosave @@ -56,7 +56,7 @@ Feature: Atto Autosave And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "

Image test

" And I select the text in the "Course summary" Atto editor @@ -72,27 +72,27 @@ Feature: Atto Autosave And I click on "Save and display" "button" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" Then I should not see "This is my draft" @javascript Scenario: Do not restore a draft if text has been modified Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "This is my draft" # Wait for the autosave And I wait "5" seconds And I log out And I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the field "Course summary" to "Modified text" And I click on "Save and display" "button" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" Then I should not see "This is my draft" And I should see "Modified text" diff --git a/lib/editor/atto/tests/behat/customtoolbar.feature b/lib/editor/atto/tests/behat/customtoolbar.feature index ecd6fdbb4e649..fd90f4c9818cb 100644 --- a/lib/editor/atto/tests/behat/customtoolbar.feature +++ b/lib/editor/atto/tests/behat/customtoolbar.feature @@ -14,7 +14,7 @@ Feature: Atto editor with customised toolbar | label | L1 | FixtureLink | C1 | label1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "FixtureLink" @javascript diff --git a/lib/editor/tinymce/tests/behat/edit_available_icons.feature b/lib/editor/tinymce/tests/behat/edit_available_icons.feature index ec112da19b931..9a1897c8d29d8 100644 --- a/lib/editor/tinymce/tests/behat/edit_available_icons.feature +++ b/lib/editor/tinymce/tests/behat/edit_available_icons.feature @@ -19,7 +19,7 @@ Feature: Add or remove items from the TinyMCE editor toolbar When the following config values are set as admin: | customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Database" to section "1" Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist @@ -30,7 +30,7 @@ Feature: Add or remove items from the TinyMCE editor toolbar When the following config values are set as admin: | customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen,anchor | editor_tinymce | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Database" to section "1" Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist @@ -38,14 +38,14 @@ Feature: Add or remove items from the TinyMCE editor toolbar And the following config values are set as admin: | customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Database" to section "1" And "#id_introeditor_tbl .mce_anchor" "css_element" should not exist And I press "Cancel" Scenario: Default icons And I am on site homepage - Given I follow "Course 1" + Given I am on course page "Course 1" And I turn editing mode on When I add a "Database" to section "1" And I wait until "#id_introeditor_tbl" "css_element" exists diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index dd65fd0d1938c..215e5623bd06c 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -32,7 +32,7 @@ Feature: Using the activity grade form element And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -80,7 +80,7 @@ Feature: Using the activity grade form element And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -92,7 +92,7 @@ Feature: Using the activity grade form element | Group mode | No groups | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I press "Add a new discussion topic" And I set the following fields to these values: @@ -101,7 +101,7 @@ Feature: Using the activity grade form element And I press "Post to forum" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Discussion subject" And I set the field "rating" to "D" @@ -134,14 +134,14 @@ Feature: Using the activity grade form element And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Test assignment description | | grade[modgrade_type] | Scale | | grade[modgrade_scale] | ABCDEF | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -160,7 +160,7 @@ Feature: Using the activity grade form element Scenario: Attempting to change the maximum grade when ratings exist Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -172,7 +172,7 @@ Feature: Using the activity grade form element | Group mode | No groups | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I press "Add a new discussion topic" And I set the following fields to these values: @@ -181,7 +181,7 @@ Feature: Using the activity grade form element And I press "Post to forum" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Discussion subject" And I set the field "rating" to "100" @@ -197,12 +197,12 @@ Feature: Using the activity grade form element @javascript Scenario: Attempting to change the maximum grade when no rescaling option has been chosen Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Test assignment description | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" diff --git a/lib/form/tests/behat/multi_select_dependencies.feature b/lib/form/tests/behat/multi_select_dependencies.feature index 4a60d7da5452e..09e656c016c5c 100644 --- a/lib/form/tests/behat/multi_select_dependencies.feature +++ b/lib/form/tests/behat/multi_select_dependencies.feature @@ -14,7 +14,7 @@ Feature: Forms with a multi select field dependency | label | L1 | FixtureLink | C1 | label1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I follow "FixtureLink" Then the "Enter your name" "field" should be disabled And I set the field "Choose one or more directions" to "South,West" diff --git a/lib/tests/behat/largeforms.feature b/lib/tests/behat/largeforms.feature index 8fdb790117747..74520fc8fe275 100644 --- a/lib/tests/behat/largeforms.feature +++ b/lib/tests/behat/largeforms.feature @@ -14,7 +14,7 @@ Feature: Forms with a large number of fields | label | L1 | FixtureLink | C1 | label1 | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "FixtureLink" # Note: These tests do not actually use JavaScript but they don't work with diff --git a/message/output/popup/tests/behat/notification_popover_unread.feature b/message/output/popup/tests/behat/notification_popover_unread.feature index 90d94d9c8ecc7..cee9b0485341a 100644 --- a/message/output/popup/tests/behat/notification_popover_unread.feature +++ b/message/output/popup/tests/behat/notification_popover_unread.feature @@ -25,7 +25,7 @@ Feature: Notification popover unread notifications | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -34,7 +34,7 @@ Feature: Notification popover unread notifications | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" # This should generate a notification. diff --git a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature index 75d67009f7b3a..7bcda2d9c3639 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -29,7 +29,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I am on site homepage And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -38,7 +38,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading | Maximum number of uploaded files | 2 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager @@ -49,7 +49,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Submitted for grading" "table_row" @@ -104,7 +104,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading | G1 | G1 | | G1 | G2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -115,7 +115,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading | Grouping for student groups | G1 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager @@ -125,7 +125,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 2" "table_row" diff --git a/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature b/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature index ca59ff37925d4..58b1a840e51d5 100644 --- a/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature @@ -27,7 +27,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users | student1 | G1 | | student2 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -37,7 +37,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users | Students submit in groups | Yes | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager @@ -47,7 +47,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Submitted for grading" "table_row" @@ -67,7 +67,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users And I click on "Edit settings" "link" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I follow "View annotated PDF..." Then I should see "Annotate PDF" @@ -75,7 +75,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users And I click on "Close" "button" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "View annotated PDF..." @@ -83,10 +83,10 @@ Feature: In a group assignment, teacher can annotate PDF files for all users Scenario: Submit a PDF file as a student and annotate the PDF as a teacher and all students in the group get a copy of the annotated PDF. Given I press "Save changes" And I click on "Ok" "button" - And I follow "Course 1" + And I am on course page "Course 1" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I follow "View annotated PDF..." And I change window size to "large" @@ -96,6 +96,6 @@ Feature: In a group assignment, teacher can annotate PDF files for all users And I click on "Close" "button" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "View annotated PDF..." diff --git a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature index f404c237f8a37..5f21c2f4288b8 100644 --- a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature @@ -19,7 +19,7 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt. | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -30,7 +30,7 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt. | Maximum attempts | Unlimited | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager @@ -41,7 +41,7 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt. And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Submitted for grading" "table_row" diff --git a/mod/assign/feedback/file/tests/behat/feedback_file.feature b/mod/assign/feedback/file/tests/behat/feedback_file.feature index 034f36d78fe61..6afe9f880f840 100644 --- a/mod/assign/feedback/file/tests/behat/feedback_file.feature +++ b/mod/assign/feedback/file/tests/behat/feedback_file.feature @@ -26,7 +26,7 @@ Feature: In an assignment, teacher can submit feedback files during grading | student1 | G1 | | student2 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -40,7 +40,7 @@ Feature: In an assignment, teacher can submit feedback files during grading And I press "Save and display" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I upload "mod/assign/feedback/file/tests/fixtures/submission.txt" file to "File submissions" filemanager @@ -50,7 +50,7 @@ Feature: In an assignment, teacher can submit feedback files during grading And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I click on "Grade" "link" in the ".submissionlinks" "css_element" And I upload "mod/assign/feedback/file/tests/fixtures/feedback.txt" file to "Feedback files" filemanager @@ -63,12 +63,12 @@ Feature: In an assignment, teacher can submit feedback files during grading 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" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "feedback.txt" And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should not see "feedback.txt" @@ -79,11 +79,11 @@ Feature: In an assignment, teacher can submit feedback files during grading 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" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "feedback.txt" And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should see "feedback.txt" diff --git a/mod/assign/tests/behat/allow_another_attempt.feature b/mod/assign/tests/behat/allow_another_attempt.feature index de06901bca55f..61c04e8986066 100644 --- a/mod/assign/tests/behat/allow_another_attempt.feature +++ b/mod/assign/tests/behat/allow_another_attempt.feature @@ -18,7 +18,7 @@ Feature: In an assignment, students start a new attempt based on their previous | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -28,7 +28,7 @@ Feature: In an assignment, students start a new attempt based on their previous | Attempts reopened | Manually | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -36,7 +36,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -47,13 +47,13 @@ Feature: In an assignment, students start a new attempt based on their previous And I click on "Edit settings" "link" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add a new attempt based on previous submission" And I press "Save changes" Then I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -89,7 +89,7 @@ Feature: In an assignment, students start a new attempt based on their previous | student3 | G2 | | student4 | G2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -102,7 +102,7 @@ Feature: In an assignment, students start a new attempt based on their previous | Group mode | Separate groups | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -110,7 +110,7 @@ Feature: In an assignment, students start a new attempt based on their previous And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" @@ -131,7 +131,7 @@ Feature: In an assignment, students start a new attempt based on their previous # Behat tests for the group submission, should be uncommented once the MDL-48216 is fixed. # And I log out # And I log in as "student3" -# And I follow "Course 1" +# And I am on course page "Course 1" # And I follow "Test assignment name" # #And I should see "This is attempt 1 ( 3 attempts allowed )." # And I press "Add submission" @@ -140,7 +140,7 @@ Feature: In an assignment, students start a new attempt based on their previous # And I press "Save changes" # And I log out # And I log in as "teacher1" -# And I follow "Course 1" +# And I am on course page "Course 1" # And I follow "Test assignment name" # And I navigate to "View all submissions" in current page administration # And "Student 1" row "Status" column of "generaltable" table should contain "Reopened" @@ -153,7 +153,7 @@ Feature: In an assignment, students start a new attempt based on their previous # And I press "Save changes" # And I log out # And I log in as "student4" -# And I follow "Course 1" +# And I am on course page "Course 1" # And I follow "Test assignment name" # #And I should see "This is attempt 2 ( 3 attempts allowed )." # And I press "Add submission" @@ -162,7 +162,7 @@ Feature: In an assignment, students start a new attempt based on their previous # And I press "Save changes" # And I log out # And I log in as "teacher1" -# And I follow "Course 1" +# And I am on course page "Course 1" # And I follow "Test assignment name" # I navigate to "View all submissions" in current page administration # And I click on "Grade" "link" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/assign_course_reset.feature b/mod/assign/tests/behat/assign_course_reset.feature index 4bfb36d7ec298..bbe3a8ed72cda 100644 --- a/mod/assign/tests/behat/assign_course_reset.feature +++ b/mod/assign/tests/behat/assign_course_reset.feature @@ -23,7 +23,7 @@ Feature: Assign reset | Group 1 | C1 | G1 | | Group 2 | C1 | G2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -36,7 +36,7 @@ Feature: Assign reset Scenario: Use course reset to clear all attempt data When I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -47,7 +47,7 @@ Feature: Assign reset And I should see "Not graded" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should see "Submitted for grading" @@ -56,7 +56,7 @@ Feature: Assign reset | Delete all submissions | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration Then I should not see "Submitted for grading" @@ -81,7 +81,7 @@ Feature: Assign reset | Delete all user overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" @@ -105,7 +105,7 @@ Feature: Assign reset | Delete all group overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/assign/tests/behat/assign_group_override.feature b/mod/assign/tests/behat/assign_group_override.feature index 7757d2def7430..4087ac47cba48 100644 --- a/mod/assign/tests/behat/assign_group_override.feature +++ b/mod/assign/tests/behat/assign_group_override.feature @@ -30,7 +30,7 @@ Feature: Assign group override | student2 | G2 | | student3 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -112,12 +112,12 @@ Feature: Assign group override And I should see "Wednesday, 1 January 2020, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should see "Saturday, 1 January 2000, 8:00" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Wednesday, 1 January 2020, 8:00" @@ -148,12 +148,12 @@ Feature: Assign group override And I should see "Wednesday, 1 January 2020, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should not see "Make changes to your submission" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Make changes to your submission" @@ -184,13 +184,13 @@ Feature: Assign group override And I should see "Thursday, 1 January 2015, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" And I should not see "Add submission" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" @@ -235,16 +235,16 @@ Feature: Assign group override And I should see "Friday, 1 January 2021, 8:00" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "This assignment will accept submissions from Friday, 1 January 2021, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" diff --git a/mod/assign/tests/behat/assign_user_override.feature b/mod/assign/tests/behat/assign_user_override.feature index 0cf358996128d..22862619da84a 100644 --- a/mod/assign/tests/behat/assign_user_override.feature +++ b/mod/assign/tests/behat/assign_user_override.feature @@ -19,7 +19,7 @@ Feature: Assign user override | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -101,12 +101,12 @@ Feature: Assign user override And I should see "Wednesday, 1 January 2020, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should see "Saturday, 1 January 2000, 8:00" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Wednesday, 1 January 2020, 8:00" @@ -137,12 +137,12 @@ Feature: Assign user override And I should see "Wednesday, 1 January 2020, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should not see "Make changes to your submission" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Make changes to your submission" @@ -173,11 +173,11 @@ Feature: Assign user override And I should see "Thursday, 1 January 2015, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" diff --git a/mod/assign/tests/behat/comment_inline.feature b/mod/assign/tests/behat/comment_inline.feature index b6033f2cf4966..31e15f51f012b 100644 --- a/mod/assign/tests/behat/comment_inline.feature +++ b/mod/assign/tests/behat/comment_inline.feature @@ -18,7 +18,7 @@ Feature: In an assignment, teachers can edit a students submission inline | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -30,7 +30,7 @@ Feature: In an assignment, teachers can edit a students submission inline | assignfeedback_comments_commentinline | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -38,7 +38,7 @@ Feature: In an assignment, teachers can edit a students submission inline And I press "Save changes" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -59,7 +59,7 @@ Feature: In an assignment, teachers can edit a students submission inline And I should see "empty.txt" in the "Student 1" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Submitted for grading" in the "Submission status" "table_row" And I should see "Graded" in the "Grading status" "table_row" diff --git a/mod/assign/tests/behat/display_error_message_onbadformat.feature b/mod/assign/tests/behat/display_error_message_onbadformat.feature index c7d374f9fc877..b0ede3cd59950 100644 --- a/mod/assign/tests/behat/display_error_message_onbadformat.feature +++ b/mod/assign/tests/behat/display_error_message_onbadformat.feature @@ -21,7 +21,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -51,7 +51,7 @@ Feature: Check that the assignment grade can not be input in a wrong format. | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | diff --git a/mod/assign/tests/behat/display_grade.feature b/mod/assign/tests/behat/display_grade.feature index a1772f9cb1919..1ef34cb9c8504 100644 --- a/mod/assign/tests/behat/display_grade.feature +++ b/mod/assign/tests/behat/display_grade.feature @@ -21,7 +21,7 @@ Feature: Check that the assignment grade can be updated correctly | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -56,7 +56,7 @@ Feature: Check that the assignment grade can be updated correctly | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index d8b792b44cece..c59769354746f 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -20,7 +20,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -30,7 +30,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su | Attempts reopened | Manually | And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -38,7 +38,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 2" "table_row" @@ -51,12 +51,12 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I click on "Edit settings" "link" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "I'm the teacher first feedback" in the "Feedback comments" "table_row" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 2" "table_row" @@ -71,7 +71,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su And I click on "Edit settings" "link" And I log out Then I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row" And I should see "50.00" diff --git a/mod/assign/tests/behat/edit_student_submission.feature b/mod/assign/tests/behat/edit_student_submission.feature index 0f374f0969463..940f2446b0968 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -16,7 +16,7 @@ Feature: In an assignment, the administrator can edit students' submissions | student1 | C1 | student | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -25,7 +25,7 @@ Feature: In an assignment, the administrator can edit students' submissions | groupmode | No groups | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -34,7 +34,7 @@ Feature: In an assignment, the administrator can edit students' submissions And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/file_submission.feature b/mod/assign/tests/behat/file_submission.feature index 74bf9cf212969..6a40216d3f65a 100644 --- a/mod/assign/tests/behat/file_submission.feature +++ b/mod/assign/tests/behat/file_submission.feature @@ -18,7 +18,7 @@ Feature: In an assignment, students can upload files for assessment | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -28,7 +28,7 @@ Feature: In an assignment, students can upload files for assessment | Maximum number of uploaded files | 2 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager diff --git a/mod/assign/tests/behat/filter_by_marker.feature b/mod/assign/tests/behat/filter_by_marker.feature index 7d3006b2cd35e..33bcd4d6d35d7 100644 --- a/mod/assign/tests/behat/filter_by_marker.feature +++ b/mod/assign/tests/behat/filter_by_marker.feature @@ -22,7 +22,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned | student2 | C1 | student | | marker1 | C1 | teacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -41,7 +41,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned And I click on "Edit settings" "link" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I set the field "markerfilter" to "Marker 1" diff --git a/mod/assign/tests/behat/grading_status.feature b/mod/assign/tests/behat/grading_status.feature index 819b62f440602..9fbfdee100871 100644 --- a/mod/assign/tests/behat/grading_status.feature +++ b/mod/assign/tests/behat/grading_status.feature @@ -21,7 +21,7 @@ Feature: View the grading status of an assignment Scenario: View the grading status for an assignment with marking workflow enabled # Add the assignment. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -33,7 +33,7 @@ Feature: View the grading status of an assignment And I log in as "student1" And I click on ".collapsibleregioncaption" "css_element" And I should see "Not marked" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test assignment name" Then I should not see "Feedback" And I should see "Not marked" in the "Grading status" "table_row" @@ -47,7 +47,7 @@ Feature: View the grading status of an assignment And I log out # Mark the submission. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should see "Not marked" in the "Student 1" "table_row" @@ -65,7 +65,7 @@ Feature: View the grading status of an assignment And I log out # View the grading status as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "In review" in the "Grading status" "table_row" And I should not see "Great job! Lol, not really." @@ -75,7 +75,7 @@ Feature: View the grading status of an assignment And I log out # Mark the submission again but set the marking workflow to 'Released'. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should see "In review" in the "Student 1" "table_row" @@ -90,7 +90,7 @@ Feature: View the grading status of an assignment And I log out # View the grading status as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Released" in the "Grading status" "table_row" And I should see "Great job! Lol, not really." @@ -100,7 +100,7 @@ Feature: View the grading status of an assignment And I log out # Now, change the status from 'Released' to 'In marking' (this will remove the grade from the gradebook). And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should see "Released" in the "Student 1" "table_row" @@ -122,7 +122,7 @@ Feature: View the grading status of an assignment Scenario: View the grading status for an assignment with marking workflow disabled # Add the assignment. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -133,7 +133,7 @@ Feature: View the grading status of an assignment And I log in as "student1" When I click on ".collapsibleregioncaption" "css_element" Then I should see "Not graded" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "Feedback" And I should see "Not graded" in the "Grading status" "table_row" @@ -144,7 +144,7 @@ Feature: View the grading status of an assignment And I log out # Mark the submission. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should not see "Graded" in the "Student 1" "table_row" @@ -160,7 +160,7 @@ Feature: View the grading status of an assignment And I log out # View the grading status as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Graded" in the "Grading status" "table_row" And I should see "Great job! Lol, not really." diff --git a/mod/assign/tests/behat/grant_extension.feature b/mod/assign/tests/behat/grant_extension.feature index ab84038c93cd2..b1cddf0be583f 100644 --- a/mod/assign/tests/behat/grant_extension.feature +++ b/mod/assign/tests/behat/grant_extension.feature @@ -33,7 +33,7 @@ Feature: Grant an extension to an offline student | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" @@ -44,7 +44,7 @@ Feature: Grant an extension to an offline student Then I should see "Extension granted until:" in the "Student 1" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Extension due date" @@ -54,7 +54,7 @@ Feature: Grant an extension to an offline student | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" @@ -76,7 +76,7 @@ Feature: Grant an extension to an offline student And I should see "Extension granted until:" in the "Student 6" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "Extension due date" @@ -86,7 +86,7 @@ Feature: Grant an extension to an offline student | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" @@ -108,7 +108,7 @@ Feature: Grant an extension to an offline student | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" diff --git a/mod/assign/tests/behat/group_submission.feature b/mod/assign/tests/behat/group_submission.feature index b30e71b01f87d..ea7b8ff7c18a7 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -27,7 +27,7 @@ Feature: Group assignment submissions | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -52,7 +52,7 @@ Feature: Group assignment submissions And I navigate to "Users > Groups" in current page administration And I add "Student 0 (student0@example.com)" user to "Group 1" group members And I add "Student 1 (student1@example.com)" user to "Group 1" group members - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist @@ -91,7 +91,7 @@ Feature: Group assignment submissions | student1 | G1 | | student2 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -103,7 +103,7 @@ Feature: Group assignment submissions | Require group to make submission | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -111,7 +111,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" @@ -120,7 +120,7 @@ Feature: Group assignment submissions And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -128,7 +128,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" @@ -178,7 +178,7 @@ Feature: Group assignment submissions | GG1 | G2 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -191,7 +191,7 @@ Feature: Group assignment submissions | Require group to make submission | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -199,7 +199,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -207,7 +207,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "student5" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -216,7 +216,7 @@ Feature: Group assignment submissions And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "3" in the "Groups" "table_row" And I should see "3" in the "Submitted" "table_row" diff --git a/mod/assign/tests/behat/online_submissions.feature b/mod/assign/tests/behat/online_submissions.feature index f2d154f565829..9243253debddc 100644 --- a/mod/assign/tests/behat/online_submissions.feature +++ b/mod/assign/tests/behat/online_submissions.feature @@ -18,7 +18,7 @@ Feature: In an assignment, students can add and edit text online | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -29,7 +29,7 @@ Feature: In an assignment, students can add and edit text online | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -66,7 +66,7 @@ Feature: In an assignment, students can add and edit text online And the following config values are set as admin: | autosavefrequency | 1 | editor_atto | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -75,14 +75,14 @@ Feature: In an assignment, students can add and edit text online | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: | Online text | text submission | # Wait for the draft auto save. And I wait "2" seconds - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" # Confirm draft was restored. diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 6f6a230f4132b..f9457220a9f3f 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -35,7 +35,7 @@ Feature: Outcome grading | Scale | Test Scale | And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" 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" @@ -43,7 +43,7 @@ Feature: Outcome grading Scenario: Giving an outcome to a student Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -52,7 +52,7 @@ Feature: Outcome grading | Outcome Test | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -60,7 +60,7 @@ Feature: Outcome grading And I press "Save changes" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 0" "table_row" @@ -85,12 +85,12 @@ Feature: Outcome grading | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I add "Student 0 (student0@example.com)" user to "Group 1" group members And I add "Student 1 (student1@example.com)" user to "Group 1" group members And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -101,7 +101,7 @@ Feature: Outcome grading | Outcome Test | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -109,7 +109,7 @@ Feature: Outcome grading And I press "Save changes" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 0" "table_row" diff --git a/mod/assign/tests/behat/prevent_submission_changes.feature b/mod/assign/tests/behat/prevent_submission_changes.feature index d6fc08a83ac07..538e7f052e8c7 100644 --- a/mod/assign/tests/behat/prevent_submission_changes.feature +++ b/mod/assign/tests/behat/prevent_submission_changes.feature @@ -22,7 +22,7 @@ Feature: Prevent or allow assignment submission changes @javascript Scenario: Preventing changes and allowing them again Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -31,7 +31,7 @@ Feature: Prevent or allow assignment submission changes | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -43,7 +43,7 @@ Feature: Prevent or allow assignment submission changes And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" @@ -51,13 +51,13 @@ Feature: Prevent or allow assignment submission changes Then I should see "Submission changes not allowed" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And "Edit submission" "button" should not exist And I should see "This assignment is not accepting submissions" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" @@ -65,7 +65,7 @@ Feature: Prevent or allow assignment submission changes And I should not see "Submission changes not allowed" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "This assignment is not accepting submissions" And I press "Edit submission" @@ -80,7 +80,7 @@ Feature: Prevent or allow assignment submission changes | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | | assign | C1 | assign1 | Test assignment name | Test assignment description | 1 | 0 | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -88,7 +88,7 @@ Feature: Prevent or allow assignment submission changes And I press "Save changes" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -96,7 +96,7 @@ Feature: Prevent or allow assignment submission changes And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" @@ -105,12 +105,12 @@ Feature: Prevent or allow assignment submission changes And I should see "Submission changes not allowed" in the "Student 2" "table_row" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "Edit submission" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I set the field "selectall" to "1" @@ -120,7 +120,7 @@ Feature: Prevent or allow assignment submission changes And I should not see "Submission changes not allowed" in the "Student 2" "table_row" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Edit submission" And I set the following fields to these values: diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index 5305f07526592..8c897017c29f2 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -19,7 +19,7 @@ Feature: In an assignment, teachers grade multiple students on one page | student1 | C1 | student | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -27,7 +27,7 @@ Feature: In an assignment, teachers grade multiple students on one page | assignsubmission_onlinetext_enabled | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -36,7 +36,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -64,7 +64,7 @@ Feature: In an assignment, teachers grade multiple students on one page And the following config values are set as admin: | enableoutcomes | 1 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" @@ -73,7 +73,7 @@ Feature: In an assignment, teachers grade multiple students on one page | Name | 1337dom scale | | Scale | Noob, Nub, 1337, HaXor | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" @@ -82,7 +82,7 @@ Feature: In an assignment, teachers grade multiple students on one page | Short name | skillZ! | | Scale | 1337dom scale | And I press "Save changes" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -92,7 +92,7 @@ Feature: In an assignment, teachers grade multiple students on one page | M8d skillZ! | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -100,7 +100,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Save changes" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -108,7 +108,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -128,7 +128,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Continue" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "I'm the teacher first feedback" And I should see "60.0" @@ -137,7 +137,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should see "1337" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "I'm the teacher first feedback" And I should not see "60.0" @@ -146,7 +146,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should not see "1337" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Hide User picture" "link" @@ -167,7 +167,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Continue" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should see "I'm the teacher first feedback" And I should see "60.0" @@ -176,7 +176,7 @@ Feature: In an assignment, teachers grade multiple students on one page And I should see "1337" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I should not see "I'm the teacher first feedback" And I should not see "60.0" diff --git a/mod/assign/tests/behat/reopen_locked_submission.feature b/mod/assign/tests/behat/reopen_locked_submission.feature index a6ff8283aa93f..a259549afcaa4 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -20,7 +20,7 @@ Feature: Submissions are unlocked when a new attempt is given @javascript Scenario: A locked submission should unlock when a new attempt is automatically given. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -30,7 +30,7 @@ Feature: Submissions are unlocked when a new attempt is given | Grade to pass | 50 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -39,7 +39,7 @@ Feature: Submissions are unlocked when a new attempt is given And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" @@ -56,7 +56,7 @@ Feature: Submissions are unlocked when a new attempt is given @javascript Scenario: A locked submission should unlock when a new attempt is manually given. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -65,7 +65,7 @@ Feature: Submissions are unlocked when a new attempt is given | Attempts reopened | Manually | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -74,7 +74,7 @@ Feature: Submissions are unlocked when a new attempt is given And I log out And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Edit" "link" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/rescale_grades.feature b/mod/assign/tests/behat/rescale_grades.feature index 47f5727607648..8bc2410cd8ab6 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -20,7 +20,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index c37c43f4fd2cd..1ec596a8e805e 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -19,7 +19,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an | student1 | C1 | student | # Add the assignment. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -31,7 +31,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log out # Add a submission. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test assignment name" Then I should not see "Feedback" And I should see "Not marked" in the "Grading status" "table_row" @@ -42,7 +42,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log out # Mark the submission. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I should see "Not marked" in the "I'm the student's first submission" "table_row" @@ -81,7 +81,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Continue" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook Then I should see "50" And I should see "Great job! Lol, not really." @@ -109,7 +109,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I should see "Released" in the "Student 1" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "User report" in the course gradebook Then I should see "50" And I should see "Great job! Lol, not really." diff --git a/mod/assign/tests/behat/submission_comments.feature b/mod/assign/tests/behat/submission_comments.feature index fad5d43a014c9..72760e8a2489b 100644 --- a/mod/assign/tests/behat/submission_comments.feature +++ b/mod/assign/tests/behat/submission_comments.feature @@ -22,7 +22,7 @@ Feature: In an assignment, students can comment in their submissions | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | | assign | C1 | assign1 | Test assignment name | Test assignment description | 1 | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -50,7 +50,7 @@ Feature: In an assignment, students can comment in their submissions | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignmentsubmission_file_enabled | assignfeedback_comments_enabled | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" @@ -70,7 +70,7 @@ Feature: In an assignment, students can comment in their submissions | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignmentsubmission_file_enabled | assignfeedback_comments_enabled | | assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" And I navigate to "View all submissions" in current page administration And I click on "Grade" "link" in the "Student 1" "table_row" diff --git a/mod/assign/tests/behat/submit_without_group.feature b/mod/assign/tests/behat/submit_without_group.feature index bffaf6503d9de..9c6fb1bd63164 100644 --- a/mod/assign/tests/behat/submit_without_group.feature +++ b/mod/assign/tests/behat/submit_without_group.feature @@ -45,7 +45,7 @@ Feature: Submit assignment without group | student3 | GC32 | # Student 1 can only submit assignment in course 2. When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Allow default group" Then I should not see "Not a member of any group" And I should not see "This assignment requires submission in groups. You are not a member of any group" @@ -57,14 +57,14 @@ Feature: Submit assignment without group And I press "Submit assignment" And I press "Continue" And I should see "Submitted for grading" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Require group membership" And I should see "Not a member of any group" And I should see "This assignment requires submission in groups. You are not a member of any group" And I should see "Nothing has been submitted for this assignment" And I should not see "Add submission" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Require group membership" And I should not see "Not a member of any group" And I should see "Nothing has been submitted for this assignment" @@ -78,17 +78,17 @@ Feature: Submit assignment without group And I log out # Student 2 should see submitted for grading. And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Allow default group" And I should see "Submitted for grading" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Require group membership" And I should see "Submitted for grading" And I log out # Teacher should see student 1 and student 2 has submitted assignment. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Allow default group" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." @@ -98,7 +98,7 @@ Feature: Submit assignment without group And I should see "Submitted for grading" in the "Student 1" "table_row" And I should see "Submitted for grading" in the "Student 2" "table_row" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Require group membership" And I should see "0" in the "Groups" "table_row" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." @@ -108,7 +108,7 @@ Feature: Submit assignment without group And I should not see "Submitted for grading" in the "Student 1" "table_row" And I should not see "Submitted for grading" in the "Student 2" "table_row" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Require group membership" And I should see "1" in the "Groups" "table_row" And I should not see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." @@ -120,7 +120,7 @@ Feature: Submit assignment without group And I log out # Test student 3 (in multiple groups) should not be able to submit. And I log in as "student3" - And I follow "Course 3" + And I am on course page "Course 3" And I follow "Require group membership" And I should see "Member of more than one group" And I should see "The assignment requires submission in groups. You are a member of more than one group." @@ -128,7 +128,7 @@ Feature: Submit assignment without group And I should not see "Add submission" And I log out And I log in as "teacher1" - And I follow "Course 3" + And I am on course page "Course 3" And I follow "Require group membership" And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions." And I navigate to "View all submissions" in current page administration diff --git a/mod/book/tests/behat/create_chapters.feature b/mod/book/tests/behat/create_chapters.feature index b249fdd3b41ce..de801153e168c 100644 --- a/mod/book/tests/behat/create_chapters.feature +++ b/mod/book/tests/behat/create_chapters.feature @@ -15,7 +15,7 @@ Feature: In a book, create chapters and sub chapters | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book | diff --git a/mod/book/tests/behat/edit_navigation_options.feature b/mod/book/tests/behat/edit_navigation_options.feature index d0207a98b1c4e..6cf93ab5740c5 100644 --- a/mod/book/tests/behat/edit_navigation_options.feature +++ b/mod/book/tests/behat/edit_navigation_options.feature @@ -15,7 +15,7 @@ Feature: In a book, change the navigation options | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Change navigation options diff --git a/mod/book/tests/behat/log_entries.feature b/mod/book/tests/behat/log_entries.feature index 805cdb08ec92d..d970af13a7d2a 100644 --- a/mod/book/tests/behat/log_entries.feature +++ b/mod/book/tests/behat/log_entries.feature @@ -11,7 +11,7 @@ Feature: In a book, verify log entries | Course 1 | C1 | 0 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "Book" to section "1" and I fill the form with: | Name | Test book | diff --git a/mod/book/tests/behat/show_hide_chapters.feature b/mod/book/tests/behat/show_hide_chapters.feature index 61e97bfdaa0fe..516cf3e5a69f0 100644 --- a/mod/book/tests/behat/show_hide_chapters.feature +++ b/mod/book/tests/behat/show_hide_chapters.feature @@ -15,7 +15,7 @@ Feature: Book activity chapter visibility management | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book | @@ -54,7 +54,7 @@ Feature: Book activity chapter visibility management And I follow "Hide chapter \"2. Third chapter\"" And I turn editing mode off And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book" Then I should not see "Second chapter" in the "Table of contents" "block" And I should not see "Third chapter" in the "Table of contents" "block" diff --git a/mod/chat/tests/behat/chat_calendar_events.feature b/mod/chat/tests/behat/chat_calendar_events.feature index e91955bd93dc4..e7a3034113f7a 100644 --- a/mod/chat/tests/behat/chat_calendar_events.feature +++ b/mod/chat/tests/behat/chat_calendar_events.feature @@ -22,7 +22,7 @@ Feature: Chat calendar entries | activity | name | intro | course | idnumber | schedule | | chat | Test chat name | Test chat description | C1 | chat1 | 0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Calendar" node in "Site pages" Then I should not see "Test chat name" @@ -31,6 +31,6 @@ Feature: Chat calendar entries | activity | name | intro | course | idnumber | schedule | | chat | Test chat name | Test chat description | C1 | chat1 | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Calendar" node in "Site pages" Then I should see "Test chat name" diff --git a/mod/chat/tests/behat/chat_course_reset.feature b/mod/chat/tests/behat/chat_course_reset.feature index 02b8536f7dd3c..68e27c29ebb90 100644 --- a/mod/chat/tests/behat/chat_course_reset.feature +++ b/mod/chat/tests/behat/chat_course_reset.feature @@ -22,7 +22,7 @@ Feature: Chat reset Scenario: Use course reset to update chat start date And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: @@ -48,7 +48,7 @@ Feature: Chat reset And I press "Reset course" And I should see "Date changed" in the "Chats" "table_row" And I press "Continue" - Then I follow "Course 1" + Then I am on course page "Course 1" And I follow "Test chat name" And I navigate to "Edit settings" in current page administration And I expand all fieldsets diff --git a/mod/choice/tests/behat/add_choice.feature b/mod/choice/tests/behat/add_choice.feature index 8f39741bb5e01..495aa5620296d 100644 --- a/mod/choice/tests/behat/add_choice.feature +++ b/mod/choice/tests/behat/add_choice.feature @@ -17,7 +17,7 @@ Feature: Add choice activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -26,7 +26,7 @@ Feature: Add choice activity | option[1] | Option 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" diff --git a/mod/choice/tests/behat/allow_preview.feature b/mod/choice/tests/behat/allow_preview.feature index 32023fbf84ca7..93d711c51a31d 100644 --- a/mod/choice/tests/behat/allow_preview.feature +++ b/mod/choice/tests/behat/allow_preview.feature @@ -17,7 +17,7 @@ Feature: Allow choice preview | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Enable the choice preview option and view the activity as a student before the opening time @@ -37,7 +37,7 @@ Feature: Allow choice preview | Show preview | 1 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "This is just a preview of the available options for this activity" And the "choice_1" "radio" should be disabled diff --git a/mod/choice/tests/behat/block_editing.feature b/mod/choice/tests/behat/block_editing.feature index ea6577baab8bd..8ff447605752a 100644 --- a/mod/choice/tests/behat/block_editing.feature +++ b/mod/choice/tests/behat/block_editing.feature @@ -11,7 +11,7 @@ Feature: Editing choice block | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | @@ -43,7 +43,7 @@ Feature: Editing choice block | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | @@ -74,7 +74,7 @@ Feature: Editing choice block | teacher1 | C1 | editingteacher | | teacher1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | diff --git a/mod/choice/tests/behat/change_response.feature b/mod/choice/tests/behat/change_response.feature index e29e1cc6896f6..8094f5b44123c 100644 --- a/mod/choice/tests/behat/change_response.feature +++ b/mod/choice/tests/behat/change_response.feature @@ -17,7 +17,7 @@ Feature: Teacher can choose whether to allow students to change their choice res | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -27,14 +27,14 @@ Feature: Teacher can choose whether to allow students to change their choice res | option[1] | Option 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" And "Save my choice" "button" should not exist And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I follow "Edit settings" And I set the following fields to these values: @@ -42,7 +42,7 @@ Feature: Teacher can choose whether to allow students to change their choice res And I press "Save and display" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I should see "Your selection: Option 1" And "Save my choice" "button" should exist diff --git a/mod/choice/tests/behat/choice_availability.feature b/mod/choice/tests/behat/choice_availability.feature index 1894ac0e7f273..9e700a8f4ea63 100644 --- a/mod/choice/tests/behat/choice_availability.feature +++ b/mod/choice/tests/behat/choice_availability.feature @@ -17,7 +17,7 @@ Feature: Restrict availability of the choice module to a deadline | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Enable the choice activity with a start deadline in the future @@ -32,7 +32,7 @@ Feature: Restrict availability of the choice module to a deadline | timeopen[year] | 2037 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "Sorry, this activity is not available until" @@ -48,7 +48,7 @@ Feature: Restrict availability of the choice module to a deadline | timeopen[year] | 2007 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And "choice_1" "radio" should exist And "choice_2" "radio" should exist @@ -66,7 +66,7 @@ Feature: Restrict availability of the choice module to a deadline | timeclose[year] | 2037 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And "choice_1" "radio" should exist And "choice_2" "radio" should exist @@ -84,6 +84,6 @@ Feature: Restrict availability of the choice module to a deadline | timeclose[year] | 2007 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "Sorry, this activity closed on" diff --git a/mod/choice/tests/behat/include_inactive.feature b/mod/choice/tests/behat/include_inactive.feature index 2ab30edf5a52b..0a7d84dbd3da5 100644 --- a/mod/choice/tests/behat/include_inactive.feature +++ b/mod/choice/tests/behat/include_inactive.feature @@ -21,7 +21,7 @@ Feature: Include responses from inactive users | student2 | C1 | student | | student3 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Enable the choice include inactive option and check that responses from inactive students are visible @@ -34,22 +34,22 @@ Feature: Include responses from inactive users | Include responses from inactive/suspended users | Yes | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 2" from "Choice name" choice activity And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 3" from "Choice name" choice activity And I log out And the following "course enrolments" exist: | user | course | role | status | | student1 | C1 | student | 1 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -61,7 +61,7 @@ Feature: Include responses from inactive users | user | course | role | timestart | | student2 | C1 | student | 2145830400 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -73,7 +73,7 @@ Feature: Include responses from inactive users | user | course | role | timeend | | student3 | C1 | student | 1425168000 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -92,22 +92,22 @@ Feature: Include responses from inactive users | Include responses from inactive/suspended users | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 2" from "Choice name" choice activity And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 3" from "Choice name" choice activity And I log out And the following "course enrolments" exist: | user | course | role | status | | student1 | C1 | student | 1 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 2 responses" And I follow "View 2 responses" @@ -119,7 +119,7 @@ Feature: Include responses from inactive users | user | course | role | timestart | | student2 | C1 | student | 2145830400 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 1 responses" And I follow "View 1 responses" @@ -131,7 +131,7 @@ Feature: Include responses from inactive users | user | course | role | timeend | | student3 | C1 | student | 1425168000 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" Then I should see "View 0 responses" And I follow "View 0 responses" diff --git a/mod/choice/tests/behat/limit_responses.feature b/mod/choice/tests/behat/limit_responses.feature index ca0a4f3fef36b..7b81fbd6e3b07 100644 --- a/mod/choice/tests/behat/limit_responses.feature +++ b/mod/choice/tests/behat/limit_responses.feature @@ -19,7 +19,7 @@ Feature: Limit choice responses | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -30,13 +30,13 @@ Feature: Limit choice responses | option[1] | Option 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I should see "Option 1 (Full)" And the "choice_1" "radio" should be disabled diff --git a/mod/choice/tests/behat/modify_choice.feature b/mod/choice/tests/behat/modify_choice.feature index 5c6d9daf4fbb4..55c38e8d65242 100644 --- a/mod/choice/tests/behat/modify_choice.feature +++ b/mod/choice/tests/behat/modify_choice.feature @@ -27,13 +27,13 @@ Feature: Teacher can modify choices of the students @javascript Scenario: Delete students choice response as a teacher When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 1" "checkbox" @@ -45,13 +45,13 @@ Feature: Teacher can modify choices of the students @javascript Scenario: Teacher set answers of students who did not respond or change existing answers When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 1" "checkbox" @@ -69,20 +69,20 @@ Feature: Teacher can modify choices of the students @javascript Scenario: Teacher can delete answers in the multiple answer choice And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I navigate to "Edit settings" in current page administration And I set the field "Allow more than one choice to be selected" to "Yes" And I press "Save and return to course" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose options "Option 1","Option 2" from "Choice name" choice activity And I should see "Your selection: Option 1; Option 2" And I should see "Your choice has been saved" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I navigate to "View 1 responses" in current page administration And I click on "Student 1 Option 2" "checkbox" @@ -91,7 +91,7 @@ Feature: Teacher can modify choices of the students And I select "Choose: Option 3" from the "With selected" singleselect And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I should see "Your selection: Option 1; Option 3" And I log out @@ -99,13 +99,13 @@ Feature: Teacher can modify choices of the students @javascript Scenario: Teacher can manage answers on view page if the names are displayed When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice name" choice activity Then I should see "Your selection: Option 1" And I should see "Your choice has been saved" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: diff --git a/mod/choice/tests/behat/multiple_options.feature b/mod/choice/tests/behat/multiple_options.feature index 43744ae3c4cca..6aaaa3dc1151c 100644 --- a/mod/choice/tests/behat/multiple_options.feature +++ b/mod/choice/tests/behat/multiple_options.feature @@ -17,7 +17,7 @@ Feature: Multiple option choice response | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -27,7 +27,7 @@ Feature: Multiple option choice response | option[1] | Option 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose options "Option 1","Option 2" from "Choice name" choice activity Then I should see "Your selection: Option 1; Option 2" And I should see "Your choice has been saved" @@ -47,7 +47,7 @@ Feature: Multiple option choice response | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -62,13 +62,13 @@ Feature: Multiple option choice response | limit[2] | 1 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose options "Option 1","Option 2" from "Choice name" choice activity Then I should see "Your selection: Option 1; Option 2" And I should see "Your choice has been saved" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I should see "Option 1 (Full)" And I should see "Option 2 (Full)" diff --git a/mod/choice/tests/behat/my_home.feature b/mod/choice/tests/behat/my_home.feature index 5e5d5edc8c6ec..c29d5b3329366 100644 --- a/mod/choice/tests/behat/my_home.feature +++ b/mod/choice/tests/behat/my_home.feature @@ -17,7 +17,7 @@ Feature: Test the display of the choice module on my home | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" And I expand all fieldsets @@ -45,7 +45,7 @@ Feature: Test the display of the choice module on my home Scenario: View my home as a student after answering the choice Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Test choice name" choice activity And I should see "Your selection: Option 1" And I should see "Your choice has been saved" @@ -56,7 +56,7 @@ Feature: Test the display of the choice module on my home Scenario: View my home as a teacher Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Test choice name" choice activity And I should see "Your selection: Option 1" And I should see "Your choice has been saved" diff --git a/mod/choice/tests/behat/publish_results.feature b/mod/choice/tests/behat/publish_results.feature index ac80abcf556f4..533beb48e0d8b 100644 --- a/mod/choice/tests/behat/publish_results.feature +++ b/mod/choice/tests/behat/publish_results.feature @@ -17,7 +17,7 @@ Feature: A teacher can choose one of 4 options for publishing choice results | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Do not publish results to students @@ -29,7 +29,7 @@ Feature: A teacher can choose one of 4 options for publishing choice results | option[1] | Option 2 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I choose "Option 1" from "Choice 1" choice activity Then I should see "Your selection: Option 1" And I should not see "Responses" @@ -44,10 +44,10 @@ Feature: A teacher can choose one of 4 options for publishing choice results | Publish results | Show results to students after they answer | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Choice 1" Then I should not see "Responses" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice 1" choice activity And I should see "Your selection: Option 1" And I should see "Responses" @@ -61,13 +61,13 @@ Feature: A teacher can choose one of 4 options for publishing choice results | option[1] | Option 2 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Choice 1" Then I should not see "Responses" And I choose "Option 1" from "Choice 1" choice activity And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice 1" And I follow "Edit settings" And I expand all fieldsets @@ -83,7 +83,7 @@ Feature: A teacher can choose one of 4 options for publishing choice results And I press "Save and return to course" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice 1" And I should see "Responses" @@ -96,6 +96,6 @@ Feature: A teacher can choose one of 4 options for publishing choice results | Publish results | Always show results to students | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Choice 1" And I should see "Responses" diff --git a/mod/choice/tests/behat/publish_results_anonymously.feature b/mod/choice/tests/behat/publish_results_anonymously.feature index 3b0cefd302f1c..807b6405ead96 100644 --- a/mod/choice/tests/behat/publish_results_anonymously.feature +++ b/mod/choice/tests/behat/publish_results_anonymously.feature @@ -19,7 +19,7 @@ Feature: A teacher can choose whether to publish choice activity results anonymo | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Publish anonymous results @@ -32,11 +32,11 @@ Feature: A teacher can choose whether to publish choice activity results anonymo | Privacy of results | Publish anonymous results, do not show student names | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice 1" choice activity And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice 1" Then I should not see "Student 1" And I should not see "Users who chose this option" @@ -51,11 +51,11 @@ Feature: A teacher can choose whether to publish choice activity results anonymo | Privacy of results | Publish full results, showing names and their choices | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 1" from "Choice 1" choice activity And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice 1" Then I should see "Student 1" And I should see "Users who chose this option" diff --git a/mod/choice/tests/behat/remove_choice_options.feature b/mod/choice/tests/behat/remove_choice_options.feature index 1d1c6dececfc7..2b99f01f8b385 100644 --- a/mod/choice/tests/behat/remove_choice_options.feature +++ b/mod/choice/tests/behat/remove_choice_options.feature @@ -19,7 +19,7 @@ Feature: Update a choice activity removing options | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | @@ -29,19 +29,19 @@ Feature: Update a choice activity removing options | option[2] | Option 3 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 3" from "Choice name" choice activity And I should see "Your selection: Option 3" And I should see "Your choice has been saved" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I choose "Option 2" from "Choice name" choice activity And I should see "Your selection: Option 2" And I should see "Your choice has been saved" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Choice name" And I should see "View 2 responses" And I navigate to "Edit settings" in current page administration diff --git a/mod/data/tests/behat/add_entries.feature b/mod/data/tests/behat/add_entries.feature index 51807833a983a..3c2e45e4ffd22 100644 --- a/mod/data/tests/behat/add_entries.feature +++ b/mod/data/tests/behat/add_entries.feature @@ -21,7 +21,7 @@ Feature: Users can add entries to database activities | activity | name | intro | course | idnumber | | data | Test database name | n | C1 | data1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Text input" field to "Test database name" database and I fill the form with: | Field name | Test field name | | Field description | Test field description | @@ -33,7 +33,7 @@ Feature: Users can add entries to database activities And I wait until the page is ready And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | Test field name | Student original entry | | Test field 2 name | Student original entry 2 | @@ -70,7 +70,7 @@ Feature: Users can add entries to database activities # Now I will bulk delete the rest of the entries. And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" And I press "Select all" And I press "Delete selected" diff --git a/mod/data/tests/behat/manageapproved.feature b/mod/data/tests/behat/manageapproved.feature index 70e415102c752..cade6d16aca0a 100644 --- a/mod/data/tests/behat/manageapproved.feature +++ b/mod/data/tests/behat/manageapproved.feature @@ -17,7 +17,7 @@ Feature: Users can edit approved entries in database activities | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript @@ -37,20 +37,20 @@ Feature: Users can edit approved entries in database activities And I log out # Add an entry as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | Test field name | Student entry | And I press "Save and view" And I log out # Approve the student's entry as a teacher. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" And I follow "Approve" And I log out # Make sure the student can still edit their entry after it's approved. When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" Then I should see "Student entry" And "Edit" "link" should exist @@ -72,20 +72,20 @@ Feature: Users can edit approved entries in database activities And I log out # Add an entry as a student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | Test field name | Student entry | And I press "Save and view" And I log out # Approve the student's entry as a teacher. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" And I follow "Approve" And I log out # Make sure the student isn't able to edit their entry after it's approved. When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" Then I should see "Student entry" And "Edit" "link" should not exist diff --git a/mod/data/tests/behat/required_entries.feature b/mod/data/tests/behat/required_entries.feature index 8ae18dd858858..88ee2d7a70eff 100644 --- a/mod/data/tests/behat/required_entries.feature +++ b/mod/data/tests/behat/required_entries.feature @@ -20,7 +20,7 @@ Feature: Users can be required to specify certain fields when adding entries to | activity | name | intro | course | idnumber | | data | Test database name | n | C1 | data1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Text input" field to "Test database name" database and I fill the form with: | Field name | Base Text input | | Required | yes | @@ -125,7 +125,7 @@ Feature: Users can be required to specify certain fields when adding entries to Scenario: Students receive errors for empty required fields but not for optional fields When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | Base Text input | Some input to allow us to submit the otherwise empty form | And I press "Save and view" @@ -154,7 +154,7 @@ Feature: Users can be required to specify certain fields when adding entries to Scenario: Students recieve no error for filled in required fields When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | Base Text input | Some input to allow us to submit the otherwise empty form | | Required Checkbox Option 1 | 1 | @@ -176,7 +176,7 @@ Feature: Users can be required to specify certain fields when adding entries to Scenario: Fields refill with data after having an error When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add an entry to "Test database name" database with: | RTOC Option 1 | 1 | | Latitude | 0 | @@ -205,7 +205,7 @@ Feature: Users can be required to specify certain fields when adding entries to Scenario: A student fills in Latitude but not Longitude will see an error Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I add an entry to "Test database name" database with: | Base Text input | Some input to allow us to submit the otherwise empty form | | Required Checkbox Option 1 | 1 | @@ -226,7 +226,7 @@ Feature: Users can be required to specify certain fields when adding entries to Scenario: A student filling in number and text fields with zero will not see an error. Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I add an entry to "Test database name" database with: | Base Text input | Some input to allow us to submit the otherwise empty form | | Required Checkbox Option 1 | 1 | diff --git a/mod/data/tests/behat/view_entries.feature b/mod/data/tests/behat/view_entries.feature index b8b5eabeaeaf1..37c246e020a95 100644 --- a/mod/data/tests/behat/view_entries.feature +++ b/mod/data/tests/behat/view_entries.feature @@ -20,7 +20,7 @@ Feature: Users can view and search database entries | activity | name | intro | course | idnumber | | data | Test database name | n | C1 | data1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Text input" field to "Test database name" database and I fill the form with: | Field name | Test field name | | Field description | Test field description | @@ -37,7 +37,7 @@ Feature: Users can view and search database entries And I press "Save and view" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test database name" Then I should see "Teacher entry 1" And I should see "Teacher entry 2" diff --git a/mod/feedback/tests/behat/anonymous.feature b/mod/feedback/tests/behat/anonymous.feature index f344d00dc7cb9..0db30e6cd519a 100644 --- a/mod/feedback/tests/behat/anonymous.feature +++ b/mod/feedback/tests/behat/anonymous.feature @@ -176,8 +176,8 @@ Feature: Anonymous feedback Scenario: Anonymous feedback in a course # Teacher can not When I log in as "teacher" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | @@ -187,8 +187,8 @@ Feature: Anonymous feedback | Multiple choice values | Yes\nNo\nI don't know | And I log out And I log in as "user1" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Preview" Then I should see "Do you like this course?" And I press "Continue" @@ -199,8 +199,8 @@ Feature: Anonymous feedback And I press "Submit your answers" And I log out And I log in as "user2" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Preview" And I should see "Do you like this course?" And I press "Continue" @@ -219,8 +219,8 @@ Feature: Anonymous feedback And I should see "1 (50.00 %)" in the "No" "table_row" And I log out And I log in as "teacher" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Preview" And I should see "Do you like this course?" And I press "Continue" diff --git a/mod/feedback/tests/behat/coursemapping.feature b/mod/feedback/tests/behat/coursemapping.feature index a07988ecf7427..4e21411aeeb47 100644 --- a/mod/feedback/tests/behat/coursemapping.feature +++ b/mod/feedback/tests/behat/coursemapping.feature @@ -36,7 +36,7 @@ Feature: Mapping courses in a feedback | feedback | Another feedback | C1 | feedback1 | 1 | 1 | 0 | When I log in as "manager" And I am on site homepage - And I follow "Course feedback" + And I am on course page "Course feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: | Question | this is an information question | @@ -54,21 +54,21 @@ Feature: Mapping courses in a feedback | Multiple choice values | option d\noption e\noption f | And I log out And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add the "Feedback" block And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I add the "Feedback" block And I am on site homepage - And I follow "Course 3" + And I am on course page "Course 3" And I add the "Feedback" block And I log out Scenario: Course feedback can not be mapped And I log in as "manager" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Another feedback" And I should not see "Mapped courses" And I should not see "Map feedback to courses" @@ -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 am on course page "Course feedback" And I follow "Answer the questions..." And I should see "Acceptance test site" in the ".feedback_form" "css_element" And I set the following fields to these values: @@ -85,7 +85,7 @@ Feature: Mapping courses in a feedback | this is a simple multiple choice | option d | And I press "Submit your answers" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Course feedback" "link" in the "Feedback" "block" And I follow "Answer the questions..." And I should not see "Acceptance test site" in the ".feedback_form" "css_element" @@ -99,7 +99,7 @@ Feature: Mapping courses in a feedback And I should not see "Answer the questions..." And I log out And I log in as "user2" - And I follow "Course 1" + And I am on course page "Course 1" And I click on "Course feedback" "link" in the "Feedback" "block" And I follow "Answer the questions..." And I should not see "Acceptance test site" in the ".feedback_form" "css_element" @@ -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 am on course page "Course feedback" And I navigate to "Analysis" in current page administration And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" @@ -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 am on course page "Course feedback" And I follow "Map feedback to courses" And I set the field "Courses" to "Course 2" And I set the field "Courses" to "Course 3" @@ -147,17 +147,17 @@ 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 am on course page "Course feedback" And I should see "You can only access this feedback from a course" And I should not see "Answer the questions..." And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "Feedback" "block" should not exist And I should not see "Course feedback" And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I click on "Course feedback" "link" in the "Feedback" "block" And I follow "Answer the questions..." And I should not see "Acceptance test site" in the ".feedback_form" "css_element" @@ -171,7 +171,7 @@ Feature: Mapping courses in a feedback And I should not see "Answer the questions..." And I log out And I log in as "user2" - And I follow "Course 2" + And I am on course page "Course 2" And I click on "Course feedback" "link" in the "Feedback" "block" And I follow "Answer the questions..." And I should not see "Acceptance test site" in the ".feedback_form" "css_element" @@ -183,7 +183,7 @@ Feature: Mapping courses in a feedback And I press "Continue" And I log out And I log in as "user3" - And I follow "Course 3" + And I am on course page "Course 3" And I click on "Course feedback" "link" in the "Feedback" "block" And I follow "Answer the questions..." And I should not see "Acceptance test site" in the ".feedback_form" "css_element" @@ -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 am on course page "Course feedback" And I navigate to "Analysis" in current page administration And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" And I show chart data for the "multichoicerated" feedback @@ -242,6 +242,6 @@ Feature: Mapping courses in a feedback And I follow "Turn editing off" And I am on site homepage Then "Feedback" "block" should not exist - And I follow "Course 1" + And I am on course page "Course 1" And "Feedback" "block" should not exist And I log out diff --git a/mod/feedback/tests/behat/export_import.feature b/mod/feedback/tests/behat/export_import.feature index 9ad877a61294a..8682629b98003 100644 --- a/mod/feedback/tests/behat/export_import.feature +++ b/mod/feedback/tests/behat/export_import.feature @@ -22,7 +22,7 @@ Feature: Exporting and importing feedbacks Scenario: Export sample feedback and compare with the fixture When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: @@ -74,7 +74,7 @@ Feature: Exporting and importing feedbacks @javascript @_file_upload Scenario: Import feedback deleting old items When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Numeric answer" question to the feedback with: @@ -101,7 +101,7 @@ Feature: Exporting and importing feedbacks @javascript @_file_upload Scenario: Import feedback appending new items When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Numeric answer" question to the feedback with: diff --git a/mod/feedback/tests/behat/groups.feature b/mod/feedback/tests/behat/groups.feature index de3bd2f543157..9c84be0578c39 100644 --- a/mod/feedback/tests/behat/groups.feature +++ b/mod/feedback/tests/behat/groups.feature @@ -65,8 +65,8 @@ Feature: Feedbacks in courses with groups @javascript Scenario: Non anonymous feedback with groups in a course When I log in as "teacher" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | @@ -91,8 +91,8 @@ Feature: Feedbacks in courses with groups | I don't know | 1 | # View analysis, user1 should only see one group - group 1 And I log in as "user1" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Submitted answers" And I should see "Separate groups: Group 1" And I show chart data for the "multichoice1" feedback @@ -101,8 +101,8 @@ Feature: Feedbacks in courses with groups And I log out # View analysis, user3 should only see one group - group 2 And I log in as "user3" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Submitted answers" And I should see "Separate groups: Group 2" And I show chart data for the "multichoice1" feedback @@ -111,8 +111,8 @@ Feature: Feedbacks in courses with groups And I log out # View analysis, user2 should see a group selector and be able to change the group but not view all. And I log in as "user2" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Submitted answers" And the field "Separate groups" matches value "Group 1" And I show chart data for the "multichoice1" feedback @@ -126,8 +126,8 @@ Feature: Feedbacks in courses with groups And I log out # User without group can see all participants only And I log in as "user7" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I follow "Submitted answers" And I should see "Separate groups: All participants" And I show chart data for the "multichoice1" feedback @@ -137,8 +137,8 @@ Feature: Feedbacks in courses with groups And I log out # Teacher can browse everybody And I log in as "teacher" - And I follow "Course 1" - And I follow "Course feedback" + And I am on course page "Course 1" + And I am on course page "Course feedback" And I navigate to "Analysis" in current page administration And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback @@ -168,8 +168,8 @@ Feature: Feedbacks in courses with groups @javascript Scenario: Anonymous feedback with groups in a course When I log in as "teacher" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: | Question | Do you like this course? | @@ -181,8 +181,8 @@ Feature: Feedbacks in courses with groups And I log in as "user1" and complete feedback "Course anon feedback" in course "Course 1" with: | Not at all | 1 | And I log in as "user1" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I follow "Submitted answers" And I should see "There are insufficient responses for this group" And I should not see "Yes of course" @@ -201,8 +201,8 @@ Feature: Feedbacks in courses with groups | I don't know | 1 | # View analysis, user1 should only see one group - group 1 And I log in as "user1" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I follow "Submitted answers" And I should see "Separate groups: Group 1" And I show chart data for the "multichoice1" feedback @@ -211,8 +211,8 @@ Feature: Feedbacks in courses with groups And I log out # View analysis, user3 should only see one group - group 2 And I log in as "user3" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I follow "Submitted answers" And I should see "Separate groups: Group 2" And I show chart data for the "multichoice1" feedback @@ -221,8 +221,8 @@ Feature: Feedbacks in courses with groups And I log out # View analysis, user2 should see a group selector and be able to change the group but not view all. And I log in as "user2" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I follow "Submitted answers" And the field "Separate groups" matches value "Group 1" And I show chart data for the "multichoice1" feedback @@ -236,8 +236,8 @@ Feature: Feedbacks in courses with groups And I log out # User without group can see all participants only And I log in as "user7" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I follow "Submitted answers" And I should see "Separate groups: All participants" And I show chart data for the "multichoice1" feedback @@ -247,8 +247,8 @@ Feature: Feedbacks in courses with groups And I log out # Teacher can browse everybody And I log in as "teacher" - And I follow "Course 1" - And I follow "Course anon feedback" + And I am on course page "Course 1" + And I am on course page "Course anon feedback" And I navigate to "Analysis" in current page administration And the field "Separate groups" matches value "All participants" And I show chart data for the "multichoice1" feedback diff --git a/mod/feedback/tests/behat/multichoice.feature b/mod/feedback/tests/behat/multichoice.feature index 02fd332b58546..809664420f53e 100644 --- a/mod/feedback/tests/behat/multichoice.feature +++ b/mod/feedback/tests/behat/multichoice.feature @@ -22,7 +22,7 @@ Feature: Testing multichoice questions in feedback | activity | name | course | idnumber | | feedback | Learning experience | C1 | feedback0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" @@ -57,7 +57,7 @@ Feature: Testing multichoice questions in feedback | Contents | this is the third page of the feedback | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." # Examine the first page, select nothing, go to the next page @@ -124,7 +124,7 @@ Feature: Testing multichoice questions in feedback # Student 2 tries to trick - he answers the third question and then # goes back and changes dependency question. Analysis should not show this answer! And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the field "option a" to "1" @@ -139,7 +139,7 @@ Feature: Testing multichoice questions in feedback And I log out # Login as teacher and check analysis And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" @@ -201,7 +201,7 @@ Feature: Testing multichoice questions in feedback And I log out # Login as the first student. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." # Examine the first page, select nothing, go to the next page @@ -266,7 +266,7 @@ Feature: Testing multichoice questions in feedback # Student 2 tries to trick - he answers the third question and then # goes back and changes dependency question. Analysis should not show this answer! And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the field "option a" to "1" @@ -283,7 +283,7 @@ Feature: Testing multichoice questions in feedback And I log out # Login as teacher and check analysis And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" @@ -343,7 +343,7 @@ Feature: Testing multichoice questions in feedback | Contents | this is the third page of the feedback | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." # Examine the first page, select nothing, go to the next page @@ -391,7 +391,7 @@ Feature: Testing multichoice questions in feedback # Student 2 tries to trick - he answers the third question and then # goes back and changes dependency question. Analysis should not show this answer! And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the field "this is a multiple choice 1" to "option a" @@ -406,7 +406,7 @@ Feature: Testing multichoice questions in feedback And I log out # Login as teacher and check analysis And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" diff --git a/mod/feedback/tests/behat/non_anonymous.feature b/mod/feedback/tests/behat/non_anonymous.feature index 5d20e74e08645..47bdf44f22b61 100644 --- a/mod/feedback/tests/behat/non_anonymous.feature +++ b/mod/feedback/tests/behat/non_anonymous.feature @@ -109,7 +109,7 @@ Feature: Non anonymous feedback @javascript Scenario: Non anonymous feedback in a course When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course feedback" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: @@ -120,7 +120,7 @@ Feature: Non anonymous feedback | Multiple choice values | Yes of course\nNot at all\nI don't know | And I log out And I log in as "user1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course feedback" And I follow "Answer the questions..." And I should see "Do you like this course?" @@ -129,7 +129,7 @@ Feature: Non anonymous feedback And I press "Submit your answers" And I log out And I log in as "user2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course feedback" And I follow "Answer the questions..." And I should see "Do you like this course?" @@ -146,7 +146,7 @@ Feature: Non anonymous feedback And I should see "1 (50.00 %)" in the "Not at all" "table_row" And I log out And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course feedback" And I follow "Preview" And I should see "Do you like this course?" diff --git a/mod/feedback/tests/behat/question_types.feature b/mod/feedback/tests/behat/question_types.feature index 1ceb5ad04e3ae..34013441148f6 100644 --- a/mod/feedback/tests/behat/question_types.feature +++ b/mod/feedback/tests/behat/question_types.feature @@ -23,7 +23,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb | activity | name | course | idnumber | | feedback | Learning experience | C1 | feedback0 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: @@ -67,7 +67,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb | Maximum characters accepted | 200 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the following fields to these values: @@ -82,7 +82,7 @@ Feature: Test creating different types of feedback questions for anonymous feedb And I press "Submit your answers" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the following fields to these values: @@ -97,14 +97,14 @@ Feature: Test creating different types of feedback questions for anonymous feedb And I press "Submit your answers" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 8" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "C1" in the "(info)" "table" diff --git a/mod/feedback/tests/behat/question_types_non_anon.feature b/mod/feedback/tests/behat/question_types_non_anon.feature index 954f8007c541c..bfc3dd27a8b3a 100644 --- a/mod/feedback/tests/behat/question_types_non_anon.feature +++ b/mod/feedback/tests/behat/question_types_non_anon.feature @@ -23,7 +23,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f | activity | name | course | idnumber | anonymous | | feedback | Learning experience | C1 | feedback0 | 2 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Information" question to the feedback with: @@ -71,7 +71,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f | Maximum characters accepted | 200 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the following fields to these values: @@ -86,7 +86,7 @@ Feature: Test creating different types of feedback questions for non-anonymous f And I press "Submit your answers" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I follow "Answer the questions..." And I set the following fields to these values: @@ -101,14 +101,14 @@ Feature: Test creating different types of feedback questions for non-anonymous f And I press "Submit your answers" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "Submitted answers: 2" And I should see "Questions: 9" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience" And I navigate to "Analysis" in current page administration And I should see "C1" in the "(info)" "table" diff --git a/mod/feedback/tests/behat/show_nonrespondents.feature b/mod/feedback/tests/behat/show_nonrespondents.feature index 2a09884d83b16..65a8aa038f767 100644 --- a/mod/feedback/tests/behat/show_nonrespondents.feature +++ b/mod/feedback/tests/behat/show_nonrespondents.feature @@ -38,7 +38,7 @@ Feature: Show users who have not responded to the feedback survey Scenario: See users who have not responded # Set up a feedback. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Feedback" to section "1" and I fill the form with: | Name | Frogs | @@ -55,7 +55,7 @@ Feature: Show users who have not responded to the feedback survey # Go in as student 1 and do the feedback. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Frogs" And I follow "Answer the questions" And I set the field "Y/N?" to "Y" @@ -64,7 +64,7 @@ Feature: Show users who have not responded to the feedback survey # Go in as teacher and check the users who haven't completed it. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Frogs" And I navigate to "Show non-respondents" in current page administration diff --git a/mod/feedback/tests/behat/templates.feature b/mod/feedback/tests/behat/templates.feature index ae65cf5386895..b8563aa8557c8 100644 --- a/mod/feedback/tests/behat/templates.feature +++ b/mod/feedback/tests/behat/templates.feature @@ -26,7 +26,7 @@ Feature: Saving, using and deleting feedback templates | feedback | Another feedback in course 1 | C1 | feedback2 | | feedback | Learning experience course 2 | C2 | feedback3 | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: @@ -39,7 +39,7 @@ Feature: Saving, using and deleting feedback templates Scenario: Teacher can save template and re-use it in the same course only # Go to feedback templates and make sure none exist yet When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I follow "Templates" Then I should see "No templates available yet" @@ -55,7 +55,7 @@ Feature: Saving, using and deleting feedback templates And I should see "Template saved" And the "Use a template" select box should contain "My first template" # Create a feedback from this template in the same course - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Another feedback in course 1" And I follow "Templates" And I set the field "Use a template" to "My first template" @@ -66,7 +66,7 @@ Feature: Saving, using and deleting feedback templates And I should see "this is a multiple choice 1" # Make sure this template is not available in another course And I am on site homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Learning experience course 2" And I follow "Templates" And I should see "No templates available yet" @@ -76,13 +76,13 @@ Feature: Saving, using and deleting feedback templates Scenario: Teacher can append template to existing questions or remove them # Save feedback as a course template When I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I follow "Templates" And I set the field "Name" to "My first template" And I press "Save as new template" # Add questions to another feedback - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Another feedback in course 1" And I click on "Edit questions" "link" in the "[role=main]" "css_element" And I add a "Multiple choice" question to the feedback with: @@ -112,7 +112,7 @@ Feature: Saving, using and deleting feedback templates Scenario: Manager can save template as public and it will be available in any course When I log in as "manager" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I follow "Templates" And I set the field "Name" to "My first template" @@ -120,7 +120,7 @@ Feature: Saving, using and deleting feedback templates And I press "Save as new template" And I log out And I log in as "teacher" - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Learning experience course 2" And I follow "Templates" And I set the field "Use a template" to "My first template" @@ -135,7 +135,7 @@ Feature: Saving, using and deleting feedback templates # Save feedback as both public and course template When I log in as "manager" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I follow "Templates" And I set the field "Name" to "My public template" @@ -146,7 +146,7 @@ Feature: Saving, using and deleting feedback templates And I log out # Login as teacher and try to delete templates And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Another feedback in course 1" And I follow "Templates" And I follow "Delete template..." @@ -167,7 +167,7 @@ Feature: Saving, using and deleting feedback templates # Save feedback as both public and course template When I log in as "manager" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Learning experience course 1" And I click on "Templates" "link" in the "[role=main]" "css_element" And I set the field "Name" to "My public template" diff --git a/mod/forum/tests/behat/add_forum.feature b/mod/forum/tests/behat/add_forum.feature index bcd4a6bb56ae6..5094605dd7ced 100644 --- a/mod/forum/tests/behat/add_forum.feature +++ b/mod/forum/tests/behat/add_forum.feature @@ -18,7 +18,7 @@ Feature: Add forum activities and discussions | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -29,7 +29,7 @@ Feature: Add forum activities and discussions | Message | This is the body | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I add a new discussion to "Test forum name" forum with: | Subject | Post with attachment | | Message | This is the body | diff --git a/mod/forum/tests/behat/advanced_search.feature b/mod/forum/tests/behat/advanced_search.feature index 03c5e10fd8561..5ab4ab19780d8 100644 --- a/mod/forum/tests/behat/advanced_search.feature +++ b/mod/forum/tests/behat/advanced_search.feature @@ -19,7 +19,7 @@ Feature: The forum search allows users to perform advanced searches for forum po | teacher2 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "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" @@ -28,7 +28,7 @@ Feature: The forum search allows users to perform advanced searches for forum po And I add a new topic to "Announcements" forum with: | Subject | My subject | | Message | My message | - And I follow "Course 1" + And I am on course page "Course 1" And I add a new topic to "Announcements" forum with: | Subject | My subjective| | Message | My long message | @@ -36,7 +36,7 @@ Feature: The forum search allows users to perform advanced searches for forum po Scenario: Perform an advanced search using any term Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -47,7 +47,7 @@ Feature: The forum search allows users to perform advanced searches for forum po Scenario: Perform an advanced search avoiding words Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -62,7 +62,7 @@ Feature: The forum search allows users to perform advanced searches for forum po | mysql | | postgres | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -73,7 +73,7 @@ Feature: The forum search allows users to perform advanced searches for forum po Scenario: Perform an advanced search matching the subject Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -84,13 +84,13 @@ Feature: The forum search allows users to perform advanced searches for forum po Scenario: Perform an advanced search matching the author Given I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new topic to "Announcements" forum with: | Subject | My Subjects | | Message | My message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -101,7 +101,7 @@ Feature: The forum search allows users to perform advanced searches for forum po Scenario: Perform an advanced search with multiple words Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" diff --git a/mod/forum/tests/behat/completion_condition_number_discussions.feature b/mod/forum/tests/behat/completion_condition_number_discussions.feature index 7182bb251a82b..6d439a0638ae4 100644 --- a/mod/forum/tests/behat/completion_condition_number_discussions.feature +++ b/mod/forum/tests/behat/completion_condition_number_discussions.feature @@ -17,7 +17,7 @@ Feature: Set a certain number of discussions as a completion condition for a for | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -31,7 +31,7 @@ Feature: Set a certain number of discussions as a completion condition for a for | completiondiscussions | 2 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test forum name" "forum" activity with "auto" completion should be marked as not complete And I add a new discussion to "Test forum name" forum with: | Subject | Post 1 subject | @@ -39,9 +39,9 @@ Feature: Set a certain number of discussions as a completion condition for a for And I add a new discussion to "Test forum name" forum with: | Subject | Post 2 subject | | Message | Body 2 content | - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test forum name" "forum" activity with "auto" completion should be marked as complete And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And "Student 1" user has completed "Test forum name" activity diff --git a/mod/forum/tests/behat/discussion_display.feature b/mod/forum/tests/behat/discussion_display.feature index b12f8c60f904b..b574bff2d88b5 100644 --- a/mod/forum/tests/behat/discussion_display.feature +++ b/mod/forum/tests/behat/discussion_display.feature @@ -16,7 +16,7 @@ Feature: Students can choose from 4 discussion display options and their choice | student1 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -35,7 +35,7 @@ Feature: Students can choose from 4 discussion display options and their choice | Message | Discussion contents 2, second message | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Display replies flat, with oldest first Given I reply "Discussion 1" post from "Test forum name" forum with: diff --git a/mod/forum/tests/behat/discussion_navigation.feature b/mod/forum/tests/behat/discussion_navigation.feature index c7a79954ea7d8..d0937513dfd3b 100644 --- a/mod/forum/tests/behat/discussion_navigation.feature +++ b/mod/forum/tests/behat/discussion_navigation.feature @@ -34,7 +34,7 @@ Feature: A user can navigate to previous and next discussions | activity | name | intro | course | idnumber | groupmode | | forum | Test forum name | Test forum name | C1 | forum | 0 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I add a new discussion to "Test forum name" forum with: | Subject | Discussion 1 | @@ -75,7 +75,7 @@ Feature: A user can navigate to previous and next discussions | activity | name | intro | course | idnumber | groupmode | | forum | Test forum name | Test forum name | C1 | forum | 2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I add a new discussion to "Test forum name" forum with: | Subject | Discussion 1 Group 0 | @@ -101,7 +101,7 @@ Feature: A user can navigate to previous and next discussions | Group | Group 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I select "All participants" from the "Visible groups" singleselect And I follow "Discussion 1 Group 0" @@ -132,7 +132,7 @@ Feature: A user can navigate to previous and next discussions | activity | name | intro | course | idnumber | groupmode | | forum | Test forum name | Test forum name | C1 | forum | 1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I add a new discussion to "Test forum name" forum with: | Subject | Discussion 1 Group 0 | @@ -158,7 +158,7 @@ Feature: A user can navigate to previous and next discussions | Group | Group 2 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Discussion 1 Group 1" Then I should see "Discussion 2 Group 0" diff --git a/mod/forum/tests/behat/discussion_subscriptions.feature b/mod/forum/tests/behat/discussion_subscriptions.feature index 540d3b9c0b415..3870828a5866c 100644 --- a/mod/forum/tests/behat/discussion_subscriptions.feature +++ b/mod/forum/tests/behat/discussion_subscriptions.feature @@ -16,7 +16,7 @@ Feature: A user can control their own subscription preferences for a discussion | student1 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: An optional forum can have discussions subscribed to @@ -33,7 +33,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should see "Subscribe to this forum" And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" @@ -78,7 +78,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should see "Unsubscribe from this forum" And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" @@ -123,7 +123,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Subscribe to this forum" And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" @@ -136,7 +136,7 @@ Feature: A user can control their own subscription preferences for a discussion And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -144,7 +144,7 @@ Feature: A user can control their own subscription preferences for a discussion And I press "Save and return to course" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Unsubscribe from this forum" And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" @@ -169,7 +169,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Subscribe to this forum" And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" @@ -182,7 +182,7 @@ Feature: A user can control their own subscription preferences for a discussion And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -190,7 +190,7 @@ Feature: A user can control their own subscription preferences for a discussion And I press "Save and return to course" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Unsubscribe from this forum" And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" @@ -215,7 +215,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Subscribe to this forum" And I reply "Test post subject one" post from "Test forum name" forum with: @@ -251,7 +251,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message two | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Unsubscribe from this forum" And I reply "Test post subject one" post from "Test forum name" forum with: @@ -319,7 +319,7 @@ Feature: A user can control their own subscription preferences for a discussion | Message | Test post message one | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test forum name" Then "Subscribe to this forum" "link" should exist in current page administration And I follow "Test post subject one" diff --git a/mod/forum/tests/behat/edit_post_student.feature b/mod/forum/tests/behat/edit_post_student.feature index 4b7bbbcce6a36..2a6a8604e19b7 100644 --- a/mod/forum/tests/behat/edit_post_student.feature +++ b/mod/forum/tests/behat/edit_post_student.feature @@ -18,7 +18,7 @@ Feature: Students can edit or delete their forum posts within a set time limit | activity | name | intro | course | idnumber | | forum | Test forum name | Test forum description | C1 | forum | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new discussion to "Test forum name" forum with: | Subject | Forum post subject | | Message | This is the body | @@ -48,7 +48,7 @@ Feature: Students can edit or delete their forum posts within a set time limit And I set the field "Maximum time to edit posts" to "1 minutes" And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "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: @@ -57,7 +57,7 @@ Feature: Students can edit or delete their forum posts within a set time limit | Description | Test forum description | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I wait "61" seconds And I follow "Forum post subject" Then I should not see "Edit" in the "region-main" "region" diff --git a/mod/forum/tests/behat/edit_post_teacher.feature b/mod/forum/tests/behat/edit_post_teacher.feature index 42db613082623..f63f4ba7737c2 100644 --- a/mod/forum/tests/behat/edit_post_teacher.feature +++ b/mod/forum/tests/behat/edit_post_teacher.feature @@ -17,7 +17,7 @@ Feature: Teachers can edit or delete any forum post | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -27,7 +27,7 @@ Feature: Teachers can edit or delete any forum post | Message | Teacher post message | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I reply "Teacher post subject" post from "Test forum name" forum with: | Subject | Student post subject | | Message | Student post message | @@ -35,7 +35,7 @@ Feature: Teachers can edit or delete any forum post Scenario: A teacher can delete another user's posts Given I log out And I log in as "teacher1" - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Test forum name" And I follow "Teacher post subject" And I click on "Delete" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" @@ -46,7 +46,7 @@ Feature: Teachers can edit or delete any forum post Scenario: A teacher can edit another user's posts Given I log out And I log in as "teacher1" - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Test forum name" And I follow "Teacher post subject" And I click on "Edit" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" diff --git a/mod/forum/tests/behat/forum_subscriptions.feature b/mod/forum/tests/behat/forum_subscriptions.feature index f1551183905db..8907b192cf5cf 100644 --- a/mod/forum/tests/behat/forum_subscriptions.feature +++ b/mod/forum/tests/behat/forum_subscriptions.feature @@ -16,7 +16,7 @@ Feature: A user can control their own subscription preferences for a forum | student1 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: A disallowed subscription forum cannot be subscribed to @@ -30,7 +30,7 @@ Feature: A user can control their own subscription preferences for a forum | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should not see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -48,7 +48,7 @@ Feature: A user can control their own subscription preferences for a forum | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should not see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -66,7 +66,7 @@ Feature: A user can control their own subscription preferences for a forum | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -86,7 +86,7 @@ Feature: A user can control their own subscription preferences for a forum | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" Then I should see "Unsubscribe from this forum" And I should not see "Subscribe to this forum" diff --git a/mod/forum/tests/behat/forum_subscriptions_availability.feature b/mod/forum/tests/behat/forum_subscriptions_availability.feature index 06c8292368ce9..fc60b606e037b 100644 --- a/mod/forum/tests/behat/forum_subscriptions_availability.feature +++ b/mod/forum/tests/behat/forum_subscriptions_availability.feature @@ -35,7 +35,7 @@ Feature: As a teacher I need to see an accurate list of subscribed users | grouping | group | | GG1 | G1 | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript diff --git a/mod/forum/tests/behat/forum_subscriptions_default.feature b/mod/forum/tests/behat/forum_subscriptions_default.feature index e40e7b2d683cb..3416059931992 100644 --- a/mod/forum/tests/behat/forum_subscriptions_default.feature +++ b/mod/forum/tests/behat/forum_subscriptions_default.feature @@ -18,7 +18,7 @@ Feature: A user can control their default discussion subscription settings | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Creating a new discussion in an optional forum follows user preferences @@ -29,13 +29,13 @@ Feature: A user can control their default discussion subscription settings | Subscription mode | Optional subscription | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" When I press "Add a new discussion topic" Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I press "Add a new discussion topic" And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist @@ -51,14 +51,14 @@ Feature: A user can control their default discussion subscription settings | Message | Test post message | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Test post subject" When I follow "Reply" Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Test post subject" And I follow "Reply" @@ -72,13 +72,13 @@ Feature: A user can control their default discussion subscription settings | Subscription mode | Auto subscription | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" When I press "Add a new discussion topic" Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I press "Add a new discussion topic" And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist @@ -94,14 +94,14 @@ Feature: A user can control their default discussion subscription settings | Message | Test post message | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Test post subject" When I follow "Reply" Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I follow "Test post subject" And I follow "Reply" @@ -118,7 +118,7 @@ Feature: A user can control their default discussion subscription settings | Message | Test post message | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject" "table_row" And I should see "Student One will NOT be notified of new posts in 'Test post subject' of 'Test forum name'" @@ -127,7 +127,7 @@ Feature: A user can control their default discussion subscription settings And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject" "table_row" And I should see "Student Two will NOT be notified of new posts in 'Test post subject' of 'Test forum name'" diff --git a/mod/forum/tests/behat/forum_subscriptions_management.feature b/mod/forum/tests/behat/forum_subscriptions_management.feature index af651ca6a8ed5..f98808105936c 100644 --- a/mod/forum/tests/behat/forum_subscriptions_management.feature +++ b/mod/forum/tests/behat/forum_subscriptions_management.feature @@ -19,7 +19,7 @@ Feature: A teacher can control the subscription to a forum | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | diff --git a/mod/forum/tests/behat/groups_in_course_no_groups_in_forum.feature b/mod/forum/tests/behat/groups_in_course_no_groups_in_forum.feature index ff4e5e3714b22..21ac1cf1e6298 100644 --- a/mod/forum/tests/behat/groups_in_course_no_groups_in_forum.feature +++ b/mod/forum/tests/behat/groups_in_course_no_groups_in_forum.feature @@ -31,7 +31,7 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us Scenario: Teacher can post Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I should not see "Group A" And I should not see "Group B" @@ -47,7 +47,7 @@ Feature: Forums in 'No groups' mode allow posting to All participants for all us Scenario: Student can post Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I should not see "Group A" And I should not see "Group B" diff --git a/mod/forum/tests/behat/move_discussion.feature b/mod/forum/tests/behat/move_discussion.feature index 3bd4fbc1a2272..489c4963a0540 100644 --- a/mod/forum/tests/behat/move_discussion.feature +++ b/mod/forum/tests/behat/move_discussion.feature @@ -23,14 +23,14 @@ Feature: A teacher can move discussions between forums | forum | Test forum 1 | Test forum 2 | C1 | forum | 0 | | forum | Test forum 2 | Test forum 1 | C1 | forum | 0 | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum 1" And I add a new discussion to "Test forum 1" forum with: | Subject | Discussion 1 | | Message | Test post message | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum 1" And I follow "Discussion 1" When I set the field "jump" to "Test forum 2" diff --git a/mod/forum/tests/behat/my_forum_posts.feature b/mod/forum/tests/behat/my_forum_posts.feature index c5fd76d30fb33..11d92e986807f 100644 --- a/mod/forum/tests/behat/my_forum_posts.feature +++ b/mod/forum/tests/behat/my_forum_posts.feature @@ -18,7 +18,7 @@ Feature: A user can view their posts and discussions | activity | name | intro | course | idnumber | groupmode | | forum | Test forum name | Test forum | C1 | forum | 0 | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new discussion to "Test forum name" forum with: | Subject | Forum discussion 1 | | Message | How awesome is this forum discussion? | diff --git a/mod/forum/tests/behat/no_groups_in_course.feature b/mod/forum/tests/behat/no_groups_in_course.feature index 96b672f5c3099..03a871b688dff 100644 --- a/mod/forum/tests/behat/no_groups_in_course.feature +++ b/mod/forum/tests/behat/no_groups_in_course.feature @@ -21,7 +21,7 @@ Feature: Posting to forums in a course with no groups behaves correctly Scenario: Teachers can post in standard forum Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum" When I click on "Add a new discussion topic" "button" Then I should not see "Post a copy to all groups" @@ -34,7 +34,7 @@ Feature: Posting to forums in a course with no groups behaves correctly Scenario: Teachers can post in forum with separate groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Separate forum" When I click on "Add a new discussion topic" "button" Then I should not see "Post a copy to all groups" @@ -47,7 +47,7 @@ Feature: Posting to forums in a course with no groups behaves correctly Scenario: Teachers can post in forum with visible groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Visible forum" When I click on "Add a new discussion topic" "button" Then I should not see "Post a copy to all groups" @@ -60,7 +60,7 @@ Feature: Posting to forums in a course with no groups behaves correctly Scenario: Students can post in standard forum Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum" When I click on "Add a new discussion topic" "button" Then I should not see "Post a copy to all groups" @@ -73,14 +73,14 @@ Feature: Posting to forums in a course with no groups behaves correctly Scenario: Students cannot post in forum with separate groups Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Separate forum" Then I should see "You do not have permission to add a new discussion topic for all participants." And I should not see "Add a new discussion topic" Scenario: Teachers can post in forum with visible groups Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Visible forum" Then I should see "You do not have permission to add a new discussion topic for all participants." And I should not see "Add a new discussion topic" diff --git a/mod/forum/tests/behat/post_to_multiple_groups.feature b/mod/forum/tests/behat/post_to_multiple_groups.feature index 5e3a95840c577..2ec3c2c53bd2e 100644 --- a/mod/forum/tests/behat/post_to_multiple_groups.feature +++ b/mod/forum/tests/behat/post_to_multiple_groups.feature @@ -64,71 +64,71 @@ Feature: A user with access to multiple groups should be able to post a copy of Scenario: Teacher is able to post a copy of a message to all groups in a separate group forum Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new discussion to "Separate group forum" forum with: | Subject | Discussion 1 | | Message | test | | Post a copy to all groups | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Separate group forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Separate group forum" And I should see "Discussion 1" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Separate group forum" And I should see "Discussion 1" Scenario: Teacher is able to post a copy of a message to all groups in a visible group forum Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a new discussion to "Visible group forum" forum with: | Subject | Discussion 1 | | Message | test | | Post a copy to all groups | 1 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Visible group forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Visible group forum" And I should see "Discussion 1" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Visible group forum" And I should see "Discussion 1" Scenario: Teacher is unable to post a copy of a message to all groups in a no group forum Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "No group forum" And I press "Add a new discussion topic" Then I should not see "Post a copy to all groups" Scenario: Posts to all groups that have groupings should only display within the grouping and not to other groups Given I log in as "teacher1" - And I follow "Course 2" + And I am on course page "Course 2" And I add a new discussion to "Groupings forum" forum with: | Subject | Discussion 1 | | Message | test | | Post a copy to all groups | 1 | And I log out And I log in as "student1" - And I follow "Course 2" + And I am on course page "Course 2" When I follow "Groupings forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Groupings forum" And I should not see "Discussion 1" diff --git a/mod/forum/tests/behat/posts_ordering_blog.feature b/mod/forum/tests/behat/posts_ordering_blog.feature index 01bf3159e10a6..606563243d22c 100644 --- a/mod/forum/tests/behat/posts_ordering_blog.feature +++ b/mod/forum/tests/behat/posts_ordering_blog.feature @@ -17,7 +17,7 @@ Feature: Blog posts are always displayed in reverse chronological order | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Course blog forum | @@ -33,7 +33,7 @@ Feature: Blog posts are always displayed in reverse chronological order @javascript Scenario: Replying to a blog post or editing it does not affect its display order Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course blog forum" # # Add three posts into the blog. @@ -60,7 +60,7 @@ Feature: Blog posts are always displayed in reverse chronological order # Reply to another blog post. # And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course blog forum" And I click on "Discuss this topic" "link" in the "//div[@aria-label='Blog post 1 by Student 1']" "xpath_element" And I click on "Reply" "link" in the "//div[@aria-label='Blog post 1 by Student 1']" "xpath_element" @@ -69,7 +69,7 @@ Feature: Blog posts are always displayed in reverse chronological order And I press "Post to forum" And I wait to be redirected And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course blog forum" # # Make sure the order of the blog posts is still reverse chronological. diff --git a/mod/forum/tests/behat/posts_ordering_general.feature b/mod/forum/tests/behat/posts_ordering_general.feature index 01ff39983a50e..3f9664211d4d9 100644 --- a/mod/forum/tests/behat/posts_ordering_general.feature +++ b/mod/forum/tests/behat/posts_ordering_general.feature @@ -17,7 +17,7 @@ Feature: New discussions and discussions with recently added replies are display | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Course general forum | @@ -33,7 +33,7 @@ Feature: New discussions and discussions with recently added replies are display @javascript Scenario: Replying to a forum post or editing it puts the discussion to the front Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course general forum" # # Add three posts into the forum. @@ -61,7 +61,7 @@ Feature: New discussions and discussions with recently added replies are display # Reply to another forum post. # And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Course general forum" And I follow "Forum post 1" And I click on "Reply" "link" in the "//div[@aria-label='Forum post 1 by Student 1']" "xpath_element" @@ -70,8 +70,8 @@ Feature: New discussions and discussions with recently added replies are display And I press "Post to forum" And I wait to be redirected And I am on site homepage - And I follow "Course 1" - And I follow "Course general forum" + And I am on course page "Course 1" + And I am on course page "Course general forum" # # Make sure the order of the forum posts is as expected (most recently participated first). # diff --git a/mod/forum/tests/behat/separate_group_discussions.feature b/mod/forum/tests/behat/separate_group_discussions.feature index 30e5b506924fd..e508dd2b12a51 100644 --- a/mod/forum/tests/behat/separate_group_discussions.feature +++ b/mod/forum/tests/behat/separate_group_discussions.feature @@ -45,7 +45,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Teacher with accessallgroups can view all groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" Then the "Separate groups" select box should contain "All participants" Then the "Separate groups" select box should contain "Group A" @@ -54,7 +54,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Teacher with accessallgroups can select any group when posting Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" Then the "Group" select box should contain "All participants" @@ -65,7 +65,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Teacher with accessallgroups can post in groups they are a member of Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I select "Group A" from the "Separate groups" singleselect When I click on "Add a new discussion topic" "button" @@ -95,7 +95,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Teacher with accessallgroups can post in groups they are not a member of Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I select "Group A" from the "Separate groups" singleselect When I click on "Add a new discussion topic" "button" @@ -125,7 +125,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Teacher with accessallgroups can post to all groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" And I set the following fields to these values: @@ -152,7 +152,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Students in one group can only post in their group Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" Then I should see "Group A" And I click on "Add a new discussion topic" "button" @@ -170,7 +170,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Students in multiple group can post in all of their group individually Given I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" And I select "Group A" from the "Separate groups" singleselect And I click on "Add a new discussion topic" "button" @@ -218,7 +218,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u | moodle/site:accessallgroups | Prohibit | And I log out Given I log in as "noneditor1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" Then the "Group" select box should not contain "All participants" @@ -232,7 +232,7 @@ Feature: Posting to all groups in a separate group discussion is restricted to u | moodle/site:accessallgroups | Prohibit | And I log out Given I log in as "noneditor1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" Then the "Group" select box should not contain "All participants" @@ -242,13 +242,13 @@ Feature: Posting to all groups in a separate group discussion is restricted to u Scenario: Students can view all participants discussions in separate groups mode Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I add a new discussion to "Standard forum name" forum with: | Subject | Forum post to all participants | | Message | This is the body | | Group | All participants | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" Then I should see "Forum post to all participants" diff --git a/mod/forum/tests/behat/separate_group_single_group_discussions.feature b/mod/forum/tests/behat/separate_group_single_group_discussions.feature index f8e2046c8a632..9ce83e77667c7 100644 --- a/mod/forum/tests/behat/separate_group_single_group_discussions.feature +++ b/mod/forum/tests/behat/separate_group_single_group_discussions.feature @@ -40,7 +40,7 @@ Feature: Posting to groups in a separate group discussion when restricted to gro | G2 | G2G1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Multiple groups forum | @@ -58,13 +58,13 @@ Feature: Posting to groups in a separate group discussion when restricted to gro Scenario: Teacher with accessallgroups can post in all groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Multiple groups forum" When I click on "Add a new discussion topic" "button" Then the "Group" select box should contain "All participants" And the "Group" select box should contain "G1G1" And the "Group" select box should contain "G1G2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Single groups forum" And I click on "Add a new discussion topic" "button" And the "Group" select box should contain "All participants" @@ -73,13 +73,13 @@ Feature: Posting to groups in a separate group discussion when restricted to gro Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants Given I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Multiple groups forum" When I click on "Add a new discussion topic" "button" Then the "Group" select box should not contain "All participants" And the "Group" select box should contain "G1G1" And the "Group" select box should contain "G1G2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Single groups forum" And I click on "Add a new discussion topic" "button" And I should see "G2G1" diff --git a/mod/forum/tests/behat/single_forum_discussion.feature b/mod/forum/tests/behat/single_forum_discussion.feature index ca4f90676d0d0..d540b64e6743c 100644 --- a/mod/forum/tests/behat/single_forum_discussion.feature +++ b/mod/forum/tests/behat/single_forum_discussion.feature @@ -22,14 +22,14 @@ Feature: Single simple forum discussion type Scenario: Teacher can start the single simple discussion Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Single discussion forum name" Then I should see "Single discussion forum description" in the "div.firstpost.starter" "css_element" And I should not see "Add a new discussion topic" Scenario: Student can not add more discussions And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I reply "Single discussion forum name" post from "Single discussion forum name" forum with: | Subject | Reply to single discussion subject | | Message | Reply to single discussion message | diff --git a/mod/forum/tests/behat/timed_discussions.feature b/mod/forum/tests/behat/timed_discussions.feature index c486c52621764..3c5b3dbac938c 100644 --- a/mod/forum/tests/behat/timed_discussions.feature +++ b/mod/forum/tests/behat/timed_discussions.feature @@ -18,7 +18,7 @@ Feature: Users can choose to set start and end time for display of their discuss And the following config values are set as admin: | forum_enabletimedposts | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -36,14 +36,14 @@ Feature: Users can choose to set start and end time for display of their discuss | Message | Discussion contents 3, first message | | timestart[enabled] | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test forum name" And I should see "Discussion 2 timed" And I should see "Discussion 3 timed" And ".timedpost" "css_element" should exist And I log out And I log in as "student1" - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Test forum name" Then I should see "Discussion 1" And I should not see "Discussion 2 timed" diff --git a/mod/forum/tests/behat/track_read_posts.feature b/mod/forum/tests/behat/track_read_posts.feature index 422e4b84a49ab..873cce546b4b9 100644 --- a/mod/forum/tests/behat/track_read_posts.feature +++ b/mod/forum/tests/behat/track_read_posts.feature @@ -18,7 +18,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | student2 | C1 | student | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Tracking forum posts off @@ -32,7 +32,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should not see "1 unread post" And I follow "Test forum name" And I should not see "Track unread posts" @@ -48,18 +48,18 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "1 unread post" And I follow "Test forum name" And I follow "Don't track unread posts" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" And I follow "Test forum name" And I follow "Track unread posts" And I wait to be redirected And I click on "1" "link" in the "Admin User" "table_row" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" Scenario: Tracking forum posts optional with user tracking off @@ -73,7 +73,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | Message | Test post message | And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" Then I should not see "1 unread post" And I follow "Test forum name" And I should not see "Track unread posts" @@ -82,7 +82,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos Given the following config values are set as admin: | forum_allowforcedreadtracking | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Given 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 | @@ -93,19 +93,19 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | Message | Test post message | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "1 unread post" And I follow "1 unread post" And I should not see "Don't track unread posts" And I follow "Test post subject" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" Scenario: Tracking forum posts forced with user tracking off Given the following config values are set as admin: | forum_allowforcedreadtracking | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Given 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 | @@ -116,19 +116,19 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | Message | Test post message | And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "1 unread post" And I follow "1 unread post" And I should not see "Don't track unread posts" And I follow "Test post subject" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" Scenario: Tracking forum posts forced (with force disabled) with user tracking on Given the following config values are set as admin: | forum_allowforcedreadtracking | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Given 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 | @@ -141,25 +141,25 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | forum_allowforcedreadtracking | 0 | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then I should see "1 unread post" And I follow "Test forum name" And I follow "Don't track unread posts" And I wait to be redirected - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" And I follow "Test forum name" And I follow "Track unread posts" And I wait to be redirected And I click on "1" "link" in the "Admin User" "table_row" - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "1 unread post" Scenario: Tracking forum posts forced (with force disabled) with user tracking off Given the following config values are set as admin: | forum_allowforcedreadtracking | 1 | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" Given 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 | @@ -172,7 +172,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | forum_allowforcedreadtracking | 0 | And I log out When I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" Then I should not see "1 unread post" And I follow "Test forum name" And I should not see "Track unread posts" diff --git a/mod/forum/tests/behat/visible_group_discussions.feature b/mod/forum/tests/behat/visible_group_discussions.feature index 45cb568c47569..e9722e7f1a549 100644 --- a/mod/forum/tests/behat/visible_group_discussions.feature +++ b/mod/forum/tests/behat/visible_group_discussions.feature @@ -36,7 +36,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Teacher with accessallgroups can view all groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" Then the "Visible groups" select box should contain "All participants" Then the "Visible groups" select box should contain "Group A" @@ -45,7 +45,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Teacher with accessallgroups can select any group when posting Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" Then the "Group" select box should contain "All participants" @@ -56,7 +56,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Teacher with accessallgroups can post in groups they are a member of Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I select "Group A" from the "Visible groups" singleselect When I click on "Add a new discussion topic" "button" @@ -86,7 +86,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Teacher with accessallgroups can post in groups they are not a member of Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" And I select "Group A" from the "Visible groups" singleselect When I click on "Add a new discussion topic" "button" @@ -116,7 +116,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Teacher with accessallgroups can post to all groups Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Standard forum name" When I click on "Add a new discussion topic" "button" And I set the following fields to these values: @@ -143,7 +143,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Students can view all groups Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" Then the "Visible groups" select box should contain "All participants" Then the "Visible groups" select box should contain "Group A" @@ -152,7 +152,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Students in one group can only post in their group Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" Then I should see "Group A" And I click on "Add a new discussion topic" "button" @@ -170,7 +170,7 @@ Feature: Posting to all groups in a visible group discussion is restricted to us Scenario: Students in multiple group can post in all of their group individually Given I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Standard forum name" And I select "Group A" from the "Visible groups" singleselect And I click on "Add a new discussion topic" "button" diff --git a/mod/glossary/tests/behat/categories.feature b/mod/glossary/tests/behat/categories.feature index 80fb0349214df..49227c6421c66 100644 --- a/mod/glossary/tests/behat/categories.feature +++ b/mod/glossary/tests/behat/categories.feature @@ -30,7 +30,7 @@ Feature: Glossary entries can be organised in categories And I log out # Log in as a teacher and make sure nothing is yet autolinked And I log in as "teacher1" - When I follow "Course 1" + When I am on course page "Course 1" Then I should see "CategoryAutoLinks" And I should see "CategoryNoLinks" And "a.glossary.autolink" "css_element" should not exist @@ -95,13 +95,13 @@ Feature: Glossary entries can be organised in categories And I should not see "EntryCategoryAL" And I should not see "EntryCategoryBoth" # Check that category is autolinked from the text in the course - And I follow "Course 1" + And I am on course page "Course 1" And I should see "CategoryAutoLinks" And I should see "CategoryAutoLinks" in the "a.glossary.autolink" "css_element" And I should see "CategoryNoLinks" And "//a[contains(.,'CategoryNoLinks')]" "xpath_element" should not exist # Delete a category with entries - And I follow "Course 1" + And I am on course page "Course 1" And I follow "MyGlossary" And I follow "Browse by category" And I press "Edit categories" diff --git a/mod/glossary/tests/behat/entries_always_editable.feature b/mod/glossary/tests/behat/entries_always_editable.feature index 6568164ce28b4..8f66c7742806b 100644 --- a/mod/glossary/tests/behat/entries_always_editable.feature +++ b/mod/glossary/tests/behat/entries_always_editable.feature @@ -20,7 +20,7 @@ Feature: A teacher can set whether glossary entries are always editable or not And the following config values are set as admin: | maxeditingtime | 60 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | @@ -28,7 +28,7 @@ Feature: A teacher can set whether glossary entries are always editable or not | Always allow editing | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Test concept name | diff --git a/mod/glossary/tests/behat/entries_require_approval.feature b/mod/glossary/tests/behat/entries_require_approval.feature index 2d615be2620d6..7bcd0eefb5bdf 100644 --- a/mod/glossary/tests/behat/entries_require_approval.feature +++ b/mod/glossary/tests/behat/entries_require_approval.feature @@ -19,7 +19,7 @@ Feature: A teacher can choose whether glossary entries require approval | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Given I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | @@ -27,7 +27,7 @@ Feature: A teacher can choose whether glossary entries require approval | Approved by default | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Just a test concept | @@ -36,13 +36,13 @@ Feature: A teacher can choose whether glossary entries require approval And I log out # Test that students can not see the unapproved entry. And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" Then I should see "No entries found in this section" And I log out # Approve the entry. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" And I follow "Waiting approval" Then I should see "(this entry is currently hidden)" @@ -52,18 +52,18 @@ Feature: A teacher can choose whether glossary entries require approval And I log out # Check that the entry can now be viewed by students. And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" Then I should see "Concept definition" And I log out # Undo the approval of the previous entry. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" And I follow "Undo approval" And I log out # Check that the entry is no longer visible by students. And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" Then I should see "No entries found in this section" diff --git a/mod/glossary/tests/behat/prevent_duplicate_entries.feature b/mod/glossary/tests/behat/prevent_duplicate_entries.feature index ade10bfdb8b9b..29fe8dcf02426 100644 --- a/mod/glossary/tests/behat/prevent_duplicate_entries.feature +++ b/mod/glossary/tests/behat/prevent_duplicate_entries.feature @@ -16,7 +16,7 @@ Feature: A teacher can choose whether to allow duplicate entries in a glossary | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | diff --git a/mod/glossary/tests/behat/print_friendly_version.feature b/mod/glossary/tests/behat/print_friendly_version.feature index 0c48de5327589..e785fa8731acf 100644 --- a/mod/glossary/tests/behat/print_friendly_version.feature +++ b/mod/glossary/tests/behat/print_friendly_version.feature @@ -17,7 +17,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript @@ -28,7 +28,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent | Allow print view | Yes | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Just a test concept | @@ -46,7 +46,7 @@ Feature: A teacher can choose whether to provide a printer-friendly glossary ent | Allow print view | No | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Just a test concept | diff --git a/mod/glossary/tests/behat/search_entries.feature b/mod/glossary/tests/behat/search_entries.feature index b23bce4ce135e..c494651600bf3 100644 --- a/mod/glossary/tests/behat/search_entries.feature +++ b/mod/glossary/tests/behat/search_entries.feature @@ -20,7 +20,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date | activity | name | intro | displayformat | course | idnumber | | glossary | Test glossary name | Test glossary description | fullwithauthor | C1 | g1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" And I add a glossary entries category named "The ones I like" And I add a glossary entries category named "All for you" @@ -30,7 +30,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date | Categories | All for you | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" And I add a glossary entry with the following data: | Concept | Cucumber | @@ -38,7 +38,7 @@ Feature: Glossary entries can be searched or browsed by alphabet, category, date | Categories | The ones I like | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test glossary name" @javascript diff --git a/mod/lesson/tests/behat/completion_condition_end_reached.feature b/mod/lesson/tests/behat/completion_condition_end_reached.feature index adc657b4d5cef..3105c1c96bd27 100644 --- a/mod/lesson/tests/behat/completion_condition_end_reached.feature +++ b/mod/lesson/tests/behat/completion_condition_end_reached.feature @@ -17,7 +17,7 @@ Feature: Set end of lesson reached as a completion condition for a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -47,22 +47,22 @@ Feature: Set end of lesson reached as a completion condition for a lesson And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete And I follow "Test lesson" And I press "Next page" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "You have seen more than one page of this lesson already." And I should see "Do you want to start at the last page you saw?" And I click on "No" "link" in the "#page-content" "css_element" And I press "Next page" And I press "Next page" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test lesson" "lesson" activity with "auto" completion should be marked as complete And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And "Student 1" user has completed "Test lesson" activity diff --git a/mod/lesson/tests/behat/completion_condition_time_spent.feature b/mod/lesson/tests/behat/completion_condition_time_spent.feature index eb7abb37d2af9..7d893962a9aae 100644 --- a/mod/lesson/tests/behat/completion_condition_time_spent.feature +++ b/mod/lesson/tests/behat/completion_condition_time_spent.feature @@ -17,7 +17,7 @@ Feature: Set time spent as a completion condition for a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -49,7 +49,7 @@ Feature: Set time spent as a completion condition for a lesson And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete And I follow "Test lesson" And I press "Next page" @@ -58,17 +58,17 @@ Feature: Set time spent as a completion condition for a lesson And I press "Next page" And I should see "You completed this lesson in" And I should see ", which is less than the required time of 10 secs. You might need to attempt the lesson again." - And I follow "Course 1" + And I am on course page "Course 1" And the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I wait "11" seconds And I press "Next page" And I should not see "You might need to attempt the lesson again." - And I follow "Course 1" + And I am on course page "Course 1" And the "Test lesson" "lesson" activity with "auto" completion should be marked as complete And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And "Student 1" user has completed "Test lesson" activity diff --git a/mod/lesson/tests/behat/date_availability.feature b/mod/lesson/tests/behat/date_availability.feature index c94eda396695d..6989c1d5510c8 100644 --- a/mod/lesson/tests/behat/date_availability.feature +++ b/mod/lesson/tests/behat/date_availability.feature @@ -17,7 +17,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Forbidding lesson accesses until a specified date @@ -42,7 +42,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson" Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" And I should not see "First page contents" @@ -68,7 +68,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson" Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" And I should not see "First page contents" diff --git a/mod/lesson/tests/behat/duplicate_lesson_page.feature b/mod/lesson/tests/behat/duplicate_lesson_page.feature index ee1a2320f6e23..82ffcf10710f6 100644 --- a/mod/lesson/tests/behat/duplicate_lesson_page.feature +++ b/mod/lesson/tests/behat/duplicate_lesson_page.feature @@ -21,7 +21,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager And I click on "Save changes" "button" When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | diff --git a/mod/lesson/tests/behat/import_fillintheblank_question.feature b/mod/lesson/tests/behat/import_fillintheblank_question.feature index be1e96e815056..b4bf1430fe4f2 100644 --- a/mod/lesson/tests/behat/import_fillintheblank_question.feature +++ b/mod/lesson/tests/behat/import_fillintheblank_question.feature @@ -18,7 +18,7 @@ Feature: In a lesson activity, teacher can import blackboard fill in the blank q | student1 | C1 | student | And I log in as "teacher1" When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | diff --git a/mod/lesson/tests/behat/import_images.feature b/mod/lesson/tests/behat/import_images.feature index 723cfd74e9aba..679b2e3869a01 100644 --- a/mod/lesson/tests/behat/import_images.feature +++ b/mod/lesson/tests/behat/import_images.feature @@ -18,7 +18,7 @@ Feature: In a lesson activity, teacher can import embedded images in questions a | student1 | C1 | student | And I log in as "teacher1" When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | diff --git a/mod/lesson/tests/behat/lesson_complete_report.feature b/mod/lesson/tests/behat/lesson_complete_report.feature index a204fa38baa20..4f802a3ca9ede 100644 --- a/mod/lesson/tests/behat/lesson_complete_report.feature +++ b/mod/lesson/tests/behat/lesson_complete_report.feature @@ -16,7 +16,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: @@ -47,7 +47,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - When I follow "Course 1" + When I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -85,13 +85,13 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -144,7 +144,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -163,7 +163,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I should see "Congratulations - end of lesson reached" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -191,7 +191,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -199,7 +199,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "End of lesson" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Complete report" diff --git a/mod/lesson/tests/behat/lesson_course_reset.feature b/mod/lesson/tests/behat/lesson_course_reset.feature index 620c1d1cb05e4..969c476bab1ad 100644 --- a/mod/lesson/tests/behat/lesson_course_reset.feature +++ b/mod/lesson/tests/behat/lesson_course_reset.feature @@ -26,7 +26,7 @@ Feature: Lesson reset | activity | name | intro | course | idnumber | | lesson | Test lesson name | Test lesson description | C1 | lesson1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test lesson name" And I follow "Add a question page" @@ -46,7 +46,7 @@ Feature: Lesson reset Scenario: Use course reset to clear all attempt data When I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -56,7 +56,7 @@ Feature: Lesson reset And I should see "Congratulations - end of lesson reached" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I navigate to "Reports > Overview" in current page administration And I should see "Sam1 Student1" @@ -65,7 +65,7 @@ Feature: Lesson reset | Delete all lesson attempts | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I navigate to "Reports > Overview" in current page administration Then I should see "No attempts have been made on this lesson" @@ -85,7 +85,7 @@ Feature: Lesson reset | Delete all user overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" @@ -104,7 +104,7 @@ Feature: Lesson reset | Delete all group overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/lesson/tests/behat/lesson_delete_answers.feature b/mod/lesson/tests/behat/lesson_delete_answers.feature index 610c7e6585551..d2559b489bfab 100644 --- a/mod/lesson/tests/behat/lesson_delete_answers.feature +++ b/mod/lesson/tests/behat/lesson_delete_answers.feature @@ -18,7 +18,7 @@ branch table contents | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -58,7 +58,7 @@ branch table contents And I should not see "Previous page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I should not see "Previous page" @@ -81,7 +81,7 @@ branch table contents And I should not see "Incorrect answer" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_edit_cluster.feature b/mod/lesson/tests/behat/lesson_edit_cluster.feature index ec7e1391aa170..5bdb6979ca70c 100644 --- a/mod/lesson/tests/behat/lesson_edit_cluster.feature +++ b/mod/lesson/tests/behat/lesson_edit_cluster.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, teacher can edit a cluster page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Lesson with cluster | @@ -90,7 +90,7 @@ Feature: In a lesson activity, teacher can edit a cluster page And I should see "Modified end" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Lesson with cluster" And I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_edit_pages.feature b/mod/lesson/tests/behat/lesson_edit_pages.feature index 0be0e57c9f665..cabd2d0a03f40 100644 --- a/mod/lesson/tests/behat/lesson_edit_pages.feature +++ b/mod/lesson/tests/behat/lesson_edit_pages.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -70,7 +70,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages And I should not see "Second page name" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -109,7 +109,7 @@ Feature: In a lesson activity, teacher can edit lesson's pages And I should not see "Hardest question ever" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_essay_question.feature b/mod/lesson/tests/behat/lesson_essay_question.feature index efb17ed5f701c..80e41d401f688 100644 --- a/mod/lesson/tests/behat/lesson_essay_question.feature +++ b/mod/lesson/tests/behat/lesson_essay_question.feature @@ -16,7 +16,7 @@ Feature: In a lesson activity, teacher can add an essay question | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -32,7 +32,7 @@ Feature: In a lesson activity, teacher can add an essay question And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "Please write a story about a frog." And I set the field "Your answer" to "

Once upon a time there was a little green frog." @@ -47,7 +47,7 @@ Feature: In a lesson activity, teacher can add an essay question And I should see "Your current grade without the essay question(s) is 0 out of 1." And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I follow "Grade essays" And I should see "Student 1" diff --git a/mod/lesson/tests/behat/lesson_group_override.feature b/mod/lesson/tests/behat/lesson_group_override.feature index 8da82f257db9e..11f7aba79a2fa 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -33,7 +33,7 @@ Feature: Lesson group override | activity | name | intro | groupmode | course | idnumber | | lesson | Test lesson name | Test lesson description | 1 | C1 | lesson1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test lesson name" And I follow "Add a question page" @@ -110,7 +110,7 @@ Feature: Lesson group override And I should see "Re-takes allowed" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -123,7 +123,7 @@ Feature: Lesson group override And I should see "Cat is an amphibian" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -150,7 +150,7 @@ Feature: Lesson group override And I should see "Password protected lesson" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" Then I should see "Test lesson name is a password protected lesson" And I should not see "Cat is an amphibian" @@ -168,7 +168,7 @@ Feature: Lesson group override And I should see "Congratulations - end of lesson reached" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Test lesson name is a password protected lesson" And I should not see "Cat is an amphibian" @@ -204,13 +204,13 @@ Feature: Lesson group override And I should see "Lesson closes" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -239,13 +239,13 @@ Feature: Lesson group override And I should see "Lesson opens" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -264,7 +264,7 @@ Feature: Lesson group override And I should see "Maximum number of attempts" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -279,7 +279,7 @@ Feature: Lesson group override And I should see "Congratulations - end of lesson reached" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -328,16 +328,16 @@ Feature: Lesson group override And I should see "Friday, 1 January 2021, 8:00" And I log out Then I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "This lesson will be open on Friday, 1 January 2021, 8:00" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" And I log out And I log in as "student3" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" diff --git a/mod/lesson/tests/behat/lesson_informations_at_end.feature b/mod/lesson/tests/behat/lesson_informations_at_end.feature index 96b249f0c608d..fae24fba2e2fa 100644 --- a/mod/lesson/tests/behat/lesson_informations_at_end.feature +++ b/mod/lesson/tests/behat/lesson_informations_at_end.feature @@ -15,7 +15,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -44,7 +44,7 @@ Feature: In a lesson activity, if custom scoring is not enabled, student should And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_navigation.feature b/mod/lesson/tests/behat/lesson_navigation.feature index fff10b52c1d6d..e2cda05410b24 100644 --- a/mod/lesson/tests/behat/lesson_navigation.feature +++ b/mod/lesson/tests/behat/lesson_navigation.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Student navigation with pages and questions @@ -59,7 +59,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "First page contents" And I press "Next page" @@ -107,7 +107,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "Test content" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature index 19af6acefdf1e..c3f596839e3fb 100644 --- a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature +++ b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature @@ -19,7 +19,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: number of student attempts @@ -79,7 +79,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -119,7 +119,7 @@ Feature: In Dashboard, teacher can see the number of student attempts to lessons And I should see "Your score is 3 (out of 3)." And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_outline_report.feature b/mod/lesson/tests/behat/lesson_outline_report.feature index 9450e2f722b4f..c6f20885bef06 100644 --- a/mod/lesson/tests/behat/lesson_outline_report.feature +++ b/mod/lesson/tests/behat/lesson_outline_report.feature @@ -16,7 +16,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: @@ -47,7 +47,7 @@ Feature: Teachers can review student progress on all lessons in a course by view | id_response_editor_1 | Wrong | | id_jumpto_1 | This page | And I press "Save page" - When I follow "Course 1" + When I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -85,13 +85,13 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -129,7 +129,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -143,7 +143,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I should see "Congratulations - end of lesson reached" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -168,7 +168,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -176,7 +176,7 @@ Feature: Teachers can review student progress on all lessons in a course by view And I press "End of lesson" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I follow "Outline report" diff --git a/mod/lesson/tests/behat/lesson_practice.feature b/mod/lesson/tests/behat/lesson_practice.feature index 14895968bb7e7..afdf92226e99b 100644 --- a/mod/lesson/tests/behat/lesson_practice.feature +++ b/mod/lesson/tests/behat/lesson_practice.feature @@ -17,7 +17,7 @@ Feature: Practice mode in a lesson activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Setup a basic lesson, we'll adjust it in the scenarios later. And I add a "Lesson" to section "1" and I fill the form with: @@ -44,14 +44,14 @@ Feature: Practice mode in a lesson activity And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Non-practice lesson" And I set the following fields to these values: | True | 1 | And I press "Submit" Then I should see "View grades" And I follow "Grades" in the user menu - And I follow "Course 1" + And I am on course page "Course 1" And I should see "Non-practice lesson" Scenario: Practice lesson doesn't record grades in the gradebook @@ -64,7 +64,7 @@ Feature: Practice mode in a lesson activity And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Practice lesson" And I set the following fields to these values: | True | 1 | @@ -85,7 +85,7 @@ Feature: Practice mode in a lesson activity And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Practice lesson with scale" And I set the following fields to these values: | True | 1 | diff --git a/mod/lesson/tests/behat/lesson_progress_bar.feature b/mod/lesson/tests/behat/lesson_progress_bar.feature index 9a41e2a6de265..3b4f697c9abda 100644 --- a/mod/lesson/tests/behat/lesson_progress_bar.feature +++ b/mod/lesson/tests/behat/lesson_progress_bar.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -58,7 +58,7 @@ Feature: In a lesson activity, students can see their progress viewing a progres And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "First page contents" And I should see "You have completed 0% of the lesson" diff --git a/mod/lesson/tests/behat/lesson_question_attempts.feature b/mod/lesson/tests/behat/lesson_question_attempts.feature index 970e7a17003b4..a69b43edb0aaa 100644 --- a/mod/lesson/tests/behat/lesson_question_attempts.feature +++ b/mod/lesson/tests/behat/lesson_question_attempts.feature @@ -16,7 +16,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: @@ -94,7 +94,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than Scenario: Check that we can leave a quiz and when we re-enter we can not re-attempt the question again Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -103,7 +103,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than | False| 1 | And I press "Submit" And I should see "Wrong" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Do you want to start at the last page you saw?" And I click on "No" "link" in the "#page-content" "css_element" @@ -118,7 +118,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than @javascript @_bug_phantomjs Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -162,7 +162,7 @@ Feature: In a lesson activity, students can not re-attempt a question more than @javascript Scenario: Check that we can not click back on the browser and re-attempt a question Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_report.feature b/mod/lesson/tests/behat/lesson_report.feature index e061f88933386..b7770a11b6cb5 100644 --- a/mod/lesson/tests/behat/lesson_report.feature +++ b/mod/lesson/tests/behat/lesson_report.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, teachers can review student attempts | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: @@ -81,7 +81,7 @@ Feature: In a lesson activity, teachers can review student attempts And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -102,7 +102,7 @@ Feature: In a lesson activity, teachers can review student attempts And I should see "Congratulations - end of lesson reached" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I follow "Reports" And I should see "Student 1" @@ -148,7 +148,7 @@ Feature: In a lesson activity, teachers can review student attempts And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -160,7 +160,7 @@ Feature: In a lesson activity, teachers can review student attempts And I press "End of lesson" And I log out Then I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I follow "Reports" And I should see "Student 1" diff --git a/mod/lesson/tests/behat/lesson_review.feature b/mod/lesson/tests/behat/lesson_review.feature index c8b447a9f026d..31b57c68f603c 100644 --- a/mod/lesson/tests/behat/lesson_review.feature +++ b/mod/lesson/tests/behat/lesson_review.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -58,7 +58,7 @@ Feature: In a lesson activity, students can review the answers they gave to ques And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "You have answered 0 correctly out of 0 attempts." And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_student_dashboard.feature b/mod/lesson/tests/behat/lesson_student_dashboard.feature index 67c93a9e56b47..28696ab388d88 100644 --- a/mod/lesson/tests/behat/lesson_student_dashboard.feature +++ b/mod/lesson/tests/behat/lesson_student_dashboard.feature @@ -20,7 +20,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | activity | name | intro | deadline | retake | course | idnumber | | lesson | Test lesson name | Test lesson description | 1893481200 | 1 | C1 | lesson1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: A completed lesson with only questions that allows multiple attempts @@ -53,7 +53,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -104,7 +104,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -140,7 +140,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -174,7 +174,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -213,7 +213,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -244,7 +244,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -332,7 +332,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_answer_editor_0 | True | | id_answer_editor_1 | False | And I press "Save page" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name 2" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -344,7 +344,7 @@ Feature: In Dashboard, a student can see their current status on all lessons wit | id_answer_editor_1 | False | And I press "Save page" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Test lesson name 3" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -366,14 +366,14 @@ Feature: In Dashboard, a student can see their current status on all lessons wit And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "D035 M00d13 r0x0rz j00 b0x0rs?" And I set the following fields to these values: | True | 1 | And I press "Submit" And I am on homepage - And I follow "Course 2" + And I am on course page "Course 2" And I follow "Test lesson name 3" And I should see "D035 M00d13 r0x0rz j00 b0x0rs?" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_student_resume.feature b/mod/lesson/tests/behat/lesson_student_resume.feature index e4d5234f8c56a..72c435c38854e 100644 --- a/mod/lesson/tests/behat/lesson_student_resume.feature +++ b/mod/lesson/tests/behat/lesson_student_resume.feature @@ -15,7 +15,7 @@ Feature: In a lesson activity a student should | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: @@ -79,7 +79,7 @@ Feature: In a lesson activity a student should And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -155,7 +155,7 @@ Feature: In a lesson activity a student should And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -176,7 +176,7 @@ Feature: In a lesson activity a student should And I press "End of lesson" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "First page contents" And I log out @@ -263,7 +263,7 @@ Feature: In a lesson activity a student should And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -378,7 +378,7 @@ Feature: In a lesson activity a student should And I press "Save page" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index 9313d950d63d4..1c31bd0f484f7 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -26,7 +26,7 @@ Feature: Lesson user override | activity | name | intro | course | idnumber | | lesson | Test lesson name | Test lesson description | C1 | lesson1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I follow "Test lesson name" And I follow "Add a question page" @@ -104,7 +104,7 @@ Feature: Lesson user override And I should see "Re-takes allowed" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -117,7 +117,7 @@ Feature: Lesson user override And I should see "Cat is an amphibian" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -144,7 +144,7 @@ Feature: Lesson user override And I should see "Password protected lesson" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" Then I should see "Test lesson name is a password protected lesson" And I should not see "Cat is an amphibian" @@ -162,7 +162,7 @@ Feature: Lesson user override And I should see "Congratulations - end of lesson reached" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Test lesson name is a password protected lesson" And I should not see "Cat is an amphibian" @@ -198,13 +198,13 @@ Feature: Lesson user override And I should see "Lesson closes" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -233,13 +233,13 @@ Feature: Lesson user override And I should see "Lesson opens" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -258,7 +258,7 @@ Feature: Lesson user override And I should see "Maximum number of attempts" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: @@ -273,7 +273,7 @@ Feature: Lesson user override And I should see "Congratulations - end of lesson reached" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I should see "Cat is an amphibian" And I set the following fields to these values: diff --git a/mod/lesson/tests/behat/lesson_with_clusters.feature b/mod/lesson/tests/behat/lesson_with_clusters.feature index e2bad1a9b8c8f..1ed5e66dfd319 100644 --- a/mod/lesson/tests/behat/lesson_with_clusters.feature +++ b/mod/lesson/tests/behat/lesson_with_clusters.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, students can see questions in random order | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Lesson with two clusters @@ -122,7 +122,7 @@ Feature: In a lesson activity, students can see questions in random order And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Lesson with clusters" Then I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/lesson_with_subcluster.feature b/mod/lesson/tests/behat/lesson_with_subcluster.feature index fc04c53307fd1..6553106852ee5 100644 --- a/mod/lesson/tests/behat/lesson_with_subcluster.feature +++ b/mod/lesson/tests/behat/lesson_with_subcluster.feature @@ -17,7 +17,7 @@ Feature: In a lesson activity, students can see questions in random order and a | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Lesson with subcluster @@ -142,7 +142,7 @@ Feature: In a lesson activity, students can see questions in random order and a And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Lesson with subcluster" Then I should see "First page contents" And I press "Next page" diff --git a/mod/lesson/tests/behat/link_to_gradebook.feature b/mod/lesson/tests/behat/link_to_gradebook.feature index dc4728bf4a88e..8f28b694c107f 100644 --- a/mod/lesson/tests/behat/link_to_gradebook.feature +++ b/mod/lesson/tests/behat/link_to_gradebook.feature @@ -17,7 +17,7 @@ Feature: link to gradebook on the end of lesson page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | @@ -43,7 +43,7 @@ Feature: link to gradebook on the end of lesson page Scenario: Link to gradebook for non practice lesson Given I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -61,7 +61,7 @@ Feature: link to gradebook on the end of lesson page And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -76,7 +76,7 @@ Feature: link to gradebook on the end of lesson page And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -84,14 +84,14 @@ Feature: link to gradebook on the end of lesson page And I should not see "View grades" Scenario: No link if Show gradebook to student disabled - Given I follow "Course 1" + Given I am on course page "Course 1" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Show gradebook to students | No | And I press "Save and display" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -106,7 +106,7 @@ Feature: link to gradebook on the end of lesson page | gradereport/user:view | Prevent | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson" And I press "Next page" And I press "Next page" diff --git a/mod/lesson/tests/behat/password_protection.feature b/mod/lesson/tests/behat/password_protection.feature index d175886e77238..0010348bb8a52 100644 --- a/mod/lesson/tests/behat/password_protection.feature +++ b/mod/lesson/tests/behat/password_protection.feature @@ -17,7 +17,7 @@ Feature: A teacher can password protect a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | @@ -33,7 +33,7 @@ Feature: A teacher can password protect a lesson And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson" Then I should see "Test lesson is a password protected lesson" And I should not see "First page contents" diff --git a/mod/lesson/tests/behat/questions_images.feature b/mod/lesson/tests/behat/questions_images.feature index 630ee850a787e..9ecbd15cd0db9 100644 --- a/mod/lesson/tests/behat/questions_images.feature +++ b/mod/lesson/tests/behat/questions_images.feature @@ -21,7 +21,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager And I click on "Save changes" "button" When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -79,7 +79,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson name" Then I should see "What animal is an amphibian?" And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist diff --git a/mod/lesson/tests/behat/teacher_grade_essays.feature b/mod/lesson/tests/behat/teacher_grade_essays.feature index 0f6da663a02ed..46e9ba489e373 100644 --- a/mod/lesson/tests/behat/teacher_grade_essays.feature +++ b/mod/lesson/tests/behat/teacher_grade_essays.feature @@ -35,7 +35,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions | student3 | G3 | And I log in as "teacher1" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | @@ -51,19 +51,19 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I set the field "Your answer" to "

Once upon a time there was a little green frog." And I press "Submit" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" And I set the field "Your answer" to "

Once upon a time there were two little green frogs." And I press "Submit" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" Then I should see "Grade essays" And I follow "Grade essays" @@ -88,7 +88,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions And I should see "No one in Group C has answered an essay question yet." And I log out And I log in as "teacher2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test lesson name" Then I should see "Grade essays" And I follow "Grade essays" diff --git a/mod/lesson/tests/behat/time_limit.feature b/mod/lesson/tests/behat/time_limit.feature index 373d47e52672c..aaaf80c8ac53e 100644 --- a/mod/lesson/tests/behat/time_limit.feature +++ b/mod/lesson/tests/behat/time_limit.feature @@ -18,7 +18,7 @@ Feature: A teacher can set a time limit for a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | @@ -35,7 +35,7 @@ Feature: A teacher can set a time limit for a lesson And I press "Save page" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Test lesson" Then I should see "You have 1 min to finish the lesson." And I wait "3" seconds diff --git a/mod/lti/tests/behat/addtool.feature b/mod/lti/tests/behat/addtool.feature index 3968cfd600755..448be6c7aa310 100644 --- a/mod/lti/tests/behat/addtool.feature +++ b/mod/lti/tests/behat/addtool.feature @@ -28,7 +28,7 @@ Feature: Add tools @javascript Scenario: Add a tool via the activity picker Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Teaching Tool 1" to section "1" # For tool that does not support Content-Item message type, the Select content button must be disabled. diff --git a/mod/lti/tests/behat/addtype.feature b/mod/lti/tests/behat/addtype.feature index 1418189fb6629..29a2085e0babb 100644 --- a/mod/lti/tests/behat/addtype.feature +++ b/mod/lti/tests/behat/addtype.feature @@ -18,7 +18,7 @@ Feature: Add preconfigured tools via teacher interface @javascript Scenario: Add a tool from a cartridge When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | @@ -37,7 +37,7 @@ Feature: Add preconfigured tools via teacher interface @javascript @_switch_window Scenario: Add a preconfigured tool from a cartridge When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | @@ -61,7 +61,7 @@ Feature: Add preconfigured tools via teacher interface @javascript @_switch_window Scenario: Add and use a preconfigured tool When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | diff --git a/mod/lti/tests/behat/contentitem.feature b/mod/lti/tests/behat/contentitem.feature index 9e12a3a2127ba..3a885bf45ab55 100644 --- a/mod/lti/tests/behat/contentitem.feature +++ b/mod/lti/tests/behat/contentitem.feature @@ -29,7 +29,7 @@ Feature: Content-Item support @javascript Scenario: Tool that supports Content-Item Message type should be able to configure a tool via the Select content button When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Teaching Tool 1" to section "1" Then the "Select content" "button" should be enabled @@ -37,7 +37,7 @@ Feature: Content-Item support @javascript Scenario: Editing a tool's settings that was configured from a preconfigured tool that supports Content-Item. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Teaching Tool 1" to section "1" And the "Select content" "button" should be enabled @@ -62,7 +62,7 @@ Feature: Content-Item support And I press "Save changes" And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "External tool" to section "1" # On load with no preconfigured tool selected: Select content button - disabled, Tool URL - enabled. @@ -89,7 +89,7 @@ Feature: Content-Item support @javascript Scenario: Editing a manually configured external tool Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "External tool" to section "1" And the field "Preconfigured tool" matches value "Automatic, based on tool URL" diff --git a/mod/quiz/report/grading/tests/behat/grading.feature b/mod/quiz/report/grading/tests/behat/grading.feature index 6904f42cc5827..4ea9ce5c72d25 100644 --- a/mod/quiz/report/grading/tests/behat/grading.feature +++ b/mod/quiz/report/grading/tests/behat/grading.feature @@ -19,7 +19,7 @@ Feature: Basic use of the Manual grading report | student1 | C1 | student | And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Quiz 1 | @@ -31,7 +31,7 @@ Feature: Basic use of the Manual grading report | Grade | 100% | # Check report shows nothing when there are no attempts. - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" When I navigate to "Results > Manual grading" in current page administration Then I should see "Manual grading" @@ -43,7 +43,7 @@ Feature: Basic use of the Manual grading report # Create an attempt. And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I should see "Question 1" @@ -58,7 +58,7 @@ Feature: Basic use of the Manual grading report # Use the manual grading report. And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Results > Manual grading" in current page administration And I should see "Manual grading" diff --git a/mod/quiz/report/overview/tests/behat/basic.feature b/mod/quiz/report/overview/tests/behat/basic.feature index a61f2aee7815f..1ad7e59db2473 100644 --- a/mod/quiz/report/overview/tests/behat/basic.feature +++ b/mod/quiz/report/overview/tests/behat/basic.feature @@ -38,7 +38,7 @@ Feature: Basic use of the Grades report # Add some attempts And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -49,7 +49,7 @@ Feature: Basic use of the Grades report And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -61,7 +61,7 @@ Feature: Basic use of the Grades report # Basic check of the Grades report When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Results > Grades" in current page administration Then I should see "Attempts: 2" diff --git a/mod/quiz/tests/behat/add_quiz.feature b/mod/quiz/tests/behat/add_quiz.feature index b9f32fa479e5a..1d9081b66677a 100644 --- a/mod/quiz/tests/behat/add_quiz.feature +++ b/mod/quiz/tests/behat/add_quiz.feature @@ -17,7 +17,7 @@ Feature: Add a quiz | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Test quiz name | @@ -31,7 +31,7 @@ Feature: Add a quiz | Feedback for the response 'False'. | So you think it is false | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I press "Attempt quiz now" Then I should see "Question 1" diff --git a/mod/quiz/tests/behat/attempt_basic.feature b/mod/quiz/tests/behat/attempt_basic.feature index 18bd5bf897b8b..af34a385cca73 100644 --- a/mod/quiz/tests/behat/attempt_basic.feature +++ b/mod/quiz/tests/behat/attempt_basic.feature @@ -32,7 +32,7 @@ Feature: Attempt a quiz | TF1 | 1 | | | TF2 | 1 | 3.0 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -68,7 +68,7 @@ Feature: Attempt a quiz | Section 3 | 5 | 0 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -111,7 +111,7 @@ Feature: Attempt a quiz | TF1 | 1 | | TF2 | 2 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" Then I should see "Text of the first question" diff --git a/mod/quiz/tests/behat/attempt_begin.feature b/mod/quiz/tests/behat/attempt_begin.feature index 4561c02f1dece..20126c626b77c 100644 --- a/mod/quiz/tests/behat/attempt_begin.feature +++ b/mod/quiz/tests/behat/attempt_begin.feature @@ -30,7 +30,7 @@ Feature: The various checks that may happen when an attept is started | question | page | | TF1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" Then I should see "Text of the first question" @@ -44,7 +44,7 @@ Feature: The various checks that may happen when an attept is started | question | page | | TF1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" Then I should see "To attempt this quiz you need to know the quiz password" in the "Start attempt" "dialogue" @@ -62,7 +62,7 @@ Feature: The various checks that may happen when an attept is started | question | page | | TF1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "Cancel" "button" in the "Start attempt" "dialogue" @@ -78,7 +78,7 @@ Feature: The various checks that may happen when an attept is started | question | page | | TF1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I set the field "Quiz password" to "Toad" @@ -102,7 +102,7 @@ Feature: The various checks that may happen when an attept is started | question | page | | TF1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I set the field "Quiz password" to "Toad" diff --git a/mod/quiz/tests/behat/attempt_redo_questions.feature b/mod/quiz/tests/behat/attempt_redo_questions.feature index a03b9cd4f66ea..8b308f0b581fb 100644 --- a/mod/quiz/tests/behat/attempt_redo_questions.feature +++ b/mod/quiz/tests/behat/attempt_redo_questions.feature @@ -31,7 +31,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a | TF1 | 1 | 2 | | TF2 | 1 | 1 | And I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: After completing a question, there is a redo question button that restarts the question @@ -51,7 +51,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a And I click on "Check" "button" in the "First question" "question" And I log out And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I follow "Attempts: 1" And I follow "Review attempt" @@ -80,7 +80,7 @@ Feature: Allow students to redo questions in a practice quiz, without starting a And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" And I log out And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I follow "Attempts: 1" And I follow "Review attempt" diff --git a/mod/quiz/tests/behat/attempt_require_previous.feature b/mod/quiz/tests/behat/attempt_require_previous.feature index 4353d9f98df54..633408c92f178 100644 --- a/mod/quiz/tests/behat/attempt_require_previous.feature +++ b/mod/quiz/tests/behat/attempt_require_previous.feature @@ -35,7 +35,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -44,7 +44,7 @@ Feature: Attempt a quiz where some questions require that the previous question And I should not see "Second question" And I log out And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I follow "Attempts: 1" And I follow "Review attempt" @@ -69,7 +69,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -96,7 +96,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I press "Finish attempt ..." @@ -121,7 +121,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -147,7 +147,7 @@ Feature: Attempt a quiz where some questions require that the previous question | Section 1 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -174,7 +174,7 @@ Feature: Attempt a quiz where some questions require that the previous question | Section 2 | 2 | 0 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I press "Next page" @@ -197,7 +197,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -220,7 +220,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF2 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" @@ -243,7 +243,7 @@ Feature: Attempt a quiz where some questions require that the previous question | TF1 | 1 | 1 | When I log in as "student" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" diff --git a/mod/quiz/tests/behat/backup.feature b/mod/quiz/tests/behat/backup.feature index 69b1bbc74da02..0bf6fc731fd00 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -27,7 +27,7 @@ Feature: Backup and restore of quizzes | TF1 | 1 | | TF2 | 2 | And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" And I turn editing mode on And I duplicate "Quiz 1" activity editing the new copy with: | Name | Quiz 2 | @@ -39,7 +39,7 @@ Feature: Backup and restore of quizzes @javascript @_file_upload Scenario: Restore a Moodle 2.8 quiz backup And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" And I navigate to "Restore" node in "Course administration" And I press "Manage backup files" And I upload "mod/quiz/tests/fixtures/moodle_28_quiz.mbz" file to "Files" filemanager diff --git a/mod/quiz/tests/behat/completion_condition_attempts_used.feature b/mod/quiz/tests/behat/completion_condition_attempts_used.feature index cd7a5b20a986d..320a78ecb8e20 100644 --- a/mod/quiz/tests/behat/completion_condition_attempts_used.feature +++ b/mod/quiz/tests/behat/completion_condition_attempts_used.feature @@ -33,7 +33,7 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all Scenario: student1 uses up both attempts without passing When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete And I follow "Test quiz name" And I press "Attempt quiz now" @@ -51,6 +51,6 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all Then "Completed: Test quiz name" "icon" should exist in the "li.modtype_quiz" "css_element" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Activity completion" node in "Course administration > Reports" And "Completed" "icon" should exist in the "Student 1" "table_row" diff --git a/mod/quiz/tests/behat/completion_condition_passing_grade.feature b/mod/quiz/tests/behat/completion_condition_passing_grade.feature index 5eb5d6fab3f9b..9cf20d2f9b6a3 100644 --- a/mod/quiz/tests/behat/completion_condition_passing_grade.feature +++ b/mod/quiz/tests/behat/completion_condition_passing_grade.feature @@ -33,7 +33,7 @@ Feature: Set a quiz to be marked complete when the student passes Scenario: student1 passes on the first try When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete And I follow "Test quiz name" And I press "Attempt quiz now" @@ -44,6 +44,6 @@ Feature: Set a quiz to be marked complete when the student passes Then "Completed: Test quiz name" "icon" should exist in the "li.modtype_quiz" "css_element" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Activity completion" node in "Course administration > Reports" And "Completed" "icon" should exist in the "Student 1" "table_row" diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index eecc26e7c8277..0ca347d4f2d39 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -18,7 +18,7 @@ Feature: Edit quiz page - adding things | activity | name | intro | course | idnumber | | quiz | Quiz 1 | Quiz 1 for testing the Add menu | C1 | quiz1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then I should see "Editing quiz: Quiz 1" @@ -108,7 +108,7 @@ Feature: Edit quiz page - adding things in various categories and add them to the question bank. # Create a couple of sub categories. - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Categories" node in "Course administration > Question bank" Then I should see "Add category" Then I set the field "Parent category" to "Default for C1" @@ -190,7 +190,7 @@ Feature: Edit quiz page - adding things # Add questions from question bank using the Add menu. # Add Essay 03 from question bank. - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I open the "last" add to quiz menu diff --git a/mod/quiz/tests/behat/editing_move_by_click.feature b/mod/quiz/tests/behat/editing_move_by_click.feature index 0001b7e2367b6..f900e9621da21 100644 --- a/mod/quiz/tests/behat/editing_move_by_click.feature +++ b/mod/quiz/tests/behat/editing_move_by_click.feature @@ -31,7 +31,7 @@ Feature: Edit quiz page - drag-and-drop | Question B | 1 | | Question C | 2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration diff --git a/mod/quiz/tests/behat/editing_remove_question.feature b/mod/quiz/tests/behat/editing_remove_question.feature index 19f7b8efffe80..6c55c09e68e2f 100644 --- a/mod/quiz/tests/behat/editing_remove_question.feature +++ b/mod/quiz/tests/behat/editing_remove_question.feature @@ -21,7 +21,7 @@ Feature: Edit quiz page - remove questions | activity | name | course | idnumber | | quiz | Quiz 1 | C1 | quiz1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" @javascript diff --git a/mod/quiz/tests/behat/editing_repaginate.feature b/mod/quiz/tests/behat/editing_repaginate.feature index 859c55d1a78c3..07209cd223a03 100644 --- a/mod/quiz/tests/behat/editing_repaginate.feature +++ b/mod/quiz/tests/behat/editing_repaginate.feature @@ -19,7 +19,7 @@ Feature: Edit quiz page - pagination | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration diff --git a/mod/quiz/tests/behat/editing_require_previous.feature b/mod/quiz/tests/behat/editing_require_previous.feature index cc235531bafd4..d0cb0f69226d0 100644 --- a/mod/quiz/tests/behat/editing_require_previous.feature +++ b/mod/quiz/tests/behat/editing_require_previous.feature @@ -30,7 +30,7 @@ Feature: Edit quizzes where some questions require the previous one to have been And quiz "Quiz 1" contains the following questions: | question | page | requireprevious | | TF1 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" should not be visible @@ -49,7 +49,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | question | page | requireprevious | | TF1 | 1 | 0 | | TF2 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @@ -67,7 +67,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | question | page | requireprevious | | Random (Test questions) | 1 | 0 | | TF1 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "This question cannot be attempted until the previous question has been completed." "link" should be visible @@ -87,7 +87,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | | TF2 | 1 | 0 | | TF3 | 1 | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration When I follow "No restriction on when question 2 can be attempted • Click to change" @@ -109,7 +109,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | | TF2 | 1 | 1 | | TF3 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration When I follow "Question 3 cannot be attempted until the previous question 2 has been completed • Click to change" @@ -131,7 +131,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | Random (Test questions) | 1 | 0 | | TF1 | 1 | 1 | | TF2 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible @@ -153,7 +153,7 @@ Feature: Edit quizzes where some questions require the previous one to have been And quiz "Quiz 1" contains the following sections: | heading | firstslot | shuffle | | Section 1 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @@ -175,7 +175,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | heading | firstslot | shuffle | | Section 1 | 1 | 1 | | Section 2 | 2 | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @@ -193,7 +193,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | question | page | requireprevious | | TF1 | 1 | 1 | | TF2 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF2" "list_item" should not be visible @@ -211,7 +211,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | question | page | requireprevious | | Story | 1 | 0 | | TF1 | 1 | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible @@ -229,7 +229,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | question | page | requireprevious | | Info | 1 | 0 | | TF1 | 1 | 0 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "be attempted" "link" in the "TF1" "list_item" should not be visible @@ -249,7 +249,7 @@ Feature: Edit quizzes where some questions require the previous one to have been | TF1 | 1 | 0 | | TF2 | 1 | 1 | | TF3 | 1 | 1 | - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration When I move "Question 1" to "After Question 3" in the quiz by clicking the move icon diff --git a/mod/quiz/tests/behat/editing_section_headings.feature b/mod/quiz/tests/behat/editing_section_headings.feature index aa6ac70652eae..de1fc38947d6b 100644 --- a/mod/quiz/tests/behat/editing_section_headings.feature +++ b/mod/quiz/tests/behat/editing_section_headings.feature @@ -35,7 +35,7 @@ Feature: Edit quiz page - section headings | TF1 | 1 | | TF2 | 2 | | TF3 | 3 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then I should see "Shuffle" @@ -45,7 +45,7 @@ Feature: Edit quiz page - section headings Given the following "activities" exist: | activity | name | intro | course | idnumber | | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I change quiz section heading "" to "This is section one" @@ -74,7 +74,7 @@ Feature: Edit quiz page - section headings | | 1 | 0 | | Heading 2 | 2 | 0 | | Heading 3 | 3 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I change quiz section heading "" to "This is section one" @@ -105,7 +105,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 2 | 0 | | Heading 3 | 3 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration When I change quiz section heading "Heading 1" to "" @@ -143,7 +143,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 2 | 0 | | Heading 3 | 3 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I follow "Remove heading 'Heading 2'" @@ -172,7 +172,7 @@ Feature: Edit quiz page - section headings | heading | firstslot | shuffle | | Heading 1 | 1 | 0 | | Heading 2 | 2 | 0 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I change quiz section heading "Heading 2" to "Edited heading" @@ -206,7 +206,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 3 | 0 | | Heading 3 | 5 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I move "TF5" to "After Question 2" in the quiz by clicking the move icon @@ -238,7 +238,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 3 | 0 | | Heading 3 | 5 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I move "TF1" to "After Question 3" in the quiz by clicking the move icon @@ -264,7 +264,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 2 | 0 | | Heading 3 | 3 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration Then "Remove heading 'Heading 1'" "link" should not exist @@ -291,7 +291,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 0 | | Heading 2 | 2 | 0 | | Heading 3 | 3 | 0 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on shuffle for section "Heading 1" on the quiz edit page @@ -319,7 +319,7 @@ Feature: Edit quiz page - section headings | Heading 1 | 1 | 1 | | Heading 2 | 2 | 1 | | Heading 3 | 3 | 1 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on shuffle for section "Heading 1" on the quiz edit page @@ -345,7 +345,7 @@ Feature: Edit quiz page - section headings | TF1 | 1 | | TF2 | 1 | | TF3 | 2 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on the "Add" page break icon after question "TF1" @@ -380,7 +380,7 @@ Feature: Edit quiz page - section headings | TF3 | 3 | | TF4 | 4 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on the "Remove" page break icon after question "TF1" @@ -419,7 +419,7 @@ Feature: Edit quiz page - section headings | TF9 | 9 | | TF10 | 10 | | TF11 | 11 | - When I follow "Course 1" + When I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration And I click on the "Remove" page break icon after question "TF10" diff --git a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature index 26d7f1ba10a13..84b4c1d994754 100644 --- a/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature @@ -18,7 +18,7 @@ Feature: Edit quiz marks with no attempts | activity | name | course | idnumber | grade | decimalpoints | questiondecimalpoints | | quiz | Quiz 1 | C1 | quiz1 | 20 | 2 | -1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "True/False" question to the "Quiz 1" quiz with: | Question name | First question | | Question text | Answer me | diff --git a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature index 2349c9336bed6..ad0c6ff6a51b2 100644 --- a/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature +++ b/mod/quiz/tests/behat/editing_set_marks_with_attempts.feature @@ -20,7 +20,7 @@ Feature: Edit quiz marks with attempts | activity | name | course | idnumber | grade | decimalpoints | questiondecimalpoints | | quiz | Quiz 1 | C1 | quiz1 | 20 | 2 | -1 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "True/False" question to the "Quiz 1" quiz with: | Question name | First question | | Question text | Answer me | @@ -31,12 +31,12 @@ Feature: Edit quiz marks with attempts | Default mark | 3.0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I navigate to "Edit quiz" in current page administration diff --git a/mod/quiz/tests/behat/manually_mark_question.feature b/mod/quiz/tests/behat/manually_mark_question.feature index 85733384e563f..ce4f10085deda 100644 --- a/mod/quiz/tests/behat/manually_mark_question.feature +++ b/mod/quiz/tests/behat/manually_mark_question.feature @@ -29,7 +29,7 @@ Feature: Teachers can override the grade for any question | question | page | | TF1 | 1 | And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I press "Attempt quiz now" And I follow "Finish attempt ..." @@ -37,7 +37,7 @@ Feature: Teachers can override the grade for any question And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Quiz 1" And I follow "Attempts: 1" And I follow "Review attempt" diff --git a/mod/quiz/tests/behat/preview.feature b/mod/quiz/tests/behat/preview.feature index 2cec65d052e78..9c815c84f7161 100644 --- a/mod/quiz/tests/behat/preview.feature +++ b/mod/quiz/tests/behat/preview.feature @@ -29,7 +29,7 @@ Feature: Preview a quiz as a teacher | TF1 | 1 | | | TF2 | 1 | 3.0 | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Preview a quiz diff --git a/mod/quiz/tests/behat/quiz_reset.feature b/mod/quiz/tests/behat/quiz_reset.feature index e8e073dc321f8..f4b1089f6f7de 100644 --- a/mod/quiz/tests/behat/quiz_reset.feature +++ b/mod/quiz/tests/behat/quiz_reset.feature @@ -35,7 +35,7 @@ Feature: Quiz reset Scenario: Use course reset to clear all attempt data When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I press "Attempt quiz now" And I set the field "True" to "1" @@ -43,13 +43,13 @@ Feature: Quiz reset And I press "Submit all and finish" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Reset" node in "Course administration" And I set the following fields to these values: | Delete all quiz attempts | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I navigate to "Results" in current page administration Then I should see "Attempts: 0" @@ -57,7 +57,7 @@ Feature: Quiz reset @javascript Scenario: Use course reset to remove user overrides. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I navigate to "User overrides" in current page administration And I press "Add user override" @@ -71,14 +71,14 @@ Feature: Quiz reset | Delete all user overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I navigate to "User overrides" in current page administration Then I should not see "Sam1 Student1" Scenario: Use course reset to remove group overrides. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I navigate to "Group overrides" in current page administration And I press "Add group override" @@ -92,7 +92,7 @@ Feature: Quiz reset | Delete all group overrides | 1 | And I press "Reset course" And I press "Continue" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz name" And I navigate to "Group overrides" in current page administration Then I should not see "Group 1" diff --git a/mod/quiz/tests/behat/settings_form_fields_disableif.feature b/mod/quiz/tests/behat/settings_form_fields_disableif.feature index 6b4604d6ce496..247cf63e28c7b 100644 --- a/mod/quiz/tests/behat/settings_form_fields_disableif.feature +++ b/mod/quiz/tests/behat/settings_form_fields_disableif.feature @@ -19,7 +19,7 @@ Feature: Settings form fields disabled if not required | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript diff --git a/mod/resource/tests/behat/display_resource.feature b/mod/resource/tests/behat/display_resource.feature index 3e719c640271a..7f791e76509ab 100644 --- a/mod/resource/tests/behat/display_resource.feature +++ b/mod/resource/tests/behat/display_resource.feature @@ -17,7 +17,7 @@ Feature: Teacher can specify different display options for the resource | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on @javascript @@ -31,7 +31,7 @@ Feature: Teacher can specify different display options for the resource And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager And I press "Save and display" Then ".resourcedetails" "css_element" should not exist - And I follow "Course 1" + And I am on course page "Course 1" And ".activity.resource .resourcelinkdetails" "css_element" should not exist And I log out @@ -49,7 +49,7 @@ Feature: Teacher can specify different display options for the resource Then I see "6 bytes" in the ".resourcedetails" "css_element" And I see "Text file" in the ".resourcedetails" "css_element" And I see "Uploaded" in the ".resourcedetails" "css_element" - And I follow "Course 1" + And I am on course page "Course 1" And I see "6 bytes" in the ".activity.resource .resourcelinkdetails" "css_element" And I see "Text file" in the ".activity.resource .resourcelinkdetails" "css_element" And I see "Uploaded" in the ".activity.resource .resourcelinkdetails" "css_element" diff --git a/mod/scorm/tests/behat/add_scorm.feature b/mod/scorm/tests/behat/add_scorm.feature index 0a04e3d4f9dba..5d3699ec0251a 100644 --- a/mod/scorm/tests/behat/add_scorm.feature +++ b/mod/scorm/tests/behat/add_scorm.feature @@ -18,7 +18,7 @@ Feature: Add scorm activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "SCORM package" to section "1" And I set the following fields to these values: @@ -31,11 +31,11 @@ Feature: Add scorm activity And I should see "Preview" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Awesome SCORM package" And I should see "Normal" And I press "Enter" And I switch to "scorm_object" iframe And I should see "Not implemented yet" And I switch to the main frame - And I follow "Course 1" + And I am on course page "Course 1" diff --git a/mod/scorm/tests/behat/completion_condition_require_status.feature b/mod/scorm/tests/behat/completion_condition_require_status.feature index da3aab380dcb4..81a0417fe1ad6 100644 --- a/mod/scorm/tests/behat/completion_condition_require_status.feature +++ b/mod/scorm/tests/behat/completion_condition_require_status.feature @@ -19,7 +19,7 @@ Feature: Scorm multi-sco completion @javascript Scenario: Test completion with a single sco completion. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -37,7 +37,7 @@ Feature: Scorm multi-sco completion Then I should see "Basic Multi-sco SCORM package" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -50,13 +50,13 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Then "Student 1" user has completed "Basic Multi-sco SCORM package" activity @javascript Scenario: Test completion with all scos and correct sco load on re-entry. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -74,7 +74,7 @@ Feature: Scorm multi-sco completion Then I should see "ADV Multi-sco SCORM package" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -87,11 +87,11 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Then "Student 1" user has not completed "ADV Multi-sco SCORM package" activity And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -184,5 +184,5 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And "Student 1" user has completed "ADV Multi-sco SCORM package" activity \ No newline at end of file diff --git a/mod/scorm/tests/behat/missing_org.feature b/mod/scorm/tests/behat/missing_org.feature index 9bd7552e6f754..6501d494eaa5a 100644 --- a/mod/scorm/tests/behat/missing_org.feature +++ b/mod/scorm/tests/behat/missing_org.feature @@ -15,7 +15,7 @@ Feature: Check a SCORM package with missing Organisational structure. | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "SCORM package" to section "1" And I set the following fields to these values: @@ -28,7 +28,7 @@ Feature: Check a SCORM package with missing Organisational structure. And I should see "Preview" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "MissingOrg SCORM package" And I should see "Normal" And I press "Enter" diff --git a/mod/scorm/tests/behat/multisco_review_mode.feature b/mod/scorm/tests/behat/multisco_review_mode.feature index c39c71fe8fb58..3507b06ef7a5b 100644 --- a/mod/scorm/tests/behat/multisco_review_mode.feature +++ b/mod/scorm/tests/behat/multisco_review_mode.feature @@ -19,7 +19,7 @@ Feature: Scorm multi-sco review mode. @javascript Scenario: Test review mode with a single sco completion. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -35,7 +35,7 @@ Feature: Scorm multi-sco review mode. And I should see "Basic Multi-sco SCORM package" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -46,7 +46,7 @@ Feature: Scorm multi-sco review mode. And I wait until the page is ready And I should see "Basic Multi-sco SCORM package" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -55,7 +55,7 @@ Feature: Scorm multi-sco review mode. @javascript Scenario: Test review mode with all scos completed. When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -73,7 +73,7 @@ Feature: Scorm multi-sco review mode. And I should see "ADV Multi-sco SCORM package" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -169,7 +169,7 @@ Feature: Scorm multi-sco review mode. And I wait until the page is ready And I should see "ADV Multi-sco SCORM package" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" diff --git a/mod/survey/tests/behat/survey_completion.feature b/mod/survey/tests/behat/survey_completion.feature index 33ebfaf7241a4..77a6fccd2f60a 100644 --- a/mod/survey/tests/behat/survey_completion.feature +++ b/mod/survey/tests/behat/survey_completion.feature @@ -15,7 +15,7 @@ Feature: A teacher can use activity completion to track a student progress | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on Scenario: Require survey view @@ -28,7 +28,7 @@ Feature: A teacher can use activity completion to track a student progress And I turn editing mode off And the "Test survey name" "survey" activity with "auto" completion should be marked as not complete When I follow "Test survey name" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test survey name" "survey" activity with "auto" completion should be marked as complete Scenario: Require survey submission @@ -42,5 +42,5 @@ Feature: A teacher can use activity completion to track a student progress And the "Test survey name" "survey" activity with "auto" completion should be marked as not complete When I follow "Test survey name" And I press "Click here to continue" - And I follow "Course 1" + And I am on course page "Course 1" Then the "Test survey name" "survey" activity with "auto" completion should be marked as complete diff --git a/mod/survey/tests/behat/survey_types.feature b/mod/survey/tests/behat/survey_types.feature index 691e934b56554..de41090e877bc 100644 --- a/mod/survey/tests/behat/survey_types.feature +++ b/mod/survey/tests/behat/survey_types.feature @@ -15,7 +15,7 @@ Feature: A teacher can set three types of survey activity | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | diff --git a/mod/wiki/tests/behat/collaborative_individual.feature b/mod/wiki/tests/behat/collaborative_individual.feature index f42e9b152903c..b6f8e5d3c5ed7 100644 --- a/mod/wiki/tests/behat/collaborative_individual.feature +++ b/mod/wiki/tests/behat/collaborative_individual.feature @@ -20,7 +20,7 @@ Feature: A teacher can set a wiki to be collaborative or individual | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Collaborative wiki name | @@ -32,7 +32,7 @@ Feature: A teacher can set a wiki to be collaborative or individual And I set the following fields to these values: | HTML format | Collaborative teacher1 edition | And I press "Save" - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Individual wiki name | | Description | Individual wiki description | @@ -45,7 +45,7 @@ Feature: A teacher can set a wiki to be collaborative or individual And I press "Save" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" When I follow "Collaborative wiki name" Then I should see "Collaborative teacher1 edition" And I follow "Edit" @@ -54,7 +54,7 @@ Feature: A teacher can set a wiki to be collaborative or individual And I press "Save" And I should not see "Collaborative teacher1 edition" And I should see "Collaborative student1 edition" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I should not see "Individual teacher1 edition" And I press "Create page" @@ -63,7 +63,7 @@ Feature: A teacher can set a wiki to be collaborative or individual And I press "Save" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I should not see "Individual teacher1 edition" And I should not see "Individual student1 edition" @@ -73,10 +73,10 @@ Feature: A teacher can set a wiki to be collaborative or individual And I press "Save" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Collaborative wiki name" And I should see "Collaborative student1 edition" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I should see "Individual teacher1 edition" And I should not see "Individual student1 edition" diff --git a/mod/wiki/tests/behat/edit_tags.feature b/mod/wiki/tests/behat/edit_tags.feature index c10d1fa4e6196..6a7a929d73203 100644 --- a/mod/wiki/tests/behat/edit_tags.feature +++ b/mod/wiki/tests/behat/edit_tags.feature @@ -17,7 +17,7 @@ Feature: Edited wiki pages handle tags correctly | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | @@ -28,7 +28,7 @@ Feature: Edited wiki pages handle tags correctly Scenario: Wiki page edition of custom tags works as expected Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I press "Create page" When I set the following fields to these values: @@ -54,7 +54,7 @@ Feature: Edited wiki pages handle tags correctly And I press "Continue" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I press "Create page" And I click on ".form-autocomplete-downarrow" "css_element" diff --git a/mod/wiki/tests/behat/page_history.feature b/mod/wiki/tests/behat/page_history.feature index 49b38d8de7209..c97a984db1cdd 100644 --- a/mod/wiki/tests/behat/page_history.feature +++ b/mod/wiki/tests/behat/page_history.feature @@ -20,7 +20,7 @@ Feature: A history of each wiki page is available | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | @@ -34,7 +34,7 @@ Feature: A history of each wiki page is available And I press "Save" And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I follow "Edit" And I set the following fields to these values: @@ -42,7 +42,7 @@ Feature: A history of each wiki page is available And I press "Save" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I follow "Edit" And I set the following fields to these values: diff --git a/mod/wiki/tests/behat/preview_page.feature b/mod/wiki/tests/behat/preview_page.feature index 2c9a7ce45584a..09a0bd96af7c9 100644 --- a/mod/wiki/tests/behat/preview_page.feature +++ b/mod/wiki/tests/behat/preview_page.feature @@ -17,7 +17,7 @@ Feature: Edited wiki pages may be previewed before saving | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | @@ -26,7 +26,7 @@ Feature: Edited wiki pages may be previewed before saving | Wiki mode | Collaborative wiki | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" When I press "Create page" And I set the following fields to these values: diff --git a/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature b/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature index e02b248e226f2..e9f3881565a13 100644 --- a/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature +++ b/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature @@ -15,7 +15,7 @@ Feature: Teachers can reset wiki pages, tags and files | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki | diff --git a/mod/wiki/tests/behat/wiki_comments.feature b/mod/wiki/tests/behat/wiki_comments.feature index 430127cc4aace..5150d980b2da0 100644 --- a/mod/wiki/tests/behat/wiki_comments.feature +++ b/mod/wiki/tests/behat/wiki_comments.feature @@ -19,7 +19,7 @@ Feature: Users can comment on wiki pages | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | @@ -33,7 +33,7 @@ Feature: Users can comment on wiki pages And I press "Save" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I follow "Comments" And I follow "Add comment" @@ -59,7 +59,7 @@ Feature: Users can comment on wiki pages Scenario: Student cannot edit another student's comment When I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I follow "Comments" Then "Edit" "link" should not exist in the "wiki-comments" "table" @@ -69,7 +69,7 @@ Feature: Users can comment on wiki pages Scenario: Teacher can delete a student comment When I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test wiki name" And I follow "Comments" Then "Edit" "link" should not exist in the "wiki-comments" "table" diff --git a/mod/wiki/tests/behat/wiki_formats.feature b/mod/wiki/tests/behat/wiki_formats.feature index 5fd082ba1c774..de96f343f4f73 100644 --- a/mod/wiki/tests/behat/wiki_formats.feature +++ b/mod/wiki/tests/behat/wiki_formats.feature @@ -15,7 +15,7 @@ Feature: There is a choice of formats for editing a wiki page | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | diff --git a/mod/wiki/tests/behat/wiki_search.feature b/mod/wiki/tests/behat/wiki_search.feature index 059c2cc94b7be..a2d65b25f8322 100644 --- a/mod/wiki/tests/behat/wiki_search.feature +++ b/mod/wiki/tests/behat/wiki_search.feature @@ -22,7 +22,7 @@ Feature: Users can search wikis @javascript Scenario: Searching collaborative wiki Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Collaborative wiki name | @@ -34,10 +34,10 @@ Feature: Users can search wikis And I set the following fields to these values: | HTML format | Collaborative teacher1 page [[new page]] | And I press "Save" - And I follow "Course 1" + And I am on course page "Course 1" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Collaborative wiki name" And I follow "new page" And I press "Create page" @@ -61,7 +61,7 @@ Feature: Users can search wikis @javascript Scenario: Searching individual wiki Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Individual wiki name | @@ -75,7 +75,7 @@ Feature: Users can search wikis And I press "Save" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I press "Create page" And I set the following fields to these values: @@ -87,7 +87,7 @@ Feature: Users can search wikis And I should not see "Individual teacher1 page" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I press "Create page" And I set the following fields to these values: @@ -100,7 +100,7 @@ Feature: Users can search wikis And I should not see "Individual teacher1 page" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Individual wiki name" And I set the field "searchstring" to "page" And I press "Search wikis" @@ -128,7 +128,7 @@ Feature: Users can search wikis | student1 | G1 | | student2 | G2 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Group wiki name | @@ -154,7 +154,7 @@ Feature: Users can search wikis And I press "Save" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Group wiki name" And I follow "new page1" And I press "Create page" @@ -169,7 +169,7 @@ Feature: Users can search wikis And I should not see "All participants teacher1 page" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Group wiki name" And I follow "new page2" And I press "Create page" @@ -185,5 +185,5 @@ Feature: Users can search wikis And I should not see "All participants teacher1 page" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Group wiki name" diff --git a/mod/workshop/tests/behat/delete_submission.feature b/mod/workshop/tests/behat/delete_submission.feature index fa6f3bf2fb44f..bd29685a571f0 100644 --- a/mod/workshop/tests/behat/delete_submission.feature +++ b/mod/workshop/tests/behat/delete_submission.feature @@ -25,7 +25,7 @@ Feature: Workshop submission removal | workshop | TestWorkshop | Test workshop description | c1 | workshop1 | # Teacher sets up assessment form and changes the phase to submission. And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I edit assessment form in workshop "TestWorkshop" as:" | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | @@ -34,7 +34,7 @@ Feature: Workshop submission removal And I log out # Student1 submits. And I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission1 | @@ -42,14 +42,14 @@ Feature: Workshop submission removal And I log out # Student2 submits. And I log in as "student2" - And I follow "Course1" + And I am on course page "Course1" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission2 | | Submission content | Some content | And I log out # Teacher allocates student3 to be reviewer of student2's submission. And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I allocate submissions in workshop "TestWorkshop" as:" | Participant | Reviewer | @@ -58,7 +58,7 @@ Feature: Workshop submission removal Scenario: Students can delete their submissions as long as the submissions are editable and not allocated for assessments Given I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" When I follow "Submission1" Then I should see "Submission1" @@ -71,12 +71,12 @@ Feature: Workshop submission removal Scenario: Students cannot delete their submissions if the submissions are not editable Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I change phase in workshop "TestWorkshop" to "Closed" And I log out And I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" When I follow "Submission1" Then I should see "Submission1" @@ -84,7 +84,7 @@ Feature: Workshop submission removal Scenario: Students cannot delete their submissions if the submissions are allocated for assessments Given I log in as "student2" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" When I follow "Submission2" Then I should see "Submission2" @@ -92,7 +92,7 @@ Feature: Workshop submission removal Scenario: Teachers can delete submissions even if the submissions are allocated for assessments. Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And "Submission1" "link" should exist And "Submission2" "link" should exist diff --git a/mod/workshop/tests/behat/embedded_images.feature b/mod/workshop/tests/behat/embedded_images.feature index e69e3dfc555a3..7612f70ccee00 100644 --- a/mod/workshop/tests/behat/embedded_images.feature +++ b/mod/workshop/tests/behat/embedded_images.feature @@ -20,7 +20,7 @@ Feature: Teachers can embed images into instructions and conclusion fields And I upload "mod/workshop/tests/fixtures/moodlelogo.png" file to "Files" filemanager And I click on "Save changes" "button" And I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Create and edit the workshop. When I add a "Workshop" to section "1" and I fill the form with: diff --git a/mod/workshop/tests/behat/example_submission.feature b/mod/workshop/tests/behat/example_submission.feature index 52bc641450455..ee046d2a18468 100644 --- a/mod/workshop/tests/behat/example_submission.feature +++ b/mod/workshop/tests/behat/example_submission.feature @@ -21,7 +21,7 @@ Feature: Provide example submission | workshop | TestWorkshop | Test workshop description | c1 | workshop1 | 1 | # As a teacher, define the assessment form to be used in the workshop. When I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I edit assessment form in workshop "TestWorkshop" as:" | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | diff --git a/mod/workshop/tests/behat/export_submission.feature b/mod/workshop/tests/behat/export_submission.feature index 8ef837e3c2eb1..bf6e124352d7c 100644 --- a/mod/workshop/tests/behat/export_submission.feature +++ b/mod/workshop/tests/behat/export_submission.feature @@ -31,7 +31,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I log out # Teacher sets up assessment form and changes the phase to submission. And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I edit assessment form in workshop "TestWorkshop" as:" | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | @@ -39,7 +39,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I log out # Student1 submits. And I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission1 | @@ -47,14 +47,14 @@ Feature: Exporting workshop submissions and assessments to a portfolio And I log out # Student2 submits. And I log in as "student2" - And I follow "Course1" + And I am on course page "Course1" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission2 | | Submission content | Some content | And I log out # Teacher allocates reviewers and changes the phase to assessment. And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I should see "to allocate: 2" And I should see "Workshop submissions report" @@ -72,7 +72,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio Scenario: Students can export their own submission to a portfolio. Given I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" When I follow "Submission1" Then I should see "Submission1" @@ -87,7 +87,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio Scenario: Students can export submission they have peer-assessed. Given I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I should see "Submission2" And I follow "Submission2" @@ -104,7 +104,7 @@ Feature: Exporting workshop submissions and assessments to a portfolio Given the following config values are set as admin: | enableportfolios | 0 | When I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I follow "Submission1" Then I should see "Submission1" diff --git a/mod/workshop/tests/behat/grade_to_pass.feature b/mod/workshop/tests/behat/grade_to_pass.feature index a2c536cb92c57..d1b788fff3db3 100644 --- a/mod/workshop/tests/behat/grade_to_pass.feature +++ b/mod/workshop/tests/behat/grade_to_pass.feature @@ -17,7 +17,7 @@ Feature: Setting grades to pass via workshop editing form Scenario: Adding a new workshop with grade to pass field set Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I turn editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Awesome workshop | @@ -32,7 +32,7 @@ Feature: Setting grades to pass via workshop editing form Scenario: Adding a new workshop with grade to pass fields left empty Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I turn editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Another awesome workshop | @@ -47,7 +47,7 @@ Feature: Setting grades to pass via workshop editing form Scenario: Adding a new workshop with non-numeric value of a grade to pass Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I turn editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Almost awesome workshop | @@ -58,7 +58,7 @@ Feature: Setting grades to pass via workshop editing form Scenario: Adding a new workshop with invalid value of a grade to pass Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I turn editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Almost awesome workshop | @@ -69,7 +69,7 @@ Feature: Setting grades to pass via workshop editing form Scenario: Emptying grades to pass fields sets them to zero Given I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I turn editing mode on And I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Super awesome workshop | diff --git a/mod/workshop/tests/behat/workshop_assessment.feature b/mod/workshop/tests/behat/workshop_assessment.feature index c41fb4dc03a53..36f106465837f 100644 --- a/mod/workshop/tests/behat/workshop_assessment.feature +++ b/mod/workshop/tests/behat/workshop_assessment.feature @@ -27,7 +27,7 @@ Feature: Workshop submission and assessment | workshop | TestWorkshop | Test workshop description | c1 | workshop1 | # teacher1 sets up assessment form and changes the phase to submission When I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I edit assessment form in workshop "TestWorkshop" as:" | id_description__idx_0_editor | Aspect1 | | id_description__idx_1_editor | Aspect2 | @@ -36,7 +36,7 @@ Feature: Workshop submission and assessment And I log out # student1 submits And I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" Then I should see "Submit your work" And I add a submission in workshop "TestWorkshop" as:" @@ -46,21 +46,21 @@ Feature: Workshop submission and assessment And I log out # student2 submits And I log in as "student2" - And I follow "Course1" + And I am on course page "Course1" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission2 | | Submission content | Some content | And I log out # student3 submits And I log in as "student3" - And I follow "Course1" + And I am on course page "Course1" And I add a submission in workshop "TestWorkshop" as:" | Title | Submission3 | | Submission content | Some content | And I log out # teacher1 allocates reviewers and changes the phase to assessment And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I should see "to allocate: 3" And I should see "There is at least one author who has not yet submitted their work" @@ -82,7 +82,7 @@ Feature: Workshop submission and assessment And I log out # student1 assesses work of student2 and student3 And I log in as "student1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 2') and contains(.,'total: 2')]" "xpath_element" should exist And I assess submission "Sam2" in workshop "TestWorkshop" as:" @@ -92,7 +92,7 @@ Feature: Workshop submission and assessment | peercomment__idx_1 | Amazing | | Feedback for the author | Good work | And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 2')]" "xpath_element" should exist - And I follow "Course1" + And I am on course page "Course1" And I assess submission "Sam3" in workshop "TestWorkshop" as:" | grade__idx_0 | 9 / 10 | | peercomment__idx_0 | Well done | @@ -103,7 +103,7 @@ Feature: Workshop submission and assessment And I log out # student2 assesses work of student1 And I log in as "student2" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And "//ul[@class='tasks']/li[div[@class='title' and contains(.,'Assess peers')]]/div[@class='details' and contains(.,'pending: 1') and contains(.,'total: 1')]" "xpath_element" should exist And I assess submission "Sam1" in workshop "TestWorkshop" as:" @@ -116,7 +116,7 @@ Feature: Workshop submission and assessment And I log out # teacher1 makes sure he can see all peer grades And I log in as "teacher1" - And I follow "Course1" + And I am on course page "Course1" And I follow "TestWorkshop" And I should see grade "52" for workshop participant "Sam1" set by peer "Sam2" And I should see grade "60" for workshop participant "Sam2" set by peer "Sam1" diff --git a/notes/tests/behat/participants_notes.feature b/notes/tests/behat/participants_notes.feature index 9216f045c8c29..af8d1539623e1 100644 --- a/notes/tests/behat/participants_notes.feature +++ b/notes/tests/behat/participants_notes.feature @@ -31,7 +31,7 @@ Feature: Add notes to course participants And I press "Save changes" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Participants" And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 1')]//input[@type='checkbox']" to "1" And I set the field with xpath "//tr[contains(normalize-space(.), 'Student 2')]//input[@type='checkbox']" to "1" @@ -51,7 +51,7 @@ Feature: Add notes to course participants And I follow "Participants" And I follow "Student 2" And I follow "Notes" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Participants" And I follow "Notes" Then I should see "Student 1" diff --git a/question/format/gift/tests/behat/import_export.feature b/question/format/gift/tests/behat/import_export.feature index a458b018f4c9c..b8e57a97362b1 100644 --- a/question/format/gift/tests/behat/import_export.feature +++ b/question/format/gift/tests/behat/import_export.feature @@ -15,7 +15,7 @@ Feature: Test importing questions from GIFT format. | user | course | role | | teacher | C1 | editingteacher | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import some GIFT questions diff --git a/question/format/webct/tests/behat/import.feature b/question/format/webct/tests/behat/import.feature index 8221beff5c4ba..1ef4b3468a6d9 100644 --- a/question/format/webct/tests/behat/import.feature +++ b/question/format/webct/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing questions from WebCT format. | user | course | role | | teacher | C1 | editingteacher | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import some WebCT questions diff --git a/question/format/webct/tests/behat/importcalculated.feature b/question/format/webct/tests/behat/importcalculated.feature index d28d12579a47b..8313f7da0dc18 100644 --- a/question/format/webct/tests/behat/importcalculated.feature +++ b/question/format/webct/tests/behat/importcalculated.feature @@ -15,7 +15,7 @@ Feature: Test importing calculated question from WebCT format. | user | course | role | | teacher | C1 | editingteacher | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import a WebCT calculated question diff --git a/question/format/xml/tests/behat/import_export.feature b/question/format/xml/tests/behat/import_export.feature index 5df470726c084..f7854e050d58e 100644 --- a/question/format/xml/tests/behat/import_export.feature +++ b/question/format/xml/tests/behat/import_export.feature @@ -15,7 +15,7 @@ Feature: Test importing questions from Moodle XML format. | user | course | role | | teacher | C1 | editingteacher | And I log in as "teacher" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import some true/false questions from Moodle XML format diff --git a/question/tests/behat/copy_questions.feature b/question/tests/behat/copy_questions.feature index 65fb58ab45509..9f40dec4c7737 100644 --- a/question/tests/behat/copy_questions.feature +++ b/question/tests/behat/copy_questions.feature @@ -21,7 +21,7 @@ Feature: A teacher can duplicate questions in the question bank | questioncategory | qtype | name | questiontext | | Test questions | essay | Test question to be copied | Write about whatever you want | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Questions" node in "Course administration > Question bank" @javascript diff --git a/question/tests/behat/delete_questions.feature b/question/tests/behat/delete_questions.feature index 1db10f0b7f2a2..aa755e6a63f04 100644 --- a/question/tests/behat/delete_questions.feature +++ b/question/tests/behat/delete_questions.feature @@ -21,7 +21,7 @@ Feature: A teacher can delete questions in the question bank | questioncategory | qtype | name | questiontext | | Test questions | essay | Test question to be deleted | Write about whatever you want | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Questions" node in "Course administration > Question bank" @javascript @@ -39,7 +39,7 @@ Feature: A teacher can delete questions in the question bank @javascript Scenario: Delete a question used in a quiz - Given I follow "Course 1" + Given I am on course page "Course 1" And I turn editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Test quiz | @@ -52,7 +52,7 @@ Feature: A teacher can delete questions in the question bank Then I should not see "Test used question to be deleted" And I click on "Also show old questions" "checkbox" And I should see "Test used question to be deleted" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test quiz" And I click on "Preview quiz now" "button" And I should see "Write about whatever you want" diff --git a/question/tests/behat/edit_questions.feature b/question/tests/behat/edit_questions.feature index 2824d5477b0bc..261bdc71bdb9d 100644 --- a/question/tests/behat/edit_questions.feature +++ b/question/tests/behat/edit_questions.feature @@ -21,7 +21,7 @@ Feature: A teacher can edit questions in the question bank | questioncategory | qtype | name | questiontext | | Test questions | essay | Test question to be edited | Write about whatever you want | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Questions" node in "Course administration > Question bank" @javascript diff --git a/question/tests/behat/preview_question.feature b/question/tests/behat/preview_question.feature index f466cfaadbee1..639b534237556 100644 --- a/question/tests/behat/preview_question.feature +++ b/question/tests/behat/preview_question.feature @@ -21,7 +21,7 @@ Feature: A teacher can preview questions in the question bank | questioncategory | qtype | name | | Test questions | numerical | Test question to be previewed | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Questions" node in "Course administration > Question bank" When I click on "Preview" "link" in the "Test question to be previewed" "table_row" And I switch to "questionpreview" window diff --git a/question/tests/behat/question_categories.feature b/question/tests/behat/question_categories.feature index d1ed1ea23ddad..01c7f4d5e9def 100644 --- a/question/tests/behat/question_categories.feature +++ b/question/tests/behat/question_categories.feature @@ -23,7 +23,7 @@ Feature: A teacher can put questions in categories in the question bank | questioncategory | qtype | name | questiontext | | Used category | essay | Test question to be moved | Write about whatever you want | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: A new question category can be created When I navigate to "Categories" node in "Course administration > Question bank" diff --git a/question/tests/behat/sort_questions.feature b/question/tests/behat/sort_questions.feature index 0e109c9a3cd06..f8e5d85ac8573 100644 --- a/question/tests/behat/sort_questions.feature +++ b/question/tests/behat/sort_questions.feature @@ -23,7 +23,7 @@ Feature: The questions in the question bank can be sorted in various ways | Test questions | essay | B question 2 name | teacher1 | Question 2 text | | Test questions | numerical | C question 3 name | teacher1 | Question 3 text | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Questions" node in "Course administration > Question bank" @javascript diff --git a/question/type/ddimageortext/tests/behat/add.feature b/question/type/ddimageortext/tests/behat/add.feature index 0e758d337df46..29ac279ce64d6 100644 --- a/question/type/ddimageortext/tests/behat/add.feature +++ b/question/type/ddimageortext/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a drag and drop onto image question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_file_upload diff --git a/question/type/ddimageortext/tests/behat/backup_and_restore.feature b/question/type/ddimageortext/tests/behat/backup_and_restore.feature index afe922a38851a..5437d6569c7f4 100644 --- a/question/type/ddimageortext/tests/behat/backup_and_restore.feature +++ b/question/type/ddimageortext/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a drag and drop onto image question | Drag onto image | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a drag and drop onto image question diff --git a/question/type/ddimageortext/tests/behat/edit.feature b/question/type/ddimageortext/tests/behat/edit.feature index b0cc864d0e706..4b9e806210b3d 100644 --- a/question/type/ddimageortext/tests/behat/edit.feature +++ b/question/type/ddimageortext/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a drag and drop onto image questions | questioncategory | qtype | name | template | | Test questions | ddimageortext | Drag onto image | xsection | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript diff --git a/question/type/ddimageortext/tests/behat/export.feature b/question/type/ddimageortext/tests/behat/export.feature index e41a8983a47e8..f0da03a3c2ca1 100644 --- a/question/type/ddimageortext/tests/behat/export.feature +++ b/question/type/ddimageortext/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting drag and drop onto image questions | questioncategory | qtype | name | template | | Test questions | ddimageortext | Drag onto image | xsection | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Export a drag and drop onto image question diff --git a/question/type/ddimageortext/tests/behat/import.feature b/question/type/ddimageortext/tests/behat/import.feature index 9178b216ca7eb..b029f2d551d30 100644 --- a/question/type/ddimageortext/tests/behat/import.feature +++ b/question/type/ddimageortext/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing drag and drop onto image questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import drag and drop onto image question. diff --git a/question/type/ddimageortext/tests/behat/preview.feature b/question/type/ddimageortext/tests/behat/preview.feature index 2e02529801a2e..08906fab267d9 100644 --- a/question/type/ddimageortext/tests/behat/preview.feature +++ b/question/type/ddimageortext/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a drag-drop onto image question | questioncategory | qtype | name | template | | Test questions | ddimageortext | Drag onto image | xsection | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_bug_phantomjs diff --git a/question/type/ddmarker/tests/behat/add.feature b/question/type/ddmarker/tests/behat/add.feature index 00b1fd8e66de4..2224ecfd742e5 100644 --- a/question/type/ddmarker/tests/behat/add.feature +++ b/question/type/ddmarker/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a drag and drop markers question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_file_upload diff --git a/question/type/ddmarker/tests/behat/backup_and_restore.feature b/question/type/ddmarker/tests/behat/backup_and_restore.feature index bff18e20a6277..21a331b588f70 100644 --- a/question/type/ddmarker/tests/behat/backup_and_restore.feature +++ b/question/type/ddmarker/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a drag and drop markers question | Drag markers | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a drag and drop markers question diff --git a/question/type/ddmarker/tests/behat/edit.feature b/question/type/ddmarker/tests/behat/edit.feature index 728e8c98550af..eeae29e476974 100644 --- a/question/type/ddmarker/tests/behat/edit.feature +++ b/question/type/ddmarker/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a drag and drop markers questions | questioncategory | qtype | name | template | | Test questions | ddmarker | Drag markers | mkmap | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript diff --git a/question/type/ddmarker/tests/behat/export.feature b/question/type/ddmarker/tests/behat/export.feature index adbf5290fac35..6e854678c029c 100644 --- a/question/type/ddmarker/tests/behat/export.feature +++ b/question/type/ddmarker/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting drag and drop markers questions | questioncategory | qtype | name | template | | Test questions | ddmarker | Drag markers | mkmap | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Export a drag and drop markers question diff --git a/question/type/ddmarker/tests/behat/import.feature b/question/type/ddmarker/tests/behat/import.feature index 2ce47c4745082..20a2235420b9f 100644 --- a/question/type/ddmarker/tests/behat/import.feature +++ b/question/type/ddmarker/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing drag and drop markers questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import drag and drop markers question. diff --git a/question/type/ddmarker/tests/behat/preview.feature b/question/type/ddmarker/tests/behat/preview.feature index 89425f53f8b90..733a205b88496 100644 --- a/question/type/ddmarker/tests/behat/preview.feature +++ b/question/type/ddmarker/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a drag-drop marker question | questioncategory | qtype | name | template | | Test questions | ddmarker | Drag markers | mkmap | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_bug_phantomjs diff --git a/question/type/ddwtos/tests/behat/add.feature b/question/type/ddwtos/tests/behat/add.feature index e3fcd84851fab..dec424106d165 100644 --- a/question/type/ddwtos/tests/behat/add.feature +++ b/question/type/ddwtos/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a drag and drop into text question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript diff --git a/question/type/ddwtos/tests/behat/backup_and_restore.feature b/question/type/ddwtos/tests/behat/backup_and_restore.feature index 6d3e447040b18..076f1205f208c 100644 --- a/question/type/ddwtos/tests/behat/backup_and_restore.feature +++ b/question/type/ddwtos/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a drag and drop into text question | Drag to text | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a drag and drop into text question diff --git a/question/type/ddwtos/tests/behat/edit.feature b/question/type/ddwtos/tests/behat/edit.feature index 71dea690ba206..8a49c2f1d221a 100644 --- a/question/type/ddwtos/tests/behat/edit.feature +++ b/question/type/ddwtos/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a drag and drop into text questions | questioncategory | qtype | name | template | | Test questions | ddwtos | Drag to text | fox | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript diff --git a/question/type/ddwtos/tests/behat/export.feature b/question/type/ddwtos/tests/behat/export.feature index 0e96d17fd1bfc..04ba39f3e887f 100644 --- a/question/type/ddwtos/tests/behat/export.feature +++ b/question/type/ddwtos/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting drag and drop into text questions | questioncategory | qtype | name | template | | Test questions | ddwtos | Drag to text | fox | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Export a drag and drop into text question diff --git a/question/type/ddwtos/tests/behat/import.feature b/question/type/ddwtos/tests/behat/import.feature index 2e1b96e8d012d..a615ca3278495 100644 --- a/question/type/ddwtos/tests/behat/import.feature +++ b/question/type/ddwtos/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing drag and drop into text questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import drag and drop into text question. diff --git a/question/type/ddwtos/tests/behat/preview.feature b/question/type/ddwtos/tests/behat/preview.feature index f0e8424dcf840..3ac9c59bb8cfc 100644 --- a/question/type/ddwtos/tests/behat/preview.feature +++ b/question/type/ddwtos/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a drag-drop into text question | questioncategory | qtype | name | template | | Test questions | ddwtos | Drag to text | fox | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_bug_phantomjs diff --git a/question/type/description/tests/behat/add.feature b/question/type/description/tests/behat/add.feature index 50cccc600a2f1..b31d1b33e3879 100644 --- a/question/type/description/tests/behat/add.feature +++ b/question/type/description/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a Description question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create a Description question with Correct answer as False diff --git a/question/type/description/tests/behat/backup_and_restore.feature b/question/type/description/tests/behat/backup_and_restore.feature index d7c1079a0af09..7ffe2a663d357 100644 --- a/question/type/description/tests/behat/backup_and_restore.feature +++ b/question/type/description/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a Description question | description-001 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a Description question diff --git a/question/type/description/tests/behat/edit.feature b/question/type/description/tests/behat/edit.feature index 0fee2f4800484..6e1e262aed956 100644 --- a/question/type/description/tests/behat/edit.feature +++ b/question/type/description/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a Description question | questioncategory | qtype | name | template | | Test questions | description | description-001 | info | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Edit a Description question diff --git a/question/type/description/tests/behat/export.feature b/question/type/description/tests/behat/export.feature index 9fa1a622d7244..3cc0edd395e5d 100644 --- a/question/type/description/tests/behat/export.feature +++ b/question/type/description/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting Description questions | questioncategory | qtype | name | template | | Test questions | description | description-001 | info | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export a Description question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/description/tests/behat/import.feature b/question/type/description/tests/behat/import.feature index ee0f1bc4e75f1..f32f7306d356b 100644 --- a/question/type/description/tests/behat/import.feature +++ b/question/type/description/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing Description questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import a Description question. diff --git a/question/type/description/tests/behat/preview.feature b/question/type/description/tests/behat/preview.feature index 4db33536501f0..c6920e749704a 100644 --- a/question/type/description/tests/behat/preview.feature +++ b/question/type/description/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a Description question | questioncategory | qtype | name | template | | Test questions | description | description-001 | info | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/essay/tests/behat/add.feature b/question/type/essay/tests/behat/add.feature index a0accccb1742e..2114e0979bef9 100644 --- a/question/type/essay/tests/behat/add.feature +++ b/question/type/essay/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating an Essay question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create an Essay question with Response format set to 'HTML editor' diff --git a/question/type/essay/tests/behat/backup_and_restore.feature b/question/type/essay/tests/behat/backup_and_restore.feature index e3e3c8a293b63..acb52782f2b39 100644 --- a/question/type/essay/tests/behat/backup_and_restore.feature +++ b/question/type/essay/tests/behat/backup_and_restore.feature @@ -25,7 +25,7 @@ Feature: Test duplicating a quiz containing an Assay question | essay-003 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing 3 Essay questions diff --git a/question/type/essay/tests/behat/edit.feature b/question/type/essay/tests/behat/edit.feature index 3fcff2f0a925d..8faeba7664914 100644 --- a/question/type/essay/tests/behat/edit.feature +++ b/question/type/essay/tests/behat/edit.feature @@ -23,7 +23,7 @@ Feature: Test editing an Essay question | Test questions | essay | essay-002 | editorfilepicker | | Test questions | essay | essay-003 | plain | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Edit an Essay question diff --git a/question/type/essay/tests/behat/export.feature b/question/type/essay/tests/behat/export.feature index 3adfca648efb4..b1460a68c825c 100644 --- a/question/type/essay/tests/behat/export.feature +++ b/question/type/essay/tests/behat/export.feature @@ -23,7 +23,7 @@ Feature: Test exporting Essay questions | Test questions | essay | essay-002 | editorfilepicker | | Test questions | essay | essay-003 | plain | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export 3 Essay questions When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/essay/tests/behat/import.feature b/question/type/essay/tests/behat/import.feature index b7ff3fc3bccc2..f622b429e187a 100644 --- a/question/type/essay/tests/behat/import.feature +++ b/question/type/essay/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing Essay questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import Essay question. diff --git a/question/type/essay/tests/behat/preview.feature b/question/type/essay/tests/behat/preview.feature index 49a4fb0b069ce..81b40f3f71f10 100644 --- a/question/type/essay/tests/behat/preview.feature +++ b/question/type/essay/tests/behat/preview.feature @@ -23,7 +23,7 @@ Feature: Preview Essay questions | Test questions | essay | essay-002 | editorfilepicker | | Test questions | essay | essay-003 | plain | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/gapselect/tests/behat/basic_test.feature b/question/type/gapselect/tests/behat/basic_test.feature index dc095020a9693..72ef720398ebe 100644 --- a/question/type/gapselect/tests/behat/basic_test.feature +++ b/question/type/gapselect/tests/behat/basic_test.feature @@ -17,7 +17,7 @@ Feature: Test all the basic functionality of this question type @javascript Scenario: Create, edit then preview a gapselect question. Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" # Create a new question. diff --git a/question/type/gapselect/tests/behat/import_test.feature b/question/type/gapselect/tests/behat/import_test.feature index 83cc4d7458247..7695b5392e194 100644 --- a/question/type/gapselect/tests/behat/import_test.feature +++ b/question/type/gapselect/tests/behat/import_test.feature @@ -15,7 +15,7 @@ Feature: Import and export select missing words questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: Import and export select missing words questions diff --git a/question/type/match/tests/behat/add.feature b/question/type/match/tests/behat/add.feature index 8d8ed5b0b09fa..50a67f2f9f017 100644 --- a/question/type/match/tests/behat/add.feature +++ b/question/type/match/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a Matching question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create a Matching question with 3 subquestions diff --git a/question/type/match/tests/behat/backup_and_restore.feature b/question/type/match/tests/behat/backup_and_restore.feature index 3ea996afb4a4f..d04f626dea78c 100644 --- a/question/type/match/tests/behat/backup_and_restore.feature +++ b/question/type/match/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a Matching question | matching-001 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a Matching question diff --git a/question/type/match/tests/behat/edit.feature b/question/type/match/tests/behat/edit.feature index e052ccaddf6c4..ce144ecb69480 100644 --- a/question/type/match/tests/behat/edit.feature +++ b/question/type/match/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a Matching question | questioncategory | qtype | name | template | | Test questions | match | Matching for editing | foursubq | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/match/tests/behat/export.feature b/question/type/match/tests/behat/export.feature index ae4a54139e88b..0dff7bde7e3a4 100644 --- a/question/type/match/tests/behat/export.feature +++ b/question/type/match/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting Matching questions | questioncategory | qtype | name | template | | Test questions | match | matching-001 | foursubq | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export a Matching question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/match/tests/behat/import.feature b/question/type/match/tests/behat/import.feature index 1658d057f4ecd..2471c19911cff 100644 --- a/question/type/match/tests/behat/import.feature +++ b/question/type/match/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing Matching questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import Matching question. diff --git a/question/type/match/tests/behat/preview.feature b/question/type/match/tests/behat/preview.feature index f2a67545d9dbd..15b166a8df15f 100644 --- a/question/type/match/tests/behat/preview.feature +++ b/question/type/match/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a Matching question | questioncategory | qtype | name | template | | Test questions | match | matching-001 | foursubq | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/multichoice/tests/behat/add.feature b/question/type/multichoice/tests/behat/add.feature index 6151c9ea2da1c..6faf884573524 100644 --- a/question/type/multichoice/tests/behat/add.feature +++ b/question/type/multichoice/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a Multiple choice question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create a Multiple choice question with multiple response diff --git a/question/type/multichoice/tests/behat/backup_and_restore.feature b/question/type/multichoice/tests/behat/backup_and_restore.feature index a5e4bb66d2b53..a9991082d40ad 100644 --- a/question/type/multichoice/tests/behat/backup_and_restore.feature +++ b/question/type/multichoice/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a Multiple choice question | Multi-choice-001 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a Multiple choice question diff --git a/question/type/multichoice/tests/behat/edit.feature b/question/type/multichoice/tests/behat/edit.feature index b906b956cfbcf..1e409d73d53cb 100644 --- a/question/type/multichoice/tests/behat/edit.feature +++ b/question/type/multichoice/tests/behat/edit.feature @@ -22,7 +22,7 @@ Feature: Test editing a Multiple choice question | Test questions | multichoice | Multiple choice for editing | two_of_four | | Test questions | multichoice | Single choice for editing | one_of_four | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Edit a Multiple choice question with multiple response (checkboxes) diff --git a/question/type/multichoice/tests/behat/export.feature b/question/type/multichoice/tests/behat/export.feature index bfa00fa055651..3af15d5cba109 100644 --- a/question/type/multichoice/tests/behat/export.feature +++ b/question/type/multichoice/tests/behat/export.feature @@ -22,7 +22,7 @@ Feature: Test exporting Multiple choice questions | Test questions | multichoice | Multi-choice-001 | two_of_four | | Test questions | multichoice | Multi-choice-002 | one_of_four | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export a Multiple choice question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/multichoice/tests/behat/import.feature b/question/type/multichoice/tests/behat/import.feature index a241237c1389f..0facf8872e5c3 100644 --- a/question/type/multichoice/tests/behat/import.feature +++ b/question/type/multichoice/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing Multiple choice questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import Multiple choice question. diff --git a/question/type/multichoice/tests/behat/preview.feature b/question/type/multichoice/tests/behat/preview.feature index e3f5b5e7115d3..dfef1f65bf52c 100644 --- a/question/type/multichoice/tests/behat/preview.feature +++ b/question/type/multichoice/tests/behat/preview.feature @@ -22,7 +22,7 @@ Feature: Preview a Multiple choice question | Test questions | multichoice | Multi-choice-001 | two_of_four | | Test questions | multichoice | Multi-choice-002 | one_of_four | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/shortanswer/tests/behat/add.feature b/question/type/shortanswer/tests/behat/add.feature index d5e61b13f5a43..53a561f315711 100644 --- a/question/type/shortanswer/tests/behat/add.feature +++ b/question/type/shortanswer/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a Short answer question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create a Short answer question diff --git a/question/type/shortanswer/tests/behat/backup_and_restore.feature b/question/type/shortanswer/tests/behat/backup_and_restore.feature index 707ca47507ebd..ada612789ce82 100644 --- a/question/type/shortanswer/tests/behat/backup_and_restore.feature +++ b/question/type/shortanswer/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a Short answer question | shortanswer-001 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a Short answer question diff --git a/question/type/shortanswer/tests/behat/edit.feature b/question/type/shortanswer/tests/behat/edit.feature index 4e30dba0aaa1a..08e5c399a3233 100644 --- a/question/type/shortanswer/tests/behat/edit.feature +++ b/question/type/shortanswer/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a Short answer question | questioncategory | qtype | name | template | | Test questions | shortanswer | shortanswer-001 for editing | frogtoad | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/shortanswer/tests/behat/export.feature b/question/type/shortanswer/tests/behat/export.feature index d8f1f91b2e2d1..29eae716e6e63 100644 --- a/question/type/shortanswer/tests/behat/export.feature +++ b/question/type/shortanswer/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting Short answer questions | questioncategory | qtype | name | template | | Test questions | shortanswer | shortanswer-001 | frogtoad | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export a Short answer question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/shortanswer/tests/behat/import.feature b/question/type/shortanswer/tests/behat/import.feature index c13649a555954..ea7b9b517eeb4 100644 --- a/question/type/shortanswer/tests/behat/import.feature +++ b/question/type/shortanswer/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing Short answer questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import Matching question. diff --git a/question/type/shortanswer/tests/behat/preview.feature b/question/type/shortanswer/tests/behat/preview.feature index 30441075720df..29f5fe5e1dbe6 100644 --- a/question/type/shortanswer/tests/behat/preview.feature +++ b/question/type/shortanswer/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a Short answer question | questioncategory | qtype | name | template | | Test questions | shortanswer | shortanswer-001 | frogtoad | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/question/type/truefalse/tests/behat/add.feature b/question/type/truefalse/tests/behat/add.feature index ea36b1da2e5f0..58778c435184f 100644 --- a/question/type/truefalse/tests/behat/add.feature +++ b/question/type/truefalse/tests/behat/add.feature @@ -15,7 +15,7 @@ Feature: Test creating a True/False question | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Create a True/False question with Correct answer as False diff --git a/question/type/truefalse/tests/behat/backup_and_restore.feature b/question/type/truefalse/tests/behat/backup_and_restore.feature index 4779062332a9a..d1800923e644f 100644 --- a/question/type/truefalse/tests/behat/backup_and_restore.feature +++ b/question/type/truefalse/tests/behat/backup_and_restore.feature @@ -21,7 +21,7 @@ Feature: Test duplicating a quiz containing a True/False question | true-false-001 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" @javascript Scenario: Backup and restore a course containing a True/False question diff --git a/question/type/truefalse/tests/behat/edit.feature b/question/type/truefalse/tests/behat/edit.feature index 4d9a8c98650e3..e35bc4f787df6 100644 --- a/question/type/truefalse/tests/behat/edit.feature +++ b/question/type/truefalse/tests/behat/edit.feature @@ -21,7 +21,7 @@ Feature: Test editing a True/False question | questioncategory | qtype | name | template | | Test questions | truefalse | true-false-001 | true | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" Scenario: Edit a True/False question diff --git a/question/type/truefalse/tests/behat/export.feature b/question/type/truefalse/tests/behat/export.feature index 48d54bc90a4e1..041e89970fc15 100644 --- a/question/type/truefalse/tests/behat/export.feature +++ b/question/type/truefalse/tests/behat/export.feature @@ -21,7 +21,7 @@ Feature: Test exporting True/False questions | questioncategory | qtype | name | template | | Test questions | truefalse | true-false-001 | true | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" Scenario: Export a True/False question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/truefalse/tests/behat/import.feature b/question/type/truefalse/tests/behat/import.feature index dd6c183d3e501..592f9c39a86e5 100644 --- a/question/type/truefalse/tests/behat/import.feature +++ b/question/type/truefalse/tests/behat/import.feature @@ -15,7 +15,7 @@ Feature: Test importing True/False questions | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" @javascript @_file_upload Scenario: import a True/False question. diff --git a/question/type/truefalse/tests/behat/preview.feature b/question/type/truefalse/tests/behat/preview.feature index d109a0807ca87..976ab3a5e97e0 100644 --- a/question/type/truefalse/tests/behat/preview.feature +++ b/question/type/truefalse/tests/behat/preview.feature @@ -21,7 +21,7 @@ Feature: Preview a Trtue/False question | questioncategory | qtype | name | template | | Test questions | truefalse | true-false-001 | true | Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Question bank" node in "Course administration" @javascript @_switch_window diff --git a/report/log/tests/behat/filter_log.feature b/report/log/tests/behat/filter_log.feature index 419a27f7af2a8..4df98072efc8f 100644 --- a/report/log/tests/behat/filter_log.feature +++ b/report/log/tests/behat/filter_log.feature @@ -24,7 +24,7 @@ Feature: In a report, admin can filter log data And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | And I follow "Home" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I click on "Log in as" "link" @@ -44,7 +44,7 @@ Feature: In a report, admin can filter log data @javascript Scenario: Filter log report for standard log reader - Given I follow "Course 1" + Given I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I click on "Log in as" "link" @@ -65,9 +65,9 @@ Feature: In a report, admin can filter log data And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | And I follow "Home" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Home" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" And I click on "Log in as" "link" diff --git a/report/log/tests/behat/filter_log_actions.feature b/report/log/tests/behat/filter_log_actions.feature index 39bde8cad3f10..44e765da5a0a9 100644 --- a/report/log/tests/behat/filter_log_actions.feature +++ b/report/log/tests/behat/filter_log_actions.feature @@ -10,14 +10,14 @@ Feature: In a report, admin can filter log data by action | Course 1 | C1 | 0 | 1 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on # Create Action. And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 | | Description | Offline text | | assignsubmission_file_enabled | 0 | - And I follow "Course 1" + And I am on course page "Course 1" # View Action. And I follow "Test assignment 1" # Update Action. diff --git a/report/log/tests/behat/user_log.feature b/report/log/tests/behat/user_log.feature index 1e3f80ee0c21b..db5e05e5f4ff8 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -17,7 +17,7 @@ Feature: User can view activity log. | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | @@ -26,7 +26,7 @@ Feature: User can view activity log. | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -37,7 +37,7 @@ Feature: User can view activity log. @javascript Scenario: View Todays' and all log report for user Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" When I follow "Today's logs" @@ -53,7 +53,7 @@ Feature: User can view activity log. And I click on "Disable" "link" in the "Standard log" "table_row" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 1" When I follow "Today's logs" diff --git a/report/loglive/tests/behat/loglive_report.feature b/report/loglive/tests/behat/loglive_report.feature index 7820c1ea0167b..4f44fd37c6683 100644 --- a/report/loglive/tests/behat/loglive_report.feature +++ b/report/loglive/tests/behat/loglive_report.feature @@ -14,7 +14,7 @@ Feature: In a report, admin can see loglive data And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Database" to section "3" and I fill the form with: | Name | Test name | @@ -39,10 +39,10 @@ Feature: In a report, admin can see loglive data And I wait to be redirected And I should not see "Test name2" And I press "Pause live updates" - And I follow "Course module created" + And I am on course page "Course module created" And I switch to "action" window And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Database" to section "3" and I fill the form with: | Name | Test name2 | | Description | Test database description | @@ -62,10 +62,10 @@ Feature: In a report, admin can see loglive data And I wait to be redirected And I should not see "Test name2" And I press "Pause live updates" - And I follow "course_add mod" + And I am on course page "Course_add mod" And I switch to "action" window And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I add a "Database" to section "3" and I fill the form with: | Name | Test name2 | | Description | Test database description | diff --git a/report/outline/tests/behat/outline.feature b/report/outline/tests/behat/outline.feature index 6361b6b4bc31d..f507c561e8a7a 100644 --- a/report/outline/tests/behat/outline.feature +++ b/report/outline/tests/behat/outline.feature @@ -20,7 +20,7 @@ Feature: View an outline report | student2 | C1 | student | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Forum name | @@ -37,17 +37,17 @@ Feature: View an outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Activity report" node in "Course administration > Reports" Then I should see "2 by 2 users" in the "Book name" "table_row" And I should see "1 by 1 users" in the "Forum name" "table_row" @@ -58,18 +58,18 @@ Feature: View an outline report And "Disable" "link" should exist in the "Standard log" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Activity report" node in "Course administration > Reports" Then I should see "2 by 2 users" in the "Book name" "table_row" And I should see "1 by 1 users" in the "Forum name" "table_row" @@ -82,17 +82,17 @@ Feature: View an outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Book name" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Activity report" node in "Course administration > Reports" Then I should see "2 by 2 users" in the "Book name" "table_row" And I should see "1 by 1 users" in the "Forum name" "table_row" @@ -102,23 +102,23 @@ Feature: View an outline report And "Enable" "link" should exist in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Activity report" node in "Course administration > Reports" Then I should see "No log reader enabled" Scenario: Multiple views from a single user are identified as not distinct Given I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" And I am on site homepage And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Activity report" node in "Course administration > Reports" Then I should see "3 by 1 users" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" @@ -126,25 +126,25 @@ Feature: View an outline report Scenario: Multiple views from multiple users are identified as not distinct Given I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" And I am on site homepage And I log out And I log in as "student2" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Forum name" And I am on site homepage And I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Activity report" node in "Course administration > Reports" Then I should see "6 by 2 users" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" @@ -152,7 +152,7 @@ Feature: View an outline report Scenario: No views from any users Given I log out When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Activity report" node in "Course administration > Reports" Then I should see "-" in the "Forum name" "table_row" And I should see "-" in the "Book name" "table_row" diff --git a/report/outline/tests/behat/user.feature b/report/outline/tests/behat/user.feature index 98ade5ea365cc..41933a61198d7 100644 --- a/report/outline/tests/behat/user.feature +++ b/report/outline/tests/behat/user.feature @@ -18,7 +18,7 @@ Feature: View the user page for the outline report | student1 | C1 | student | When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "1" and I fill the form with: | Name | Folder name | @@ -36,13 +36,13 @@ Feature: View the user page for the outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "URL name" And I follow "URL name" @@ -64,13 +64,13 @@ Feature: View the user page for the outline report And "Disable" "link" should exist in the "Standard log" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "URL name" And I follow "URL name" @@ -94,13 +94,13 @@ Feature: View the user page for the outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" And I follow "Folder name" - And I follow "Course 1" + And I am on course page "Course 1" # We want to view this multiple times, to make sure the count is working. And I follow "URL name" And I follow "URL name" diff --git a/report/participation/tests/behat/filter_participation.feature b/report/participation/tests/behat/filter_participation.feature index 31dfcb1404925..1c9a230ff5c9e 100644 --- a/report/participation/tests/behat/filter_participation.feature +++ b/report/participation/tests/behat/filter_participation.feature @@ -17,7 +17,7 @@ Feature: In a participation report, admin can filter student actions | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book name | @@ -38,12 +38,12 @@ Feature: In a participation report, admin can filter student actions | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book name" And I log out When I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Course participation" node in "Course administration > Reports" And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" @@ -60,7 +60,7 @@ Feature: In a participation report, admin can filter student actions | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book name" And I log out And I log in as "admin" @@ -68,12 +68,12 @@ Feature: In a participation report, admin can filter student actions And I click on "Enable" "link" in the "Standard log" "table_row" And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book name" And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Course participation" node in "Course administration > Reports" And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" @@ -83,12 +83,12 @@ Feature: In a participation report, admin can filter student actions @javascript Scenario: Filter participation report when only standard log reader is enabled by default Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book name" And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to "Course participation" node in "Course administration > Reports" And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" diff --git a/report/participation/tests/behat/message_participants.feature b/report/participation/tests/behat/message_participants.feature index 72da3f338cc97..dee871625df45 100644 --- a/report/participation/tests/behat/message_participants.feature +++ b/report/participation/tests/behat/message_participants.feature @@ -21,7 +21,7 @@ Feature: Use the particiaption report to message groups of students | student2 | C1 | student | | student3 | C1 | student | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book name | @@ -32,13 +32,13 @@ Feature: Use the particiaption report to message groups of students | Content | Test chapter content | And I log out And I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I follow "Test book name" And I log out Scenario: Message students who have not participated in book Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course participation" node in "Course administration > Reports" And I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" @@ -60,7 +60,7 @@ Feature: Use the particiaption report to message groups of students | messaging | 0 | And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Course participation" node in "Course administration > Reports" When I set the field "instanceid" to "Test book name" And I set the field "roleid" to "Student" diff --git a/repository/recent/tests/behat/add_recent.feature b/repository/recent/tests/behat/add_recent.feature index f5666a919b5a4..9c98831b190ed 100644 --- a/repository/recent/tests/behat/add_recent.feature +++ b/repository/recent/tests/behat/add_recent.feature @@ -15,7 +15,7 @@ Feature: Recent files repository lists the recently used files And I upload "lib/tests/fixtures/upload_users.csv" file to "Files" filemanager And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "Folder" to section "1" And I set the following fields to these values: diff --git a/repository/tests/behat/cancel_add_file.feature b/repository/tests/behat/cancel_add_file.feature index 3207b097f1454..ca81f6901473e 100644 --- a/repository/tests/behat/cancel_add_file.feature +++ b/repository/tests/behat/cancel_add_file.feature @@ -14,7 +14,7 @@ Feature: A selected file can be cancelled And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on When I add a "Folder" to section "1" And I set the following fields to these values: diff --git a/repository/tests/behat/create_folders.feature b/repository/tests/behat/create_folders.feature index 60c635a885afc..0d4c1e667e506 100644 --- a/repository/tests/behat/create_folders.feature +++ b/repository/tests/behat/create_folders.feature @@ -11,7 +11,7 @@ Feature: Create folders in the file manager | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "0" And I set the following fields to these values: diff --git a/repository/tests/behat/create_shortcut.feature b/repository/tests/behat/create_shortcut.feature index 944bd5249cf51..0edce0634a25f 100644 --- a/repository/tests/behat/create_shortcut.feature +++ b/repository/tests/behat/create_shortcut.feature @@ -21,7 +21,7 @@ Feature: Create shortcuts Then I should see "empty.txt" in the "div.fp-content" "css_element" And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "1" And I set the following fields to these values: diff --git a/repository/tests/behat/overwrite_file.feature b/repository/tests/behat/overwrite_file.feature index 91c19c8209931..2859291baf1fc 100644 --- a/repository/tests/behat/overwrite_file.feature +++ b/repository/tests/behat/overwrite_file.feature @@ -29,7 +29,7 @@ Feature: Overwrite file feature And I should see "2" elements in "Files" filemanager And I press "Save changes" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "1" And I set the following fields to these values: diff --git a/repository/tests/behat/zip_and_unzip.feature b/repository/tests/behat/zip_and_unzip.feature index 270c3491b2f55..b2288fc5ed164 100644 --- a/repository/tests/behat/zip_and_unzip.feature +++ b/repository/tests/behat/zip_and_unzip.feature @@ -11,7 +11,7 @@ Feature: Zip folders and unzip compressed files | Course 1 | C1 | 0 | And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I turn editing mode on And I add a "Folder" to section "0" And I set the following fields to these values: diff --git a/theme/boost/tests/behat/contextmenu.feature b/theme/boost/tests/behat/contextmenu.feature index 71dbbf5ef80c6..3cffde0843bf7 100644 --- a/theme/boost/tests/behat/contextmenu.feature +++ b/theme/boost/tests/behat/contextmenu.feature @@ -18,7 +18,7 @@ Feature: Context settings menu Scenario: Teacher can use the context settings menu And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I click on ".context-header-settings-menu [role=button]" "css_element" And I choose "Edit settings" in the open action menu And I should see "Edit course settings" @@ -27,6 +27,6 @@ Feature: Context settings menu Scenario: Student cannot use the context settings menu And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And ".context-header-settings-menu [role=button]" "css_element" should not exist And I log out diff --git a/theme/boost/tests/behat/regionmainsettingsmenu.feature b/theme/boost/tests/behat/regionmainsettingsmenu.feature index 654582f25282b..35a96a2f44a61 100644 --- a/theme/boost/tests/behat/regionmainsettingsmenu.feature +++ b/theme/boost/tests/behat/regionmainsettingsmenu.feature @@ -21,7 +21,7 @@ Feature: Region main settings menu Scenario: Teacher can use the region main settings menu And I log in as "teacher1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "#region-main-settings-menu [role=button]" "css_element" should not exist And I follow "Choice name" And I click on "#region-main-settings-menu [role=button]" "css_element" @@ -36,7 +36,7 @@ Feature: Region main settings menu Scenario: Student cannot use all options in the region main settings menu And I log in as "student1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And "#region-main-settings-menu [role=button]" "css_element" should not exist And I follow "Choice name" And "#region-main-settings-menu [role=button]" "css_element" should not exist diff --git a/user/tests/behat/course_preference.feature b/user/tests/behat/course_preference.feature index 7ad8e59d800dd..bd84abbd7d069 100644 --- a/user/tests/behat/course_preference.feature +++ b/user/tests/behat/course_preference.feature @@ -10,7 +10,7 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s | admin | C1 | editingteacher | And I am on site homepage And I follow "Preferences" in the user menu - And I follow "Course preferences" + And I am on course page "Course preferences" @javascript Scenario: As a user, "activity chooser" should be the default. @@ -18,7 +18,7 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s Given the field "enableactivitychooser" matches value "1" # See that the "activity chooser" is actually shown by default in course page. When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Add an activity or resource" in the "Topic 1" "section" And I turn editing mode on Then I should see "Add an activity or resource" in the "Topic 1" "section" @@ -29,7 +29,7 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s Given I set the field "enableactivitychooser" to "0" And I press "Save changes" When I am on homepage - And I follow "Course 1" + And I am on course page "Course 1" And I should not see "Add a resource..." in the "Topic 1" "section" And I turn editing mode on Then I should see "Add a resource..." in the "Topic 1" "section" diff --git a/user/tests/behat/set_default_homepage.feature b/user/tests/behat/set_default_homepage.feature index 2b4c074153497..d31d8c7add046 100644 --- a/user/tests/behat/set_default_homepage.feature +++ b/user/tests/behat/set_default_homepage.feature @@ -27,12 +27,12 @@ Feature: Set the site home page and dashboard as the default home page And I am on site homepage And I follow "Make this my default home page" And I should not see "Make this my default home page" - And I follow "Course 1" + And I am on course page "Course 1" And "Home" "text" should exist in the ".breadcrumb-nav" "css_element" And I am on site homepage And I follow "Dashboard" And I follow "Make this my default home page" And I should not see "Make this my default home page" And I am on site homepage - When I follow "Course 1" + When I am on course page "Course 1" Then "Dashboard" "text" should exist in the ".breadcrumb-nav" "css_element" diff --git a/user/tests/behat/user_grade_navigation.feature b/user/tests/behat/user_grade_navigation.feature index 78ca61543d8c8..f08557d17c9fe 100644 --- a/user/tests/behat/user_grade_navigation.feature +++ b/user/tests/behat/user_grade_navigation.feature @@ -28,7 +28,7 @@ Feature: The student can navigate to their grades page and user grade report. | assign | C1 | a3 | Test assignment three | Submit something! | 150 | | assign | C2 | a4 | Test assignment four | Submit something! | 150 | And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "View > Grader report" in the course gradebook 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" diff --git a/user/tests/behat/view_full_profile.feature b/user/tests/behat/view_full_profile.feature index 2c900650786eb..e5ddf56274520 100644 --- a/user/tests/behat/view_full_profile.feature +++ b/user/tests/behat/view_full_profile.feature @@ -24,19 +24,19 @@ Feature: Access to full profiles of users Scenario: Viewing full profiles with default settings When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" # Another student's full profile is not visible And I navigate to course participants And I follow "Student 2" Then I should not see "Full profile" # Teacher's full profile is visible - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Teacher 1" And I follow "Full profile" And I should see "First access to site" # Own full profile is visible - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I click on "Student 1" "link" in the "#participants" "css_element" And I follow "Full profile" @@ -47,7 +47,7 @@ Feature: Access to full profiles of users Given the following config values are set as admin: | forceloginforprofiles | 0 | When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 2" And I follow "Full profile" @@ -59,7 +59,7 @@ Feature: Access to full profiles of users | moodle/user:viewdetails | Allow | And I log out When I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 2" And I follow "Full profile" @@ -92,7 +92,7 @@ Feature: Access to full profiles of users Scenario: View full profiles of someone in the same group in a course with separate groups. Given I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Group mode | Separate groups | @@ -107,7 +107,7 @@ Feature: Access to full profiles of users And I log out And I log in as "admin" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: diff --git a/user/tests/behat/view_participants.feature b/user/tests/behat/view_participants.feature index 5ff52829419e0..00cc040dbc55c 100644 --- a/user/tests/behat/view_participants.feature +++ b/user/tests/behat/view_participants.feature @@ -57,7 +57,7 @@ Feature: View course participants @javascript Scenario: Use select and deselect all buttons Given I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants When I press "Select all" Then the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1" @@ -109,7 +109,7 @@ Feature: View course participants | user | course | role | | student20 | C1 | student | When I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Surname" And I press "Select all users on this page" diff --git a/user/tests/behat/view_preferences_page.feature b/user/tests/behat/view_preferences_page.feature index 2271953c58277..010f79e8f2d47 100644 --- a/user/tests/behat/view_preferences_page.feature +++ b/user/tests/behat/view_preferences_page.feature @@ -27,13 +27,13 @@ Feature: Access to preferences page Scenario: A student and teacher with normal permissions can not view another user's permissions page. Given I log in as "student1" - And I follow "Course 1" + And I am on course page "Course 1" And I navigate to course participants And I follow "Student 2" And I should not see "Preferences" in the "region-main" "region" And I log out And I log in as "teacher1" - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to course participants And I follow "Student 2" Then I should not see "Preferences" in the "region-main" "region" @@ -41,14 +41,14 @@ Feature: Access to preferences page 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 am on course page "Course 1" And I navigate to course participants And I follow "Student 2" And I should see "Preferences" in the "region-main" "region" And I log out And I log in as "manager1" And I am on site homepage - And I follow "Course 1" + And I am on course page "Course 1" When I navigate to course participants And I follow "Student 2" Then I should see "Preferences" in the "region-main" "region"