diff --git a/admin/roles/tests/behat/override_roles_highlighting.feature b/admin/roles/tests/behat/override_roles_highlighting.feature index f2eac7b969c..8fa6f0fd191 100644 --- a/admin/roles/tests/behat/override_roles_highlighting.feature +++ b/admin/roles/tests/behat/override_roles_highlighting.feature @@ -9,11 +9,10 @@ Feature: Highlight non-inherited permissions | fullname | shortname | | Course fullname | C_shortname | And I log in as "admin" - And I am on site homepage @javascript Scenario: Override a permission - Given I am on course page "Course fullname" + Given I am on "Course fullname" course homepage 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 a7f3e5a1037..97b5b20b8e2 100644 --- a/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature +++ b/admin/tool/availabilityconditions/tests/behat/manage_conditions.feature @@ -49,9 +49,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Page" to section "1" And I expand all fieldsets And I click on "Add restriction..." "button" diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 692974841ad..d8a325b2714 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -57,7 +57,7 @@ Feature: Set up contextual data for tests | Grouping 1 | C1 | GG1 | | Grouping 2 | C1 | GG2 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Users > Groups" in current page administration Then I should see "Group 1" And I should see "Group 2" @@ -86,7 +86,7 @@ Feature: Set up contextual data for tests | mod/forum:editanypost | Allow | student | Course | C1 | | mod/forum:replynews | Prevent | editingteacher | Course | C1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -106,7 +106,7 @@ Feature: Set up contextual data for tests | user | course | role | | student1 | C1 | student | When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage Then I should see "Topic 1" Scenario: Add role assigns @@ -142,20 +142,20 @@ Feature: Set up contextual data for tests Then "Edit settings" "link" should exist in current page administration And I log out And I log in as "user2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage And I should see "You can not enrol yourself in this course." Scenario: Add modules @@ -193,7 +193,7 @@ Feature: Set up contextual data for tests | activity | name | intro | course | idnumber | grade | | assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage Then I should see "Test assignment name" # Assignment 2.2 module type is disabled by default # And I should see "Test assignment22 name" @@ -254,7 +254,7 @@ Feature: Set up contextual data for tests | grouping | group | | GG1 | G1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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)" @@ -313,7 +313,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -336,7 +336,7 @@ Feature: Set up contextual data for tests | Test Grade Item 2 | C1 | Grade category 1 | | Test Grade Item 3 | C1 | Grade sub category 2 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -364,7 +364,7 @@ Feature: Set up contextual data for tests | name | scale | | Test Scale 1 | Disappointing, Good, Very good, Excellent | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -385,7 +385,7 @@ Feature: Set up contextual data for tests And the following config values are set as admin: | enableoutcomes | 1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -413,7 +413,7 @@ Feature: Set up contextual data for tests And the following config values are set as admin: | enableoutcomes | 1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -430,5 +430,5 @@ Feature: Set up contextual data for tests | blockname | contextlevel | reference | pagetypepattern | defaultregion | | online_users | Course | C1 | course-view-* | site-pre | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 fcc2e2dd09b..1e15acc262f 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 bba0d7afb13..5de8e0a0c86 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +45,7 @@ Feature: Edit capabilities Scenario: Module capabilities overrides Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | I'm the name | | Description | I'm the introduction | 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 1096700b980..151a59deb43 100644 --- a/admin/tool/behat/tests/behat/get_and_set_fields.feature +++ b/admin/tool/behat/tests/behat/get_and_set_fields.feature @@ -33,7 +33,7 @@ Feature: Verify that all form fields values can be get and set | activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible | | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Reset" node in "Course administration" # Select (multi-select) - Checking "the select box should contain". And I expand all fieldsets @@ -47,8 +47,7 @@ Feature: Verify that all form fields values can be get and set And the "Unenrol users" select box should not contain "President" 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 course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test this one" And I press "Create page" # Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values". @@ -98,7 +97,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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 | @@ -113,7 +112,7 @@ Feature: Verify that all form fields values can be get and set And the field "one" matches value "1" And the field "two" matches value "" # Check if field xpath set/match works. - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -126,7 +125,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 am on course page "Course 1" + Then I am on "Course 1" course homepage 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" @@ -138,7 +137,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 163eb4df29f..85f52de84de 100644 --- a/admin/tool/behat/tests/behat/manipulate_forms.feature +++ b/admin/tool/behat/tests/behat/manipulate_forms.feature @@ -23,9 +23,7 @@ Feature: Forms manipulation | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Quiz" to section "1" When I expand all fieldsets Then I should see "Close the quiz" diff --git a/admin/tool/filetypes/tests/behat/add_filetypes.feature b/admin/tool/filetypes/tests/behat/add_filetypes.feature index 94de7ae0f28..5c464bacaa9 100644 --- a/admin/tool/filetypes/tests/behat/add_filetypes.feature +++ b/admin/tool/filetypes/tests/behat/add_filetypes.feature @@ -120,9 +120,7 @@ Feature: Add customised file types | Custom description | Froggy file | And I press "Save changes" # Create a resource activity and add it to a course - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "File" to section "1" And I set the following fields to these values: | Name | An example of customised file type | diff --git a/admin/tool/monitor/tests/behat/rule.feature b/admin/tool/monitor/tests/behat/rule.feature index a85dee7bcf3..a38a75d3090 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -45,8 +45,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +65,7 @@ Feature: tool_monitor_rule Scenario: Delete a rule on course level Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +75,7 @@ Feature: tool_monitor_rule Scenario: Edit a rule on course level Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +94,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on course level Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +153,7 @@ Feature: tool_monitor_rule Scenario: Duplicate a rule on site level Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 4277fddd5ff..2766705faaa 100644 --- a/admin/tool/monitor/tests/behat/subscription.feature +++ b/admin/tool/monitor/tests/behat/subscription.feature @@ -22,7 +22,7 @@ Feature: tool_monitor_subscriptions And I log in as "admin" And I navigate to "Event monitoring rules" node in "Site administration > Reports" And I click on "Enable" "link" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -131,7 +131,7 @@ Feature: tool_monitor_subscriptions And I follow "Subscribe to rule \"New rule course level\"" And I should see "Subscription successfully created" And "#toolmonitorsubs_r0" "css_element" should exist - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 9066468e72b..7df1cb2b866 100644 --- a/admin/tool/recyclebin/tests/behat/backup_user_data.feature +++ b/admin/tool/recyclebin/tests/behat/backup_user_data.feature @@ -23,8 +23,7 @@ Feature: Backup user data @javascript Scenario: Delete and restore a quiz with user data Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Quiz 1 | | Description | Test quiz description | @@ -44,7 +43,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Quiz 1" And I press "Attempt quiz now" And I click on "True" "radio" in the "First question" "question" @@ -55,8 +54,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I delete "Quiz 1" activity And I run all adhoc tasks And I navigate to "Recycle bin" node in "Course administration" @@ -64,7 +62,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 877a249b683..26a00960514 100644 --- a/admin/tool/recyclebin/tests/behat/basic_functionality.feature +++ b/admin/tool/recyclebin/tests/behat/basic_functionality.feature @@ -25,8 +25,7 @@ Feature: Basic recycle bin functionality Scenario: Restore a deleted assignment Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign | | Description | Test | @@ -37,8 +36,7 @@ Feature: Basic recycle bin functionality And I click on "Restore" "link" in the "region-main" "region" And I should see "'Test assign' has been restored" And I wait to be redirected - And I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Test assign" in the "Topic 1" "section" Scenario: Restore a deleted course @@ -64,8 +62,7 @@ Feature: Basic recycle bin functionality @javascript Scenario: Deleting a single item from the recycle bin Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign | | Description | Test | @@ -84,8 +81,7 @@ Feature: Basic recycle bin functionality @javascript Scenario: Deleting all the items from the recycle bin Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assign 1 | | Description | Test 1 | diff --git a/admin/tool/uploaduser/tests/behat/upload_users.feature b/admin/tool/uploaduser/tests/behat/upload_users.feature index f90acd27cbe..e217cf13765 100644 --- a/admin/tool/uploaduser/tests/behat/upload_users.feature +++ b/admin/tool/uploaduser/tests/behat/upload_users.feature @@ -33,7 +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 course page "Maths" + And I am on "Maths" course homepage And I navigate to "Users > Groups" in current page administration And I set the field "groups" to "Section 1 (1)" And the "members" select box should contain "Tom Jones" diff --git a/admin/tool/usertours/tests/behat/create_tour.feature b/admin/tool/usertours/tests/behat/create_tour.feature index 33c7db7cc77..6a5f152d9f6 100644 --- a/admin/tool/usertours/tests/behat/create_tour.feature +++ b/admin/tool/usertours/tests/behat/create_tour.feature @@ -20,7 +20,7 @@ Feature: Add a new user tour | Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful | And I add steps to the "First tour" tour: | targettype | targetvalue_block | Title | Content | - | Block | Course overview | Course overview | This area shows you what's happening in some of your courses | + | Block | My overview | My overview | This area shows you what's happening in some of your courses | | Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here | And I add steps to the "First tour" tour: | targettype | targetvalue_selector | Title | Content | diff --git a/admin/tool/usertours/tests/behat/tour_filter.feature b/admin/tool/usertours/tests/behat/tour_filter.feature index ff33cad2ce0..46f226a9c06 100644 --- a/admin/tool/usertours/tests/behat/tour_filter.feature +++ b/admin/tool/usertours/tests/behat/tour_filter.feature @@ -46,17 +46,14 @@ Feature: Apply tour filters to a tour | Display in middle of page | Welcome | Welcome to your course tour.| And I log out And I log in as "editor1" - And I am on site homepage - When I am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8f78271ae1c..a57094fb26a 100644 --- a/availability/condition/completion/tests/behat/availability_completion.feature +++ b/availability/condition/completion/tests/behat/availability_completion.feature @@ -21,8 +21,7 @@ Feature: availability_completion Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add a Page with a completion tickbox. And I add a "Page" to section "1" and I fill the form with: @@ -47,7 +46,7 @@ Feature: availability_completion # Log back in as student. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 b780de4abd2..f0b80941f86 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 505e73d9da1..b4ba1475658 100644 --- a/availability/condition/date/tests/behat/availability_date.feature +++ b/availability/condition/date/tests/behat/availability_date.feature @@ -21,8 +21,7 @@ Feature: availability_date Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add a Page with a date condition that does match (from the past). And I add a "Page" to section "1" @@ -54,7 +53,7 @@ Feature: availability_date # Log back in as student. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 39f9304ccc1..a9845257a9c 100644 --- a/availability/condition/grade/tests/behat/availability_grade.feature +++ b/availability/condition/grade/tests/behat/availability_grade.feature @@ -21,8 +21,7 @@ Feature: availability_grade Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add an assignment. And I add a "Assignment" to section "1" and I fill the form with: @@ -70,7 +69,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 am on course page "Course 1" + And I am on "Course 1" course homepage # Add a Page with a grade condition for 10%. And I add a "Page" to section "4" @@ -90,7 +89,7 @@ Feature: availability_grade # Log in as student without a grade yet. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # Do the assignment. And I follow "A1" @@ -108,7 +107,7 @@ Feature: availability_grade # Log back in as teacher. When I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # Give the assignment 40%. And I follow "A1" @@ -123,7 +122,7 @@ Feature: availability_grade # Log back in as student. And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 40d78de3a52..ceae232b520 100644 --- a/availability/condition/group/tests/behat/availability_group.feature +++ b/availability/condition/group/tests/behat/availability_group.feature @@ -21,8 +21,7 @@ Feature: availability_group Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Start to add a Page. If there aren't any groups, there's no Group option. And I add a "Page" to section "1" @@ -38,7 +37,7 @@ Feature: availability_group | G2 | C1 | GI2 | # 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 course page "Course 1" + And I am on "Course 1" course homepage And I add a "Page" to section "1" And I expand all fieldsets And I click on "Add restriction..." "button" @@ -83,7 +82,7 @@ Feature: availability_group # Log back in as student. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # No pages should appear yet. Then I should not see "P1" in the "region-main" "region" @@ -96,7 +95,7 @@ Feature: availability_group | student1 | GI1 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 a17ecb0afa5..91f4d045d57 100644 --- a/availability/condition/grouping/tests/behat/availability_grouping.feature +++ b/availability/condition/grouping/tests/behat/availability_grouping.feature @@ -27,8 +27,7 @@ Feature: availability_grouping Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Start to add a Page. If there aren't any groupings, there's no Grouping option. And I add a "Page" to section "1" @@ -40,7 +39,7 @@ Feature: availability_grouping # Back to course page but add groups. # 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 course page "Course 1" + And I am on "Course 1" course homepage And the following "groupings" exist: | name | course | idnumber | | GX1 | C1 | GXI1 | @@ -76,7 +75,7 @@ Feature: availability_grouping # Log back in as student. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # No pages should appear yet. Then I should not see "P1" in the "region-main" "region" @@ -88,7 +87,7 @@ Feature: availability_grouping | grouping | group | | GXI1 | GI1 | And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 f4c1e0affe7..682f59f761f 100644 --- a/availability/condition/profile/tests/behat/availability_profile.feature +++ b/availability/condition/profile/tests/behat/availability_profile.feature @@ -21,8 +21,7 @@ Feature: availability_profile Scenario: Test condition # Basic setup. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add And I add a "Page" to section "1" @@ -55,7 +54,7 @@ Feature: availability_profile # Log back in as student. When I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # I see P1 but not P2. Then I should see "P1" in the "region-main" "region" @@ -80,8 +79,7 @@ Feature: availability_profile And I click on "Update profile" "button" # Set Page activity which has requirement on this field. - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Page" to section "1" And I set the following fields to these values: | Name | P1 | @@ -106,5 +104,5 @@ Feature: availability_profile # Log out and back in as student. Should be able to see activity. And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 808d4285393..60e7150b1e2 100644 --- a/availability/tests/behat/display_availability.feature +++ b/availability/tests/behat/display_availability.feature @@ -39,8 +39,7 @@ Feature: display_availability Scenario: Activity availability display # Set up. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add a Page with 1 restriction. When I add a "Page" to section "1" @@ -101,7 +100,7 @@ Feature: display_availability # Change to student view. Given I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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" @@ -121,8 +120,7 @@ Feature: display_availability Scenario: Section availability display # Set up. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Add a restriction to section 1 (visible to students). When I edit the section "1" @@ -144,7 +142,7 @@ Feature: display_availability And I press "Save changes" # This is necessary because otherwise it fails in Chrome, see MDL-44959 - And I am on course page "Course 1" + And I am on "Course 1" course homepage # Add Pages to each section. And I add a "Page" to section "1" and I fill the form with: @@ -168,7 +166,7 @@ Feature: display_availability # Change to student view. Given I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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 fdc4cd60dd2..ce0392e715a 100644 --- a/availability/tests/behat/edit_availability.feature +++ b/availability/tests/behat/edit_availability.feature @@ -32,8 +32,7 @@ Feature: edit_availability Given the following config values are set as admin: | enableavailability | 0 | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Page" to section "1" Then "Restrict access" "fieldset" should not exist @@ -44,7 +43,7 @@ Feature: edit_availability And the following config values are set as admin: | enableavailability | 1 | - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I add a "Page" to section "1" Then "Restrict access" "fieldset" should exist @@ -56,10 +55,7 @@ Feature: edit_availability Scenario: Edit availability using settings in activity form # Set up. Given I log in as "teacher1" - 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 + And I am on "Course 1" course homepage with editing mode on And I add a "Page" to section "1" And I expand all fieldsets Then I should see "None" in the "Restrict access" "fieldset" @@ -147,8 +143,7 @@ Feature: edit_availability Scenario: Edit availability using settings in section form # Set up. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Edit a section When I edit the section "1" @@ -168,8 +163,7 @@ Feature: edit_availability Given the following config values are set as admin: | enableavailability | 0 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" When I expand all fieldsets Then "Add group/grouping access restriction" "button" should not exist @@ -181,8 +175,7 @@ Feature: edit_availability | name | course | idnumber | | GX1 | C1 | GXI1 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" And I set the following fields to these values: | Forum name | MyForum | diff --git a/backup/util/ui/tests/behat/duplicate_activities.feature b/backup/util/ui/tests/behat/duplicate_activities.feature index 6b2cb8b4e57..1207eb77b15 100644 --- a/backup/util/ui/tests/behat/duplicate_activities.feature +++ b/backup/util/ui/tests/behat/duplicate_activities.feature @@ -15,8 +15,7 @@ Feature: Duplicate activities | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Database" to section "1" and I fill the form with: | Name | Test database name | | Description | Test database description | diff --git a/backup/util/ui/tests/behat/import_course.feature b/backup/util/ui/tests/behat/import_course.feature index ef285716946..5adde7f3d8e 100644 --- a/backup/util/ui/tests/behat/import_course.feature +++ b/backup/util/ui/tests/behat/import_course.feature @@ -17,8 +17,7 @@ Feature: Import course's contents into another course | teacher1 | C1 | editingteacher | | teacher1 | C2 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Database" to section "1" and I fill the form with: | Name | Test database name | | Description | Test database description | diff --git a/backup/util/ui/tests/behat/import_groups.feature b/backup/util/ui/tests/behat/import_groups.feature index 5bed8bc629e..32ff5d1904e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2db95c75d54..b02e25bd314 100644 --- a/backup/util/ui/tests/behat/restore_moodle2_courses.feature +++ b/backup/util/ui/tests/behat/restore_moodle2_courses.feature @@ -15,8 +15,7 @@ Feature: Restore Moodle 2 course backups | assign | C3 | assign1 | Test assign name | Assign description | 1 | | data | C3 | data1 | Test database name | Database description | 2 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -62,7 +61,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 17791c2857c..a14040a739b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course Badge" + And I follow "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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -156,8 +156,7 @@ Feature: Award badges And I follow "Profile" in the user menu 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -177,7 +176,7 @@ Feature: Award badges | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +191,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -211,8 +210,7 @@ Feature: Award badges And I follow "Profile" in the user menu 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +240,7 @@ Feature: Award badges | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # Create course badge 1. And I navigate to "Add a new badge" node in "Course administration > Badges" And I follow "Add a new badge" @@ -325,7 +323,7 @@ Feature: Award badges | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +343,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 am on course page "Course Badge" + And I follow "Course Badge" Then I should see "Recipients (2)" And I follow "Recipients (2)" And I press "Award badge" @@ -353,5 +351,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 am on course page "Course Badge" + And I follow "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 5dd47ae289a..2f24252aa8d 100644 --- a/blocks/activity_modules/tests/behat/block_activity_modules.feature +++ b/blocks/activity_modules/tests/behat/block_activity_modules.feature @@ -110,48 +110,47 @@ Feature: Block activity modules When I log in as "admin" And I am on course index - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Chats" "link" in the "Activities" "block" And I should see "Test chat name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Choices" "link" in the "Activities" "block" And I should see "Test choice name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Databases" "link" in the "Activities" "block" And I should see "Test database name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Feedback" "link" in the "Activities" "block" And I should see "Test feedback name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Forums" "link" in the "Activities" "block" And I should see "Test forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "External tools" "link" in the "Activities" "block" And I should see "Test lti name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Quizzes" "link" in the "Activities" "block" And I should see "Test quiz name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Glossaries" "link" in the "Activities" "block" And I should see "Test glossary name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "SCORM packages" "link" in the "Activities" "block" And I should see "Test scorm name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Lessons" "link" in the "Activities" "block" And I should see "Test lesson name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Wikis" "link" in the "Activities" "block" And I should see "Test wiki name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I click on "Workshop" "link" in the "Activities" "block" And I should see "Test workshop name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 4e917d709a6..3191e13411d 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -25,30 +25,29 @@ Feature: The activity results block displays student scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Configure the block on a non-graded activity to show 3 high scores Given I follow "Test page name" @@ -84,19 +83,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d28476d0e3c..0570dbddfea 100644 --- a/blocks/activity_results/tests/behat/addunconfiguredblock.feature +++ b/blocks/activity_results/tests/behat/addunconfiguredblock.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Add the block to a the course Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/addunsupportedactivity.feature b/blocks/activity_results/tests/behat/addunsupportedactivity.feature index 14d7784ac8f..5103f23804c 100644 --- a/blocks/activity_results/tests/behat/addunsupportedactivity.feature +++ b/blocks/activity_results/tests/behat/addunsupportedactivity.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Try to configure the block to use an activity without grades Given I add a "Assignment" to section "1" and I fill the form with: diff --git a/blocks/activity_results/tests/behat/defaultsettings.feature b/blocks/activity_results/tests/behat/defaultsettings.feature index f7d0a442fc0..3af9d0e39fc 100644 --- a/blocks/activity_results/tests/behat/defaultsettings.feature +++ b/blocks/activity_results/tests/behat/defaultsettings.feature @@ -24,13 +24,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add the "Activity results" block When I configure the "Activity results" block And the following fields match these values: @@ -48,13 +47,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 81511ce70ac..eb750a05aa0 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -25,13 +25,12 @@ Feature: The activity results block displays student high scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +39,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 191933ee058..2a8bcf99fd0 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -25,22 +25,21 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c295748ef6f..95008623b02 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -42,15 +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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | @@ -58,7 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +67,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Try to configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -83,7 +82,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Student 1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" @@ -104,7 +103,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +124,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +145,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 bb53eb673df..ccc223db26d 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -42,14 +42,13 @@ Feature: The activity results block displays student in separate groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -89,7 +88,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +106,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Student 1" in the "Activity results" "block" And I should see "100.00" in the "Activity results" "block" @@ -130,7 +129,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +153,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +177,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +199,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +221,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 576b8ff5a1d..11ee5a579a4 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -42,14 +42,13 @@ Feature: The activity results block displays student in visible groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -87,7 +86,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +102,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" @@ -120,7 +119,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +139,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +159,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +179,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +197,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5dfa377eb5b..f632d95e1db 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -25,13 +25,12 @@ Feature: The activity results block displays student low scores | student4 | C1 | student | | student5 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +39,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 dadd85504d8..8885d70202d 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -25,22 +25,21 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 64a59a7b56b..a8967146169 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -42,15 +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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment | | Description | Offline text | @@ -58,7 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +67,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Try to configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -83,7 +82,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Student 6" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" @@ -102,7 +101,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +121,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +141,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 71500e4a876..264eb8fa3f0 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -42,14 +42,13 @@ Feature: The activity results block displays students in separate groups scores | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -89,7 +88,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +106,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Student 6" in the "Activity results" "block" And I should see "70.00" in the "Activity results" "block" @@ -128,7 +127,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +149,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +171,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +192,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +213,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b8488ca3141..46525007998 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -42,14 +42,13 @@ Feature: The activity results block displays student in visible groups low score | student5 | G3 | | student6 | G3 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -87,7 +86,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +102,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" @@ -124,7 +123,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +141,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +159,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +177,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +194,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5c8a2337acc..6586d5fa62d 100644 --- a/blocks/badges/tests/behat/block_badges.feature +++ b/blocks/badges/tests/behat/block_badges.feature @@ -21,14 +21,12 @@ Feature: Enable Block Badges in a course without badges | enablebadges | 0 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 88415ab560a..33fe576425c 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 am on course page "Course 1" + And I am on "Course 1" course homepage # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: @@ -54,16 +54,14 @@ Feature: Enable Block Badges in a course Scenario: Add the recent badges block to a course. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Latest badges" block Then I should see "Badge 1" in the "Latest badges" "block" And I should see "Badge 2" in the "Latest badges" "block" 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Latest badges" block And I configure the "Latest badges" block And I set the following fields to these values: diff --git a/blocks/badges/tests/behat/block_badges_dashboard.feature b/blocks/badges/tests/behat/block_badges_dashboard.feature index 6240fe4efda..2928bf3508f 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 am on course page "Course 1" + And I am on "Course 1" course homepage # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I 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 edb484b4a39..d1daf80c63b 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 am on course page "Course 1" + And I am on "Course 1" course homepage # Issue badge 1 of 2 And I navigate to "Add a new badge" node in "Course administration > Badges" And I 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 87b516f92d7..419406b29fc 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu.feature @@ -21,8 +21,7 @@ Feature: Enable Block blog menu in a course | enableblogs | 0 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blogging is disabled!" in the "Blog menu" "block" @@ -32,8 +31,7 @@ Feature: Enable Block blog menu in a course | useblogassociations | 0 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" @@ -47,8 +45,7 @@ Feature: Enable Block blog menu in a course | useblogassociations | 1 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog entries" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" @@ -62,8 +59,7 @@ Feature: Enable Block blog menu in a course | enablerssfeeds | 0 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should not see "Blog RSS feed" in the "Blog menu" "block" And I should see "Add a new entry" in the "Blog menu" "block" @@ -74,8 +70,7 @@ Feature: Enable Block blog menu in a course | enablerssfeeds | 1 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Blog menu" block Then I should see "Blog RSS feed" in the "Blog menu" "block" And I should see "Add a new entry" 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 bfe252cee78..9a342d231c4 100644 --- a/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature +++ b/blocks/blog_menu/tests/behat/block_blog_menu_activity.feature @@ -19,8 +19,7 @@ Feature: Enable Block blog menu in an activity | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add a new entry" When I set the following fields to these values: @@ -40,7 +39,7 @@ Feature: Enable Block blog menu in an activity And I press "Save changes" Then I should see "S1 First Blog" And I should see "This is my awesome blog!" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Blog entries" And I should see "S1 First Blog" @@ -48,7 +47,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -60,7 +59,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -70,7 +69,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -80,7 +79,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" When I follow "View my entries about this Assignment" Then I should see "S2 First Blog" @@ -89,7 +88,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -101,7 +100,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -111,7 +110,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -121,7 +120,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" When I follow "View all entries about this Assignment" Then I should see "S1 First Blog" @@ -130,7 +129,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -142,7 +141,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -152,7 +151,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -162,7 +161,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" When I follow "Blog entries" Then I should see "S2 First Blog" @@ -171,7 +170,7 @@ Feature: Enable Block blog menu in an activity Scenario: Teacher searches for student blogs Given I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -183,7 +182,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add a new entry" And I set the following fields to these values: @@ -193,7 +192,7 @@ Feature: Enable Block blog menu in an activity And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Assignment: Test assignment 1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" And I set the following fields to these values: @@ -205,7 +204,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 97abb5d67a2..39821d29276 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,13 @@ Feature: Students can use block blog menu in a course | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add a new entry" When I set the following fields to these values: | Entry title | S1 First Blog | @@ -34,14 +33,14 @@ Feature: Students can use block blog menu in a course And I press "Save changes" Then I should see "S1 First Blog" And I should see "This is my awesome blog!" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -52,7 +51,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -61,7 +60,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -70,7 +69,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "View my entries about this course" Then I should see "S2 First Blog" And I should not see "S2 Second Blog" @@ -78,7 +77,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -89,7 +88,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -98,7 +97,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -107,7 +106,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "View all entries for this course" Then I should see "S1 First Blog" And I should see "S2 First Blog" @@ -115,7 +114,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -126,7 +125,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -135,7 +134,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -144,7 +143,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 First Blog" And I should see "My course blog is better!" And I should see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Blog entries" Then I should see "S2 First Blog" And I should see "S2 Second Blog" @@ -152,7 +151,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S1 First Blog | @@ -163,7 +162,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add a new entry" And I set the following fields to these values: | Entry title | S2 Second Blog | @@ -172,7 +171,7 @@ Feature: Students can use block blog menu in a course And I should see "S2 Second Blog" And I should see "My unrelated blog!" And I should not see "Associated Course: C1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" And I set the following fields to these values: | Entry title | S2 First Blog | @@ -183,7 +182,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e5c15081dfd..ccb4c64efb3 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent.feature @@ -21,14 +21,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 dae2c8c2ae9..09112b7162c 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent_activity.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -32,7 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +47,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment 1" And I follow "Add an entry about this Assignment" # Blog 1 of 5 @@ -106,8 +105,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test assignment 1" And I configure the "Recent blog entries" block And I set the following fields to these values: 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 7bf2e3af5ed..67ee460cfff 100644 --- a/blocks/blog_recent/tests/behat/block_blog_recent_course.feature +++ b/blocks/blog_recent/tests/behat/block_blog_recent_course.feature @@ -17,15 +17,14 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Blog menu" block And I add the "Recent blog entries" block And I log out Scenario: Students use the recent blog entries block to view blogs Given I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +39,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Add an entry about this course" # Blog 1 of 5 And I set the following fields to these values: @@ -97,8 +96,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I configure the "Recent blog entries" block And I set the following fields to these values: | id_config_numberofrecentblogentries | 2 | diff --git a/blocks/blog_tags/tests/behat/blogtag.feature b/blocks/blog_tags/tests/behat/blogtag.feature index c6b06b3fe39..8cf6b27804a 100644 --- a/blocks/blog_tags/tests/behat/blogtag.feature +++ b/blocks/blog_tags/tests/behat/blogtag.feature @@ -21,8 +21,7 @@ Feature: Adding blog tag block | teacher1 | c1 | editingteacher | | student1 | c1 | student | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Blog tags" block # TODO MDL-57120 site "Blogs" link not accessible without navigation block. And I add the "Navigation" block if not present @@ -37,7 +36,7 @@ Feature: Adding blog tag block And I press "Save changes" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 7503e3ae834..db6f058c71a 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Calendar" block Then I should see "Events key" in the "Calendar" "block" @@ -34,8 +33,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Calendar" block And I hover over today in the calendar Then I should see "Site Event" @@ -48,13 +46,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Hide global events" And I hover over today in the calendar Then I should not see "Site Event" @@ -63,31 +60,29 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | When I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Hide course events" And I hover over today in the calendar Then I should not see "Course Event" @@ -96,32 +91,30 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I create a calendar event with form data: | id_eventtype | User | | id_name | User Event | When I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Hide user events" And I hover over today in the calendar Then I should not see "User Event" @@ -138,7 +131,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +145,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I hover over today in the calendar And I should not see "Group Event" @@ -172,7 +165,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +176,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e87bd084e8c..23605721544 100644 --- a/blocks/calendar_month/tests/behat/block_calendar_month_course.feature +++ b/blocks/calendar_month/tests/behat/block_calendar_month_course.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Calendar" block And I hover over today in the calendar And I should see "Site Event" diff --git a/blocks/comments/tests/behat/add_comment.feature b/blocks/comments/tests/behat/add_comment.feature index d400237f6ae..02f73f41047 100644 --- a/blocks/comments/tests/behat/add_comment.feature +++ b/blocks/comments/tests/behat/add_comment.feature @@ -17,12 +17,11 @@ Feature: Add a comment to the comments block | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Comments" block And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage @javascript Scenario: Add a comment with Javascript enabled @@ -69,7 +68,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d8006741bce..4aa94bdded0 100644 --- a/blocks/comments/tests/behat/block_comment_activity.feature +++ b/blocks/comments/tests/behat/block_comment_activity.feature @@ -20,15 +20,14 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9ee5143399b..3589da498e0 100644 --- a/blocks/comments/tests/behat/block_comment_course.feature +++ b/blocks/comments/tests/behat/block_comment_course.feature @@ -17,13 +17,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 52421fcead2..f8939f42ae3 100644 --- a/blocks/comments/tests/behat/delete_comment.feature +++ b/blocks/comments/tests/behat/delete_comment.feature @@ -18,16 +18,15 @@ Feature: Delete comment block messages | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Comments" block And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I add "Comment from student1" comment to comments block And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 f01348eee87..f5e24a149d8 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Enable completion tracking | No | @@ -30,8 +29,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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,8 +38,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature index 111ff15e5ef..a92c042bd1f 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_activity_completion.feature @@ -22,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -38,14 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" And I navigate to "Edit settings" in current page administration And I set the following fields to these values: @@ -60,13 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 bc3c00c032c..c0219148769 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block And I navigate to "Course completion" node in "Course administration" And I expand all fieldsets @@ -31,12 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +45,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +53,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block And I navigate to "Course completion" node in "Course administration" And I expand all fieldsets @@ -66,18 +64,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +84,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +94,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 1570bac6fc7..d9b73c5eeb9 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_self.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Course completion status" block And I add the "Self completion" block And I navigate to "Course completion" node in "Course administration" @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -39,7 +38,7 @@ Feature: Enable Block Completion in a course using manual self completion # should be created before the task runs. And I wait "1" seconds And I run the scheduled task "core\task\completion_regular_task" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 ebb64e40232..3c03721f725 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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 393da8e1c40..8a14d9ef7bf 100644 --- a/blocks/course_list/tests/behat/block_course_list_course.feature +++ b/blocks/course_list/tests/behat/block_course_list_course.feature @@ -27,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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" @@ -39,21 +38,18 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Courses" block Then I should see "Miscellaneous" in the "Course categories" "block" And I should see "Category 1" in the "Course categories" "block" @@ -68,8 +64,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Courses" block Then I should not see "All courses" in the "My courses" "block" @@ -80,9 +75,7 @@ Feature: Enable the course_list block on a course page and view it's contents | user | course | role | | admin | C1 | editingteacher | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Courses" block Then I should not see "Miscellaneous" in the "My courses" "block" And I should not see "Category 1" 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 42211ed53a6..f31ae948072 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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 02189f140da..b10cf27e1cc 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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 e8ff436e6d9..3b4b32cdd07 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,20 @@ Feature: Course summary block used in a course | student1 | C101 | student | | teacher1 | C101 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 73eebd0abfa..423c1952fae 100644 --- a/blocks/glossary_random/tests/behat/glossary_random.feature +++ b/blocks/glossary_random/tests/behat/glossary_random.feature @@ -19,13 +19,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage And "block_glossary_random" "block" should not exist And I log out @@ -34,8 +33,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block And I set the following fields to these values: @@ -45,14 +43,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +59,7 @@ Feature: Random glossary entry block is used in a course | Concept | Concept2 | | Definition | Definition2 | And I press "Save changes" - And I am on course page "Course 1" + And I am on "Course 1" course homepage # 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,8 +76,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block And I set the following fields to these values: @@ -89,18 +86,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4d3b0b728c7..33297029893 100644 --- a/blocks/glossary_random/tests/behat/glossary_random_global.feature +++ b/blocks/glossary_random/tests/behat/glossary_random_global.feature @@ -23,7 +23,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 course page "Course 2" + And I am on "Course 2" course homepage And I follow "Tips and Tricks" And I press "Add a new entry" And I set the following fields to these values: @@ -33,8 +33,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block And I set the following fields to these values: @@ -48,7 +47,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -56,8 +55,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Random glossary entry" block And I configure the "block_glossary_random" block And I set the following fields to these values: @@ -67,15 +65,15 @@ Feature: Random glossary entry block linking to global glossary And I press "Save changes" And I log out And I log in as "admin" - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 a31d6262cab..08e233e6416 100644 --- a/blocks/html/tests/behat/course_block.feature +++ b/blocks/html/tests/behat/course_block.feature @@ -17,8 +17,7 @@ Feature: HTML blocks in a course | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "HTML" block And I configure the "(new HTML block)" block And I set the field "Content" to "First block content" @@ -31,6 +30,6 @@ Feature: HTML blocks in a course And I press "Save changes" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 a7ac54d24a8..63dd4a511a3 100644 --- a/blocks/messages/tests/behat/block_messages_course.feature +++ b/blocks/messages/tests/behat/block_messages_course.feature @@ -21,15 +21,13 @@ 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 am on course page "Course 1" - When I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" - When I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Messages" block Then I should see "No messages" in the "Messages" "block" @@ -41,20 +39,18 @@ 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 am on course page "Course 1" - When I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Messages" block Then I should see "Student 1" in the "Messages" "block" @javascript Scenario: Use the block to send a message to a user. Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 fd229d04ee2..bc0f704946e 100644 --- a/blocks/myprofile/tests/behat/block_myprofile_activity.feature +++ b/blocks/myprofile/tests/behat/block_myprofile_activity.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" When I add the "Logged in user" block Then I should see "Teacher One" in 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 8be34f6354a..c0aa2db0ccf 100644 --- a/blocks/myprofile/tests/behat/block_myprofile_course.feature +++ b/blocks/myprofile/tests/behat/block_myprofile_course.feature @@ -15,7 +15,6 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 bf7da766574..683c34ad41a 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 0cbf8616e96..dfc75eeadc8 100644 --- a/blocks/news_items/tests/behat/display_news.feature +++ b/blocks/news_items/tests/behat/display_news.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Latest announcements" block And I turn editing mode off When I add a new topic to "Announcements" forum with: @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2e147e265ad..22591be631e 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,19 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2d6c7c9a944..aeb75be704c 100644 --- a/blocks/participants/tests/behat/block_participants_course.feature +++ b/blocks/participants/tests/behat/block_participants_course.feature @@ -15,20 +15,19 @@ Feature: People Block used in a course | user | course | role | | student1 | C101 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -38,5 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 389b837922d..fb8437712f1 100644 --- a/blocks/private_files/tests/behat/block_private_files_activity.feature +++ b/blocks/private_files/tests/behat/block_private_files_activity.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test page name" And I add the "Private files" block And I should see "No files available" in 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 b086353b824..35a4e9629cc 100644 --- a/blocks/private_files/tests/behat/block_private_files_course.feature +++ b/blocks/private_files/tests/behat/block_private_files_course.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Private files" block And I should see "No files available" in the "Private files" "block" When I follow "Manage private files..." diff --git a/blocks/recent_activity/tests/behat/structural_changes.feature b/blocks/recent_activity/tests/behat/structural_changes.feature index 8195b2ee118..b8efe202229 100644 --- a/blocks/recent_activity/tests/behat/structural_changes.feature +++ b/blocks/recent_activity/tests/behat/structural_changes.feature @@ -47,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block When I add a "Forum" to section "1" and I fill the form with: | name | ForumVisibleGroups | @@ -100,7 +99,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +110,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +121,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +133,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +143,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I add a "Forum" to section "1" and I fill the form with: | name | ForumNew | @@ -155,7 +153,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +161,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +171,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +180,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,15 +189,14 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I delete "ForumUpdated" activity And I run all adhoc tasks And I log out And I wait "1" seconds # Students 1 and 2 see that forum was deleted And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +206,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ba59a4e1ea3..e2e37d27dc6 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage When I set the following fields to these values: | searchform_search | Moodle | And I press "Go" @@ -36,12 +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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add a new topic to "Announcements" forum with: | Subject | My subject | | Message | My message | - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Announcements" And I navigate to "Edit settings" in current page administration And I expand all fieldsets @@ -49,7 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage And "Search forums" "block" should exist And I set the following fields to these values: | searchform_search | message | @@ -58,13 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e677a5a48b8..140a11d0509 100644 --- a/blocks/section_links/tests/behat/block_section_links_course.feature +++ b/blocks/section_links/tests/behat/block_section_links_course.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "5" and I fill the form with: | Assignment name | Test assignment 1 | | Description | Offline text | diff --git a/blocks/social_activities/tests/behat/edit_activities.feature b/blocks/social_activities/tests/behat/edit_activities.feature index 4b496d082cd..f0808c18f98 100644 --- a/blocks/social_activities/tests/behat/edit_activities.feature +++ b/blocks/social_activities/tests/behat/edit_activities.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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" And I press "Save and return to course" @@ -41,8 +40,7 @@ Feature: Edit activities in social activities block | allowstealth | 1 | And I log out And I log in as "user1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I set the field "Add an activity to section 'section 0'" to "Forum" And I set the field "Forum name" to "My forum name" @@ -81,7 +79,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 394ab3adff2..6a8bd414895 100644 --- a/blocks/tags/tests/behat/tagcloud.feature +++ b/blocks/tags/tests/behat/tagcloud.feature @@ -35,12 +35,11 @@ Feature: Block tags displaying tag cloud Scenario: Add Tags block in a course When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Tags" block And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 292120a0316..4fadd478b79 100644 --- a/blocks/tests/behat/add_blocks.feature +++ b/blocks/tests/behat/add_blocks.feature @@ -17,8 +17,7 @@ Feature: Add blocks | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 188bda64b9d..40ae8db05ec 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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,8 +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 am on course page "Course 1" - And I follow "Turn editing on" + And I am on "Course 1" course homepage with editing mode on And I add the "Search forums" block Then I should see "Assign roles in Search forums block" @@ -71,4 +70,4 @@ Feature: Add and configure blocks throughout the site | Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" | | Content | Example | When I press "Save changes" - Then I should see "Course overview" + Then I should see "My overview" diff --git a/blocks/tests/behat/hidden_block_region.feature b/blocks/tests/behat/hidden_block_region.feature index 7fa1a8ee552..e41f9f26917 100644 --- a/blocks/tests/behat/hidden_block_region.feature +++ b/blocks/tests/behat/hidden_block_region.feature @@ -12,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Search forums" block And I add the "Latest announcements" block And I add the "Upcoming events" block diff --git a/blocks/tests/behat/hide_blocks.feature b/blocks/tests/behat/hide_blocks.feature index 0af55b49108..db11e3f529d 100644 --- a/blocks/tests/behat/hide_blocks.feature +++ b/blocks/tests/behat/hide_blocks.feature @@ -9,8 +9,7 @@ Feature: Block visibility | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Hiding all blocks on the page should remove the column they're in diff --git a/blocks/tests/behat/manage_blocks.feature b/blocks/tests/behat/manage_blocks.feature index 340c4afe094..19b0fc6bcc8 100644 --- a/blocks/tests/behat/manage_blocks.feature +++ b/blocks/tests/behat/manage_blocks.feature @@ -15,9 +15,7 @@ Feature: Block appearances | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I follow "Turn editing on" + And I am on "Course 1" course homepage with editing mode on And I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | | Survey type | ATTLS (20 item version) | @@ -32,8 +30,7 @@ Feature: Block appearances And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I follow "Turn editing on" + And I am on "Course 1" course homepage with editing mode on And I add the "Comments" block And I configure the "Comments" block And I set the following fields to these values: @@ -43,7 +40,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 49fac620d36..6a312cec5c2 100644 --- a/blocks/tests/behat/move_blocks.feature +++ b/blocks/tests/behat/move_blocks.feature @@ -15,9 +15,7 @@ Feature: Block region moving | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I follow "Turn editing on" + And I am on "Course 1" course homepage with editing mode on And I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | | Survey type | ATTLS (20 item version) | @@ -32,8 +30,7 @@ Feature: Block region moving And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I follow "Turn editing on" + And I am on "Course 1" course homepage with editing mode on And I add the "Comments" block And I configure the "Comments" block And I set the following fields to these values: diff --git a/blocks/tests/behat/restrict_available_blocks.feature b/blocks/tests/behat/restrict_available_blocks.feature index 6907fd96d95..581d0f84f77 100644 --- a/blocks/tests/behat/restrict_available_blocks.feature +++ b/blocks/tests/behat/restrict_available_blocks.feature @@ -17,8 +17,7 @@ Feature: Allowed blocks controls Scenario: Blocks can be added with the default permissions Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add the "Course completion status" block And I add the "Activities" block Then I should see "Activities" in the "Activities" "block" @@ -28,13 +27,12 @@ Feature: Allowed blocks controls Given I log in as "admin" And I set the following system permissions of "Teacher" role: | block/activity_modules:addinstance | Prohibit | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 a9028073599..79c4b97a904 100644 --- a/blocks/tests/behat/return_block_original_state.feature +++ b/blocks/tests/behat/return_block_original_state.feature @@ -9,8 +9,7 @@ Feature: The context of a block can always be returned to it's original state. | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - When I am on course page "Course 1" - And I follow "Turn editing on" + When I am on "Course 1" course homepage with editing mode on And I add the "Tags" block Then I should see "Tags" in the "Tags" "block" And I navigate to course participants @@ -18,7 +17,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Assignment1 | | Description | Description | @@ -28,11 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And "Tags" "block" should not exist And I navigate to course participants And "Tags" "block" should not exist - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Assignment2 | | Description | Description | @@ -42,7 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5087b477576..f4bae300fc0 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 fb366e4025d..81689dbef7c 100644 --- a/calendar/tests/behat/calendar.feature +++ b/calendar/tests/behat/calendar.feature @@ -24,8 +24,7 @@ Feature: Perform basic calendar functionality | user | group | | student1 | G1 | When I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Calendar" block Scenario: Create a site event @@ -35,7 +34,7 @@ Feature: Perform basic calendar functionality | Description | Come join this awesome event, sucka! | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "This month" And I should see "Really awesome event!" And I log out @@ -50,7 +49,7 @@ Feature: Perform basic calendar functionality | Description | Come join this awesome event, sucka! | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "This month" And I should see "Really awesome event!" And I log out @@ -66,7 +65,7 @@ Feature: Perform basic calendar functionality | Description | Come join this awesome event | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "This month" And I follow "Really awesome event!" And "Group 1" "text" should exist in the ".eventlist" "css_element" @@ -82,7 +81,7 @@ Feature: Perform basic calendar functionality | Description | Come join this awesome event, sucka! | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 dc0b16b4f1b..819d03e2b30 100644 --- a/calendar/tests/behat/calendar_lookahead.feature +++ b/calendar/tests/behat/calendar_lookahead.feature @@ -17,8 +17,7 @@ Feature: Limit displayed upcoming events And I log in as "teacher1" Scenario: I view calendar details for a future event - Given I follow "C1" - And I turn editing mode on + Given I am on "Course 1" course homepage with editing mode on And I add the "Calendar" block And I add the "Upcoming events" block And I follow "This month" @@ -36,6 +35,5 @@ Feature: Limit displayed upcoming events | Upcoming events look-ahead | 3 months | And I press "Save changes" And I wait to be redirected - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 858bd36a501..946bd04b849 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Enrolled users" node in "Course administration > Users" And I should see "student@example.com" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -74,7 +74,7 @@ Feature: Access visible and hidden cohorts Scenario: System manager can see all cohorts defined in the above contexts When I log in as "user1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -100,7 +100,7 @@ Feature: Access visible and hidden cohorts Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above When I log in as "user2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 023d872cca0..1b1edb4086a 100644 --- a/cohort/tests/behat/upload_cohort_users.feature +++ b/cohort/tests/behat/upload_cohort_users.feature @@ -15,10 +15,10 @@ Feature: Upload users to a cohort | Course 1 | C1 | 0 | | Course 2 | C2 | 0 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I add "Cohort sync" enrolment method with: | Cohort | Cohort 1 | - And I am on course page "Course 2" + And I am on "Course 2" course homepage And I add "Cohort sync" enrolment method with: | Cohort | Cohort 2 | When I navigate to "Upload users" node in "Site administration > Users > Accounts" @@ -34,12 +34,12 @@ Feature: Upload users to a cohort And I click on "Assign" "link" in the "Cohort 2" "table_row" 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 course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 2" + And I am on "Course 2" course homepage 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 6d9a0068144..87363d25037 100644 --- a/completion/tests/behat/enable_manual_complete_mark.feature +++ b/completion/tests/behat/enable_manual_complete_mark.feature @@ -18,9 +18,7 @@ Feature: Allow students to manually mark an activity as complete | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -31,13 +29,11 @@ Feature: Allow students to manually mark an activity as complete And "Student First" user has not completed "Test forum name" activity And I log out And I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Reports > Activity completion" in current page administration And "Student First" user has completed "Test forum name" activity diff --git a/completion/tests/behat/restrict_activity_by_date.feature b/completion/tests/behat/restrict_activity_by_date.feature index 7f6b126d314..551243d8e5d 100644 --- a/completion/tests/behat/restrict_activity_by_date.feature +++ b/completion/tests/behat/restrict_activity_by_date.feature @@ -17,9 +17,7 @@ Feature: Restrict activity availability through date conditions | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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" And I expand all fieldsets @@ -39,8 +37,7 @@ Feature: Restrict activity availability through date conditions And I press "Save and return to course" And I log out When I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -64,6 +61,5 @@ Feature: Restrict activity availability through date conditions And I press "Save and return to course" And I log out When I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 5706d957fca..3d6a6cdd11d 100644 --- a/completion/tests/behat/restrict_activity_by_grade.feature +++ b/completion/tests/behat/restrict_activity_by_grade.feature @@ -18,9 +18,7 @@ Feature: Restrict activity availability through grade conditions | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - #And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Grade assignment | | Description | Grade this assignment to revoke restriction on restricted assignment | @@ -41,8 +39,7 @@ Feature: Restrict activity availability through grade conditions And I press "Save and return to course" And I log out When I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -54,8 +51,7 @@ Feature: Restrict activity availability through grade conditions And I should see "Submitted for grading" And I log out And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -66,7 +62,6 @@ Feature: Restrict activity availability through grade conditions And I follow "Edit settings" And I log out And I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 58dfa275caa..63d8422abea 100644 --- a/completion/tests/behat/restrict_section_availability.feature +++ b/completion/tests/behat/restrict_section_availability.feature @@ -20,9 +20,7 @@ Feature: Restrict sections availability through completion or grade conditions @javascript 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -44,8 +42,7 @@ Feature: Restrict sections availability through completion or grade conditions And I press "Save changes" And I log out And I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -55,9 +52,7 @@ Feature: Restrict sections availability through completion or grade conditions @javascript 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Grade assignment | | Description | Grade this assignment to revoke restriction on restricted assignment | @@ -78,8 +73,7 @@ Feature: Restrict sections availability through completion or grade conditions And I press "Save changes" And I log out When I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -90,8 +84,7 @@ Feature: Restrict sections availability through completion or grade conditions And I should see "Submitted for grading" And I log out And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -102,7 +95,6 @@ Feature: Restrict sections availability through completion or grade conditions And I follow "Edit settings" And I log out And I log in as "student1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 06a7fa29faa..13810f37546 100644 --- a/completion/tests/behat/teacher_manual_completion.feature +++ b/completion/tests/behat/teacher_manual_completion.feature @@ -17,7 +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 course page "Completion course" + And I am on "Completion course" course homepage And completion tracking is "Enabled" in current course And I follow "Course completion" And I set the field "Teacher" to "1" @@ -26,11 +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 course page "Completion course" + And I am on "Completion course" course homepage And I should see "Status: Not yet started" And I log out When I log in as "teacher1" - And I am on course page "Completion course" + And I am on "Completion course" course homepage And I follow "View course report" And I should see "Student First" And I follow "Click to mark user complete" @@ -41,5 +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 course page "Completion course" + And I am on "Completion course" course homepage 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 343cee80824..f7216c7f32b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 26946f3cb25..ee86fb452d1 100644 --- a/course/format/topics/tests/behat/edit_delete_sections.feature +++ b/course/format/topics/tests/behat/edit_delete_sections.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: View the default name of the general section in topics format When I click on "Edit section" "link" in the "li#section-0" "css_element" @@ -62,7 +61,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 788f84ff6e0..74d25ce4f20 100644 --- a/course/format/weeks/tests/behat/edit_delete_sections.feature +++ b/course/format/weeks/tests/behat/edit_delete_sections.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: View the default name of the general section in weeks format When I click on "Edit section" "link" in the "li#section-0" "css_element" @@ -67,7 +66,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2004776ac4d..ebca3b4f1f3 100644 --- a/course/tests/behat/activities_edit_completion.feature +++ b/course/tests/behat/activities_edit_completion.feature @@ -9,16 +9,14 @@ Feature: Edit completion settings of an activity | fullname | shortname | enablecompletion | | Course 1 | C1 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Page" to section "1" and I fill the form with: | Name | TestPage | | Description | x | | Page content | x | | Completion tracking | 2 | | Require view | 1 | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 7dbcefb7150..29e8911821c 100644 --- a/course/tests/behat/activities_edit_name.feature +++ b/course/tests/behat/activities_edit_name.feature @@ -16,8 +16,7 @@ Feature: Edit activity name in-place | user | course | role | | teacher1 | C1 | editingteacher | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Good news" And I should not see "Test forum name" # Cancel renaming @@ -38,7 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 70374e6c8d1..4ed3330593b 100644 --- a/course/tests/behat/activities_edit_with_block_dock.feature +++ b/course/tests/behat/activities_edit_with_block_dock.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary description | diff --git a/course/tests/behat/activities_group_icons.feature b/course/tests/behat/activities_group_icons.feature index 61a52145d29..a863ff0c9e3 100644 --- a/course/tests/behat/activities_group_icons.feature +++ b/course/tests/behat/activities_group_icons.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | diff --git a/course/tests/behat/activities_indentation.feature b/course/tests/behat/activities_indentation.feature index 9bacdfd991d..8ef74131f60 100644 --- a/course/tests/behat/activities_indentation.feature +++ b/course/tests/behat/activities_indentation.feature @@ -18,8 +18,7 @@ Feature: Indent items on the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary description | diff --git a/course/tests/behat/activities_visibility_icons.feature b/course/tests/behat/activities_visibility_icons.feature index 34c266eeb67..09bc33460b9 100644 --- a/course/tests/behat/activities_visibility_icons.feature +++ b/course/tests/behat/activities_visibility_icons.feature @@ -18,8 +18,7 @@ Feature: Toggle activities visibility from the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -60,7 +59,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should not see "Test forum name" And I log out @@ -78,8 +77,7 @@ Feature: Toggle activities visibility from the course page | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I add a "Forum" to section "2" and I fill the form with: | Forum name | Test forum name | @@ -115,7 +113,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +132,7 @@ Feature: Toggle activities visibility from the course page | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "2" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -173,8 +170,7 @@ Feature: Toggle activities visibility from the course page | allowstealth | 1 | And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I add a "Assignment" to section "2" and I fill the form with: | Assignment name | Test assignment name | @@ -208,7 +204,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ad3aa3f1fb8..547162d4ae6 100644 --- a/course/tests/behat/add_activities.feature +++ b/course/tests/behat/add_activities.feature @@ -17,9 +17,7 @@ Feature: Add activities to courses | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Add an activity to a course @@ -48,8 +46,7 @@ Feature: Add activities to courses Scenario: Set activity description to required then add an activity supplying only the name Given I set the following administration settings values: | requiremodintro | Yes | - When I am on site homepage - And I am on course page "Course 1" + When I am on "Course 1" course homepage 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 d1f1a7dca5d..f28f75e9e0e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 32118bbe100..140fd3fcc18 100644 --- a/course/tests/behat/course_creation.feature +++ b/course/tests/behat/course_creation.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Latest announcements" block Then "Latest announcements" "block" should exist And I follow "Announcements" @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 50b4bc25b87..62ccbeda6b2 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Tags | Mathematics | @@ -33,15 +33,14 @@ Feature: Tagging courses Scenario: Set course tags using the course edit form When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Edit settings" node in "Course administration" And I expand all fieldsets Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" And I set the following fields to these values: | Tags | Algebra | And I press "Save and display" - And I am on homepage - And I am on course page "Course 2" + And I am on "Course 2" course homepage And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Tags | Mathematics, Geometry | @@ -71,14 +70,13 @@ Feature: Tagging courses | moodle/course:tag | Allow | And I log out When I log in as "teacher2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 96ccf58f871..e2ffa84e3cf 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -32,7 +32,7 @@ Feature: Edit course settings And the field "Course full name" matches value "Edited course fullname" And the field "Course short name" matches value "Edited course shortname" And the field "Course summary" matches value "Edited course summary" - And I am on homepage + And I am on site homepage And I should see "Edited course fullname" Scenario: Edit course settings and return to the management interface diff --git a/course/tests/behat/force_group_mode.feature b/course/tests/behat/force_group_mode.feature index 1004439667a..1230ae95a6d 100644 --- a/course/tests/behat/force_group_mode.feature +++ b/course/tests/behat/force_group_mode.feature @@ -15,8 +15,7 @@ Feature: Force group mode in a course | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Chat" to section "1" and I fill the form with: | Name of this chat room | Chat room | | Description | Chat description | diff --git a/course/tests/behat/move_activities.feature b/course/tests/behat/move_activities.feature index 8ee31cd4f7a..b06c7f6a73b 100644 --- a/course/tests/behat/move_activities.feature +++ b/course/tests/behat/move_activities.feature @@ -15,8 +15,7 @@ Feature: Activities can be moved between sections | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I follow "Delete Recent activity block" And I press "Yes" diff --git a/course/tests/behat/move_sections.feature b/course/tests/behat/move_sections.feature index 92864f23cb9..0e9e097346c 100644 --- a/course/tests/behat/move_sections.feature +++ b/course/tests/behat/move_sections.feature @@ -15,8 +15,7 @@ Feature: Sections can be moved | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Move up and down a section with Javascript disabled in a single page course Given I add a "Forum" to section "1" and I fill the form with: diff --git a/course/tests/behat/navigate_course_list.feature b/course/tests/behat/navigate_course_list.feature index ae2869c5aca..acd8219f247 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 am on course page "Course 1" + And I follow "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 am on course page "Course 1" + And I follow "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 69e5f197117..0f929bdcf7a 100644 --- a/course/tests/behat/paged_course_navigation.feature +++ b/course/tests/behat/paged_course_navigation.feature @@ -10,8 +10,7 @@ Feature: Course paged mode | fullname | shortname | category | format | coursedisplay | numsections | | Course 1 | C1 | 0 | | 1 | 3 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage Then I click on "link" in the "section" And I follow "C1" And I click on "link" in the "section" @@ -44,8 +43,7 @@ Feature: Course paged mode | fullname | shortname | category | format | coursedisplay | numsections | | Course 1 | C1 | 0 | | 1 | 3 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 af1a8d69fac..c16ead45273 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4f299485b98..b31933fdf82 100644 --- a/course/tests/behat/restrict_available_activities.feature +++ b/course/tests/behat/restrict_available_activities.feature @@ -18,8 +18,7 @@ Feature: Restrict activities availability @javascript Scenario: Activities can be added with the default permissions Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary description | @@ -33,14 +32,12 @@ Feature: Restrict activities availability Given I log in as "admin" And I set the following system permissions of "Teacher" role: | mod/chat:addinstance | Prohibit | - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - When I turn editing mode on + When I am on "Course 1" course homepage with 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 c578d02664c..d4b7f3d0817 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c110465b3cb..07b54235bf5 100644 --- a/course/tests/behat/section_highlighting.feature +++ b/course/tests/behat/section_highlighting.feature @@ -18,14 +18,13 @@ Feature: Topic's course sections highlighting | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I turn section "1" highlighting on Then section "1" should be highlighted And I turn section "2" highlighting on And section "2" should be highlighted And section "1" should not be highlighted - And I am on course page "Course 1" + And I am on "Course 1" course homepage And section "2" should be highlighted And section "1" should not be highlighted And I turn section "2" highlighting off @@ -33,11 +32,11 @@ Feature: Topic's course sections highlighting And section "2" should not be highlighted And I reload the page And section "2" should not be highlighted - And I am on course page "Course 1" + And I am on "Course 1" course homepage And section "2" should not be highlighted And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 33096728d69..3bad8d0c6b6 100644 --- a/course/tests/behat/section_visibility.feature +++ b/course/tests/behat/section_visibility.feature @@ -18,8 +18,7 @@ Feature: Show/hide course sections | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test hidden forum 11 name | | Description | Test hidden forum 11 description | @@ -44,7 +43,7 @@ Feature: Show/hide course sections | Forum name | Test hidden forum 32 name | | Description | Test hidden forum 32 description | | Visible | Show | - And I am on course page "Course 1" + And I am on "Course 1" course homepage When I hide section "1" Then section "1" should be hidden And section "2" should be visible @@ -65,7 +64,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3fa3d211500..d447b2bb314 100644 --- a/course/tests/behat/view_subfolders_inline.feature +++ b/course/tests/behat/view_subfolders_inline.feature @@ -15,8 +15,7 @@ Feature: View subfolders in a course in-line | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "3" and I fill the form with: | Name | Test folder | | Display folder contents | On a separate page | @@ -30,7 +29,7 @@ Feature: View subfolders in a course in-line @javascript Scenario: Add a folder with two subfolders - view on separate page - Given I am on course page "Course 1" + Given I am on "Course 1" course homepage And I should not see "Test subfolder 1" And I follow "Test folder" And I should see "Test subfolder 1" @@ -39,7 +38,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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 b7413438360..1b05008bb50 100644 --- a/enrol/guest/tests/behat/guest_access.feature +++ b/enrol/guest/tests/behat/guest_access.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -30,7 +29,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al And I press "Save changes" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Test forum name" Then I should not see "Subscribe to this forum" @@ -43,7 +42,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al And I press "Save changes" And I log out And I log in as "student1" - When I am on course page "Course 1" + When I am on "Course 1" course homepage 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 380258488c5..c2031792280 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3794ed0a4cf..0f7d81c44d6 100644 --- a/enrol/lti/tests/behat/index_page.feature +++ b/enrol/lti/tests/behat/index_page.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | diff --git a/enrol/meta/tests/behat/enrol_meta.feature b/enrol/meta/tests/behat/enrol_meta.feature index b891bc04ce2..f8ba1731044 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 am on course page "Course 3" + When I am on "Course 3" course homepage And I add "Course meta link" enrolment method with: | Link course | C1C1 | And I navigate to "Enrolled users" node in "Course administration > Users" @@ -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 am on course page "Course 3" + When I am on "Course 3" course homepage And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Groupcourse 1 | - And I am on course page "Course 3" + And I am on "Course 3" course homepage 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 am on course page "Course 3" + When I am on "Course 3" course homepage 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 am on course page "Course 3" + When I am on "Course 3" course homepage And I add "Course meta link" enrolment method with: | Link course | C1C1 | | Add to group | Groupcourse 1 | - And I am on course page "Course 3" + And I am on "Course 3" course homepage 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 am on course page "Course 4" + And I follow "Course 4" And I navigate to "Enrolment methods" node in "Course administration > Users" Then I should see "Course meta link (Course 1)" 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 6db2d96cdbb..c9cd9d46a49 100644 --- a/enrol/self/tests/behat/key_holder.feature +++ b/enrol/self/tests/behat/key_holder.feature @@ -34,13 +34,13 @@ Feature: Users can be defined as key holders in courses where self enrolment is @javascript Scenario: The key holder name is displayed on site home page Given I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 89973cb1069..b38fb108ae4 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add "Self enrolment" enrolment method with: | Custom instance name | Test student enrolment | And I log out - When I am on course page "Course 1" + When I am on "Course 1" course homepage 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,25 +33,25 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage And I set the following fields to these values: | Enrolment key | moodle_rules | And I press "Enrol me" @@ -61,17 +61,17 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe Scenario: Self-enrolment disabled Given I log in as "student1" - When I am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Users > Groups" in current page administration And I press "Create group" And I set the following fields to these values: @@ -80,7 +80,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe And I press "Save changes" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 62eeee5914e..79f4b4c39c7 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 a436eb327c9..aa88075b324 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 am on course page "Course 001" + And I am on "Course 001" course homepage 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 7b69c9bb959..8edf4584e34 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4ecc222c34d..e2e77451afd 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 27ef86ba272..59f1773cfb3 100644 --- a/files/tests/behat/add_custom_file_type.feature +++ b/files/tests/behat/add_custom_file_type.feature @@ -28,13 +28,12 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 acf62cd233d..c44e15436fa 100644 --- a/files/tests/behat/course_files.feature +++ b/files/tests/behat/course_files.feature @@ -13,7 +13,7 @@ Feature: Course files | legacyfilesinnewcourses | 1 | | legacyfilesaddallowed | 1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" @@ -29,7 +29,7 @@ Feature: Course files | legacyfilesinnewcourses | 1 | | legacyfilesaddallowed | 0 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage Then "Legacy course files" "link" should exist in current page administration And I navigate to "Legacy course files" node in "Course administration" And I press "Edit legacy course files" diff --git a/grade/export/txt/tests/behat/export.feature b/grade/export/txt/tests/behat/export.feature index c643ce58efa..1965c9acdf5 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d790e3b2750..d1ca5aacdee 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9a870b0aec0..db90d9499b2 100644 --- a/grade/grading/form/guide/tests/behat/edit_guide.feature +++ b/grade/grading/form/guide/tests/behat/edit_guide.feature @@ -17,8 +17,7 @@ Feature: Marking guides can be created and edited | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | | Description | Test assignment description | @@ -93,7 +92,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3644bb4dcd0..4fbde356c76 100644 --- a/grade/grading/form/rubric/tests/behat/edit_rubric.feature +++ b/grade/grading/form/rubric/tests/behat/edit_rubric.feature @@ -18,8 +18,7 @@ Feature: Rubrics can be created and edited | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | | Description | Test assignment description | @@ -72,7 +71,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +81,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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 +94,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +111,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +126,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +146,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4207337b4e6..687f1a49c7e 100644 --- a/grade/grading/form/rubric/tests/behat/grade_calculation.feature +++ b/grade/grading/form/rubric/tests/behat/grade_calculation.feature @@ -23,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I go to "Test assignment 1" advanced grading definition page And I set the following fields to these values: | Name | Assignment 1 rubric | diff --git a/grade/grading/form/rubric/tests/behat/negative_points.feature b/grade/grading/form/rubric/tests/behat/negative_points.feature index 9653b439c00..33d0e1e0deb 100644 --- a/grade/grading/form/rubric/tests/behat/negative_points.feature +++ b/grade/grading/form/rubric/tests/behat/negative_points.feature @@ -27,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I go to "Test assignment 1" advanced grading definition page And I set the following fields to these values: | Name | Assignment 1 rubric | 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 81a5758ce27..c1a5cbdf1e1 100644 --- a/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature +++ b/grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature @@ -23,7 +23,7 @@ Feature: Publish rubrics as templates | user | role | contextlevel | reference | | manager1 | manager | System | | And I log in as "manager1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -35,7 +35,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 dda862c6220..f649d1129d6 100644 --- a/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature +++ b/grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature @@ -15,8 +15,7 @@ Feature: Reuse my rubrics in other activities | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment 1 name | | Description | Test assignment 1 description | @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +39,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6c72dfca0f7..b7cbe9e6fb8 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 19efa2fd118..7cd066a0a98 100644 --- a/grade/report/grader/tests/behat/switch_views.feature +++ b/grade/report/grader/tests/behat/switch_views.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name 1 | | Description | Submit your online text | @@ -30,14 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name 2" When I press "Add submission" And I set the following fields to these values: @@ -46,7 +45,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +55,10 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +83,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 log out @@ -99,7 +96,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7dc399d0395..119bd083f92 100644 --- a/grade/report/history/tests/behat/basic_functionality.feature +++ b/grade/report/history/tests/behat/basic_functionality.feature @@ -22,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | The greatest assignment ever | | Description | Write a behat test for Moodle - it's amazing! | @@ -39,7 +38,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 18ca00a6084..c99aefe1a2a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c99d9e24b0e..bfd7d7fc2db 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e6c5ae4f461..eb9bef2d334 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 fa6449f1d22..3aaf02aefbc 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -10,8 +10,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2f6cb202072..b354dae3e4f 100644 --- a/grade/tests/behat/grade_UI_settings.feature +++ b/grade/tests/behat/grade_UI_settings.feature @@ -18,8 +18,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI | activity | course | idnumber | name | intro | | assign | C1 | assign1 | Assignment1 | Assignment 1 intro | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on @@ -30,8 +29,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI Then I navigate to "General settings" node in "Site administration > Grades" And I set the field "Show minimum grade" to "0" And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -42,8 +40,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI When I navigate to "Grader report" node in "Site administration > Grades > Report settings" And I set the field "Show calculations" to "0" And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "View > Grader report" in the course gradebook Then "Edit calculation for Course total" "link" should not exist @@ -53,7 +50,6 @@ Feature: Site settings can be used to hide parts of the gradebook UI Then I navigate to "Grade category settings" node in "Site administration > Grades" 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7021b5c0eed..68a91041234 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Course 1": | Aggregation | Natural | @@ -370,8 +370,7 @@ Feature: We can use calculated grade totals Scenario: Natural aggregation with drop lowest When I log out And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 157bf7e6e5c..68835bb361e 100644 --- a/grade/tests/behat/grade_aggregation_changes.feature +++ b/grade/tests/behat/grade_aggregation_changes.feature @@ -33,8 +33,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit And I log in as "admin" 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ca3927d1c0d..abbfe4fb3ce 100644 --- a/grade/tests/behat/grade_average.feature +++ b/grade/tests/behat/grade_average.feature @@ -21,8 +21,7 @@ Feature: Average grades are displayed in the gradebook | student2 | C1 | student | | student3 | C1 | student | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage # Enable averages And I navigate to "Setup > Course grade settings" in the course gradebook And I set the following fields to these values: @@ -58,8 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7c9e9d71473..e3cca8d185f 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -19,8 +19,7 @@ Feature: Calculated grade items can be used in the gradebook | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 555df8e7cd3..88558150a30 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -20,8 +20,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 b4816a653dd..88b20c35f96 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ee012e7379a..ad270465406 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -32,8 +32,7 @@ Feature: Editing a grade item | 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 am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 d507a1ff3b2..cb53856f38c 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -19,8 +19,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I log in as "admin" 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +44,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e48046c0da4..1ed3712b04f 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -20,8 +20,7 @@ Feature: We can change the maximum and minimum number of points for manual items | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +34,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b2fa02c9d95..ca3b5180eb5 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0449f4c7e5e..4f3d6cb3663 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -28,8 +28,7 @@ Feature: Grade item validation | Name | Letter scale | | Scale | Disappointing, Good, Very good, Excellent | And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 5d985790eb7..d9d951c3ff8 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9b75574ddc0..0f5dbc18dcd 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 361785e710a..b385b3d27ae 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -25,8 +25,7 @@ Feature: We can use a minimum grade different than zero And I log in as "admin" 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +83,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e9f6daaad82..b23be1f4533 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 38eaf046c42..39578ff9a38 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2f308078d02..4706e101d1e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 172f269ffdd..887a5c0000e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3fc42d7272a..da25498442b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 62c4596b3e1..5e172374629 100644 --- a/grade/tests/behat/grade_point_maximum.feature +++ b/grade/tests/behat/grade_point_maximum.feature @@ -19,8 +19,7 @@ Feature: We can change the grading type and maximum grade point values | Grade point maximum | 900 | | Grade point default | 800 | And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @javascript Scenario: Validate that switching the type of grading used correctly disables input form elements @@ -97,8 +96,7 @@ Feature: We can change the grading type and maximum grade point values And I set the following fields to these values: | Grade point maximum | 100 | And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 bc97a09f8bf..d673eabf7cb 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2788591380f..8a26b40519a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5cbb88d1987..1b319e328d0 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 af878768622..a59f0fc396f 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f1a7c07d5a9..1700dc0efed 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -22,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name 1 | | Description | Submit your online text | @@ -34,14 +33,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name 2" When I press "Add submission" And I set the following fields to these values: @@ -50,7 +49,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f68e8aa76db..8610678a60a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d428202eadd..4642d4d5f36 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Users > Groups" in current page administration When I press "Create group" Then the "idnumber" "field" should be readonly @@ -93,7 +93,7 @@ Feature: Organize students into groups | Course 1 | C1 | 0 | 1 | | Course 2 | C2 | 0 | 1 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Users > Groups" in current page administration When I press "Create group" And I set the following fields to these values: @@ -115,7 +115,7 @@ Feature: Organize students into groups | Enrolment key | Abcdef-2 | And I press "Save changes" And the "groups" select box should contain "Group B (0)" - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 12ab8bf7f6a..9c89d407d5e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8b7859914e3..0bec1e371be 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -78,13 +78,13 @@ Feature: Importing of groups and groupings @javascript 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 course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5be84e11000..779b1da8eaf 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ba362638c35..c2ef16edf02 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c2720a52551..9d6c53066b2 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -133,8 +133,7 @@ Feature: Automatic updating of groups and groupings | Enrolment key | Abcdef-2 | 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 10ecd851a99..a7290d90176 100644 --- a/lib/editor/atto/tests/behat/autosave.feature +++ b/lib/editor/atto/tests/behat/autosave.feature @@ -19,7 +19,7 @@ Feature: Atto Autosave And I set the field "Autosave frequency" to "3" And I set the field with xpath "//select[@name='s_editor_atto_autosavefrequency[u]']" to "seconds" And I click on "Save changes" "button" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -28,14 +28,14 @@ Feature: Atto Autosave @javascript Scenario: Restore a draft Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Edit settings" node in "Course administration" # Wait for the autorestore And I wait "2" seconds @@ -44,7 +44,7 @@ Feature: Atto Autosave @javascript Scenario: Do not restore a draft if files have been modified Given I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -54,7 +54,7 @@ Feature: Atto Autosave And I follow "Manage private files..." And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager And I click on "Save changes" "button" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -70,27 +70,27 @@ Feature: Atto Autosave And I click on "Save and display" "button" And I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 51a3a3b817d..97f8df0d864 100644 --- a/lib/editor/atto/tests/behat/customtoolbar.feature +++ b/lib/editor/atto/tests/behat/customtoolbar.feature @@ -13,7 +13,7 @@ Feature: Atto editor with customised toolbar | activity | name | intro | course | idnumber | | label | L1 | FixtureLink | C1 | label1 | When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 8d55d2b945d..5bcc3f6e41c 100644 --- a/lib/editor/tinymce/tests/behat/edit_available_icons.feature +++ b/lib/editor/tinymce/tests/behat/edit_available_icons.feature @@ -18,8 +18,7 @@ Feature: Add or remove items from the TinyMCE editor toolbar Scenario: Remove icons When the following config values are set as admin: | customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce | - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Database" to section "1" Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist And "#id_introeditor_tbl .mce_fullscreen" "css_element" should exist @@ -28,21 +27,19 @@ Feature: Add or remove items from the TinyMCE editor toolbar Scenario: Add icons 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 course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Database" to section "1" Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist And "#id_introeditor_tbl .mce_anchor" "css_element" should exist And the following config values are set as admin: | customtoolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen | editor_tinymce | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 - Given I am on course page "Course 1" - And I turn editing mode on + Given I am on "Course 1" course homepage with editing mode on When I add a "Database" to section "1" And I wait until "#id_introeditor_tbl" "css_element" exists Then "#id_introeditor_tbl .mce_bold" "css_element" should exist diff --git a/lib/form/tests/behat/modgrade_validation.feature b/lib/form/tests/behat/modgrade_validation.feature index 215e5623bd0..a5dd9f7b9e8 100644 --- a/lib/form/tests/behat/modgrade_validation.feature +++ b/lib/form/tests/behat/modgrade_validation.feature @@ -32,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | @@ -80,8 +79,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | @@ -92,7 +90,7 @@ Feature: Using the activity grade form element | Group mode | No groups | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +99,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" And I follow "Discussion subject" And I set the field "rating" to "D" @@ -134,14 +132,13 @@ Feature: Using the activity grade form element And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +157,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | @@ -172,7 +168,7 @@ Feature: Using the activity grade form element | Group mode | No groups | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +177,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" And I follow "Discussion subject" And I set the field "rating" to "100" @@ -197,12 +193,11 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 755f5112379..0abf192cff8 100644 --- a/lib/form/tests/behat/multi_select_dependencies.feature +++ b/lib/form/tests/behat/multi_select_dependencies.feature @@ -13,7 +13,7 @@ Feature: Forms with a multi select field dependency | activity | name | intro | course | idnumber | | label | L1 | FixtureLink | C1 | label1 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 74520fc8fe2..82b745b385f 100644 --- a/lib/tests/behat/largeforms.feature +++ b/lib/tests/behat/largeforms.feature @@ -13,8 +13,7 @@ Feature: Forms with a large number of fields | activity | name | intro | course | idnumber | | label | L1 | FixtureLink | C1 | label1 | When I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "FixtureLink" # Note: These tests do not actually use JavaScript but they don't work with diff --git a/login/tests/behat/change_password.feature b/login/tests/behat/change_password.feature index 2b24b35bb1c..0b165492f52 100644 --- a/login/tests/behat/change_password.feature +++ b/login/tests/behat/change_password.feature @@ -60,4 +60,5 @@ Feature: Change password And I click on "Save changes" "button" And I should see "Password has been changed" And I click on "Continue" "button" + And I am on site homepage And I should see "Course 1" diff --git a/message/output/popup/tests/behat/notification_popover_unread.feature b/message/output/popup/tests/behat/notification_popover_unread.feature index cee9b048534..e055d043a10 100644 --- a/message/output/popup/tests/behat/notification_popover_unread.feature +++ b/message/output/popup/tests/behat/notification_popover_unread.feature @@ -25,8 +25,7 @@ Feature: Notification popover unread notifications | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -34,7 +33,7 @@ Feature: Notification popover unread notifications | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 7bcda2d9c36..ef863fa0ba6 100644 --- a/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature +++ b/mod/assign/feedback/editpdf/tests/behat/annotate_pdf.feature @@ -29,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your PDF file | @@ -38,7 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +103,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading | G1 | G1 | | G1 | G2 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your PDF file | @@ -115,7 +113,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +123,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 58b1a840e51..1e7be2ec87f 100644 --- a/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/group_annotations.feature @@ -27,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your PDF file | @@ -37,7 +36,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +66,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I follow "View annotated PDF..." Then I should see "Annotate PDF" @@ -75,7 +74,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should not see "View annotated PDF..." @@ -83,10 +82,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I follow "View annotated PDF..." And I change window size to "large" @@ -96,6 +95,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5f21c2f4288..4ad3042e454 100644 --- a/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature +++ b/mod/assign/feedback/editpdf/tests/behat/view_previous_annotations.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your PDF file | @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +40,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6afe9f880f8..09a4b197f80 100644 --- a/mod/assign/feedback/file/tests/behat/feedback_file.feature +++ b/mod/assign/feedback/file/tests/behat/feedback_file.feature @@ -26,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your PDF file | @@ -40,7 +39,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +49,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +62,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "feedback.txt" And I log out When I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" Then I should not see "feedback.txt" @@ -79,11 +78,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "feedback.txt" And I log out When I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 61c04e89860..ba940f59925 100644 --- a/mod/assign/tests/behat/allow_another_attempt.feature +++ b/mod/assign/tests/behat/allow_another_attempt.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -36,7 +35,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +88,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -102,7 +100,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -110,7 +108,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +129,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 am on course page "Course 1" +# And I am on "Course 1" course homepage # And I follow "Test assignment name" # #And I should see "This is attempt 1 ( 3 attempts allowed )." # And I press "Add submission" @@ -140,7 +138,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 am on course page "Course 1" +# And I am on "Course 1" course homepage # 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 +151,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 am on course page "Course 1" +# And I am on "Course 1" course homepage # And I follow "Test assignment name" # #And I should see "This is attempt 2 ( 3 attempts allowed )." # And I press "Add submission" @@ -162,7 +160,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 am on course page "Course 1" +# And I am on "Course 1" course homepage # 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 bbe3a8ed72c..5fc52cc2322 100644 --- a/mod/assign/tests/behat/assign_course_reset.feature +++ b/mod/assign/tests/behat/assign_course_reset.feature @@ -23,8 +23,7 @@ Feature: Assign reset | Group 1 | C1 | G1 | | Group 2 | C1 | G2 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -36,7 +35,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -47,7 +46,7 @@ Feature: Assign reset And I should see "Not graded" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +55,7 @@ Feature: Assign reset | Delete all submissions | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +80,7 @@ Feature: Assign reset | Delete all user overrides | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +104,7 @@ Feature: Assign reset | Delete all group overrides | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 4087ac47cba..9a00c2d59fd 100644 --- a/mod/assign/tests/behat/assign_group_override.feature +++ b/mod/assign/tests/behat/assign_group_override.feature @@ -30,8 +30,7 @@ Feature: Assign group override | student2 | G2 | | student3 | G1 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -112,12 +111,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "Wednesday, 1 January 2020, 8:00" @@ -148,12 +147,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "Make changes to your submission" @@ -184,13 +183,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +234,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 22862619da8..27aa0749f96 100644 --- a/mod/assign/tests/behat/assign_user_override.feature +++ b/mod/assign/tests/behat/assign_user_override.feature @@ -19,8 +19,7 @@ Feature: Assign user override | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -101,12 +100,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "Wednesday, 1 January 2020, 8:00" @@ -137,12 +136,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "Make changes to your submission" @@ -173,11 +172,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 31e15f51f01..fceefa0faa1 100644 --- a/mod/assign/tests/behat/comment_inline.feature +++ b/mod/assign/tests/behat/comment_inline.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -38,7 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b0ede3cd599..bf66e803351 100644 --- a/mod/assign/tests/behat/display_error_message_onbadformat.feature +++ b/mod/assign/tests/behat/display_error_message_onbadformat.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -51,8 +50,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | diff --git a/mod/assign/tests/behat/display_grade.feature b/mod/assign/tests/behat/display_grade.feature index 1ef34cb9c85..192bc699c17 100644 --- a/mod/assign/tests/behat/display_grade.feature +++ b/mod/assign/tests/behat/display_grade.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -56,8 +55,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index c5976935474..007d4fda396 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -38,7 +37,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +50,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +70,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 940f2446b09..6456cddf541 100644 --- a/mod/assign/tests/behat/edit_student_submission.feature +++ b/mod/assign/tests/behat/edit_student_submission.feature @@ -15,9 +15,7 @@ Feature: In an assignment, the administrator can edit students' submissions | user | course | role | | student1 | C1 | student | When I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -25,7 +23,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -33,8 +31,7 @@ Feature: In an assignment, the administrator can edit students' submissions And I press "Save changes" And I log out And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 6a40216d3f6..b93881a1119 100644 --- a/mod/assign/tests/behat/file_submission.feature +++ b/mod/assign/tests/behat/file_submission.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 33bcd4d6d35..c9933e17bc2 100644 --- a/mod/assign/tests/behat/filter_by_marker.feature +++ b/mod/assign/tests/behat/filter_by_marker.feature @@ -22,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -41,7 +40,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9fbfdee1008..384066db6f1 100644 --- a/mod/assign/tests/behat/grading_status.feature +++ b/mod/assign/tests/behat/grading_status.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -33,7 +32,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +46,7 @@ Feature: View the grading status of an assignment And I log out # Mark the submission. And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +64,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +74,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +89,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +99,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +121,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -133,7 +131,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +142,7 @@ Feature: View the grading status of an assignment And I log out # Mark the submission. And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +158,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b1cddf0be58..90e1f0a7fca 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 80b211ca1e2..0f30a19089e 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -27,8 +27,7 @@ Feature: Group assignment submissions | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -52,7 +51,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +90,7 @@ Feature: Group assignment submissions | student1 | G1 | | student2 | G1 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -103,7 +101,7 @@ Feature: Group assignment submissions | Require group to make submission | No | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -111,7 +109,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +118,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -128,7 +126,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -177,8 +175,7 @@ Feature: Group assignment submissions | GG1 | G1 | | GG1 | G2 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -190,7 +187,7 @@ Feature: Group assignment submissions | Require group to make submission | No | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -198,7 +195,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "student3" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -206,7 +203,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "student5" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -214,7 +211,7 @@ Feature: Group assignment submissions And I press "Save changes" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 9243253debd..c625566870a 100644 --- a/mod/assign/tests/behat/online_submissions.feature +++ b/mod/assign/tests/behat/online_submissions.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -29,7 +28,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -66,8 +65,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -75,14 +73,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f9457220a9f..09bd8d8886c 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -34,8 +34,7 @@ Feature: Outcome grading | Short name | OT | | Scale | Test Scale | And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +42,7 @@ Feature: Outcome grading Scenario: Giving an outcome to a student Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -52,7 +50,7 @@ Feature: Outcome grading | Outcome Test | 1 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -60,7 +58,7 @@ Feature: Outcome grading And I press "Save changes" And I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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,13 +83,11 @@ Feature: Outcome grading | name | course | idnumber | | Group 1 | C1 | G1 | And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -101,7 +97,7 @@ Feature: Outcome grading | Outcome Test | 1 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -109,7 +105,7 @@ Feature: Outcome grading And I press "Save changes" And I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 538e7f052e8..63297229269 100644 --- a/mod/assign/tests/behat/prevent_submission_changes.feature +++ b/mod/assign/tests/behat/prevent_submission_changes.feature @@ -22,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -31,7 +30,7 @@ Feature: Prevent or allow assignment submission changes | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -43,7 +42,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +50,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +64,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should not see "This assignment is not accepting submissions" And I press "Edit submission" @@ -80,7 +79,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -88,7 +87,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -96,7 +95,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +104,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +119,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8c897017c29..3d2afab39fb 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -18,16 +18,14 @@ Feature: In an assignment, teachers grade multiple students on one page | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | | assignsubmission_onlinetext_enabled | 1 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -35,8 +33,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 "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +61,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" @@ -73,7 +70,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Outcomes" node in "Course administration" And I follow "Edit outcomes" And I press "Add a new outcome" @@ -82,8 +79,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -92,7 +88,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -100,7 +96,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -108,7 +104,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +124,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "I'm the teacher first feedback" And I should see "60.0" @@ -137,7 +133,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +142,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +163,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I should see "I'm the teacher first feedback" And I should see "60.0" @@ -176,7 +172,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 22a85008c3d..d84e5ee5b4b 100644 --- a/mod/assign/tests/behat/reopen_locked_submission.feature +++ b/mod/assign/tests/behat/reopen_locked_submission.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -30,7 +29,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -38,7 +37,7 @@ Feature: Submissions are unlocked when a new attempt is given And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -55,8 +54,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -64,7 +62,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" And I press "Add submission" And I set the following fields to these values: @@ -72,7 +70,7 @@ Feature: Submissions are unlocked when a new attempt is given And I press "Save changes" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 8bc2410cd8a..75b070141c9 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index 1ec596a8e80..e709e20b125 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 | @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +80,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +108,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 72760e8a248..d3d180c013f 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9c6fb1bd631..6830f3d1d66 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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,13 @@ Feature: Submit assignment without group And I press "Submit assignment" And I press "Continue" And I should see "Submitted for grading" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 +77,16 @@ Feature: Submit assignment without group And I log out # Student 2 should see submitted for grading. And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Allow default group" And I should see "Submitted for grading" - And I am on homepage - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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." @@ -97,8 +95,7 @@ Feature: Submit assignment without group And I should see "Default group" in the "Student 2" "table_row" And I should see "Submitted for grading" in the "Student 1" "table_row" And I should see "Submitted for grading" in the "Student 2" "table_row" - And I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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." @@ -107,8 +104,7 @@ Feature: Submit assignment without group And I should see "Not a member of any group, so unable to make submissions." in the "Student 2" "table_row" And I should not see "Submitted for grading" in the "Student 1" "table_row" And I should not see "Submitted for grading" in the "Student 2" "table_row" - And I am on homepage - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 +116,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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 +124,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 am on course page "Course 3" + And I am on "Course 3" course homepage 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 de801153e16..b43910ead36 100644 --- a/mod/book/tests/behat/create_chapters.feature +++ b/mod/book/tests/behat/create_chapters.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book | | Description | A book about dreams! | diff --git a/mod/book/tests/behat/edit_navigation_options.feature b/mod/book/tests/behat/edit_navigation_options.feature index 6cf93ab5740..8b3480e4439 100644 --- a/mod/book/tests/behat/edit_navigation_options.feature +++ b/mod/book/tests/behat/edit_navigation_options.feature @@ -15,8 +15,7 @@ Feature: In a book, change the navigation options | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Change navigation options Given I add a "Book" to section "1" and I fill the form with: diff --git a/mod/book/tests/behat/log_entries.feature b/mod/book/tests/behat/log_entries.feature index d970af13a7d..bcf60704a53 100644 --- a/mod/book/tests/behat/log_entries.feature +++ b/mod/book/tests/behat/log_entries.feature @@ -10,9 +10,7 @@ Feature: In a book, verify log entries | fullname | shortname | category | groupmode | | Course 1 | C1 | 0 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "Book" to section "1" and I fill the form with: | Name | Test book | | Description | A book about dreams! | diff --git a/mod/book/tests/behat/show_hide_chapters.feature b/mod/book/tests/behat/show_hide_chapters.feature index 516cf3e5a69..c84ab8feda1 100644 --- a/mod/book/tests/behat/show_hide_chapters.feature +++ b/mod/book/tests/behat/show_hide_chapters.feature @@ -15,8 +15,7 @@ Feature: Book activity chapter visibility management | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book | | Description | A book about dreams! | @@ -53,8 +52,7 @@ Feature: Book activity chapter visibility management When I follow "Hide chapter \"2. Second chapter\"" And I follow "Hide chapter \"2. Third chapter\"" And I turn editing mode off - And I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 e7a3034113f..f741faa43e0 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 68e27c29ebb..dfe88207330 100644 --- a/mod/chat/tests/behat/chat_course_reset.feature +++ b/mod/chat/tests/behat/chat_course_reset.feature @@ -22,8 +22,7 @@ Feature: Chat reset Scenario: Use course reset to update chat start date And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | startdate[day] | 1 | @@ -48,7 +47,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 am on course page "Course 1" + Then I am on "Course 1" course homepage 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 495aa562029..c748455d7a2 100644 --- a/mod/choice/tests/behat/add_choice.feature +++ b/mod/choice/tests/behat/add_choice.feature @@ -17,8 +17,7 @@ Feature: Add choice activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -26,7 +25,7 @@ Feature: Add choice activity | option[1] | Option 2 | And I log out When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 93d711c51a3..6a47ca94067 100644 --- a/mod/choice/tests/behat/allow_preview.feature +++ b/mod/choice/tests/behat/allow_preview.feature @@ -17,8 +17,7 @@ Feature: Allow choice preview | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Enable the choice preview option and view the activity as a student before the opening time Given I add a "Choice" to section "1" and I fill the form with: @@ -37,7 +36,7 @@ Feature: Allow choice preview | Show preview | 1 | And I log out When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 8ff44760575..2e2ec8e5103 100644 --- a/mod/choice/tests/behat/block_editing.feature +++ b/mod/choice/tests/behat/block_editing.feature @@ -10,9 +10,7 @@ Feature: Editing choice block | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | | Description | Choice Description 1 | @@ -43,8 +41,7 @@ Feature: Editing choice block | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | | Description | Choice Description 1 | @@ -74,8 +71,7 @@ Feature: Editing choice block | teacher1 | C1 | editingteacher | | teacher1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name 1 | | Description | Choice Description 1 | diff --git a/mod/choice/tests/behat/change_response.feature b/mod/choice/tests/behat/change_response.feature index 8094f5b4412..8e7a7bf6774 100644 --- a/mod/choice/tests/behat/change_response.feature +++ b/mod/choice/tests/behat/change_response.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -27,14 +26,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" And I follow "Edit settings" And I set the following fields to these values: @@ -42,7 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9e700a8f4ea..2fcd4c48b37 100644 --- a/mod/choice/tests/behat/choice_availability.feature +++ b/mod/choice/tests/behat/choice_availability.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Enable the choice activity with a start deadline in the future Given I add a "Choice" to section "1" and I fill the form with: @@ -32,7 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "Sorry, this activity is not available until" @@ -48,7 +47,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" And "choice_1" "radio" should exist And "choice_2" "radio" should exist @@ -66,7 +65,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" And "choice_1" "radio" should exist And "choice_2" "radio" should exist @@ -84,6 +83,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0a7d84dbd3d..44219664218 100644 --- a/mod/choice/tests/behat/include_inactive.feature +++ b/mod/choice/tests/behat/include_inactive.feature @@ -21,8 +21,7 @@ Feature: Include responses from inactive users | student2 | C1 | student | | student3 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Enable the choice include inactive option and check that responses from inactive students are visible Given I add a "Choice" to section "1" and I fill the form with: @@ -34,22 +33,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 1" from "Choice name" choice activity And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 2" from "Choice name" choice activity And I log out And I log in as "student3" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -61,7 +60,7 @@ Feature: Include responses from inactive users | user | course | role | timestart | | student2 | C1 | student | 2145830400 | When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -73,7 +72,7 @@ Feature: Include responses from inactive users | user | course | role | timeend | | student3 | C1 | student | 1425168000 | When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "View 3 responses" And I follow "View 3 responses" @@ -92,22 +91,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 1" from "Choice name" choice activity And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 2" from "Choice name" choice activity And I log out And I log in as "student3" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "View 2 responses" And I follow "View 2 responses" @@ -119,7 +118,7 @@ Feature: Include responses from inactive users | user | course | role | timestart | | student2 | C1 | student | 2145830400 | When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice name" Then I should see "View 1 responses" And I follow "View 1 responses" @@ -131,7 +130,7 @@ Feature: Include responses from inactive users | user | course | role | timeend | | student3 | C1 | student | 1425168000 | When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 7b81fbd6e3b..fc6d4cc232e 100644 --- a/mod/choice/tests/behat/limit_responses.feature +++ b/mod/choice/tests/behat/limit_responses.feature @@ -19,8 +19,7 @@ Feature: Limit choice responses | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -30,13 +29,13 @@ Feature: Limit choice responses | option[1] | Option 2 | And I log out When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 55c38e8d652..6730174422a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6aaaa3dc115..0b6e15ed0b1 100644 --- a/mod/choice/tests/behat/multiple_options.feature +++ b/mod/choice/tests/behat/multiple_options.feature @@ -17,8 +17,7 @@ Feature: Multiple option choice response | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -27,7 +26,7 @@ Feature: Multiple option choice response | option[1] | Option 2 | And I log out When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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,8 +46,7 @@ Feature: Multiple option choice response | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -62,13 +60,13 @@ Feature: Multiple option choice response | limit[2] | 1 | And I log out When I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c29d5b33293..c5e89f118d9 100644 --- a/mod/choice/tests/behat/my_home.feature +++ b/mod/choice/tests/behat/my_home.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" And I expand all fieldsets And I set the following fields to these values: @@ -37,32 +36,20 @@ Feature: Test the display of the choice module on my home And I press "Save and return to course" And I log out - Scenario: View my home as a student before answering the choice - Given I log in as "student1" - Then I should see "You have Choices that need attention" - And I should see "Not answered yet" - And I log out - Scenario: View my home as a student after answering the choice Given I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" And "Save my choice" "button" should not exist - When I follow "Dashboard" - Then I should not see "You have Choices that need attention" And I log out Scenario: View my home as a teacher Given I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" And "Save my choice" "button" should not exist And I log out - When I log in as "teacher1" - Then I should see "You have Choices that need attention" - And I should see "View 1 responses" - And I log out diff --git a/mod/choice/tests/behat/publish_results.feature b/mod/choice/tests/behat/publish_results.feature index 533beb48e0d..b35430d7719 100644 --- a/mod/choice/tests/behat/publish_results.feature +++ b/mod/choice/tests/behat/publish_results.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Do not publish results to students Given I add a "Choice" to section "1" and I fill the form with: @@ -29,7 +28,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +43,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 am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Choice 1" Then I should not see "Responses" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +60,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice 1" And I follow "Edit settings" And I expand all fieldsets @@ -83,7 +82,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice 1" And I should see "Responses" @@ -96,6 +95,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 807b6405ead..08474d7d031 100644 --- a/mod/choice/tests/behat/publish_results_anonymously.feature +++ b/mod/choice/tests/behat/publish_results_anonymously.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Publish anonymous results Given I add a "Choice" to section "1" and I fill the form with: @@ -32,11 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 1" from "Choice 1" choice activity And I log out When I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Choice 1" Then I should not see "Student 1" And I should not see "Users who chose this option" @@ -51,11 +50,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I choose "Option 1" from "Choice 1" choice activity And I log out When I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 2b99f01f8b3..fa9d6d6f03d 100644 --- a/mod/choice/tests/behat/remove_choice_options.feature +++ b/mod/choice/tests/behat/remove_choice_options.feature @@ -19,8 +19,7 @@ Feature: Update a choice activity removing options | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Choice" to section "1" and I fill the form with: | Choice name | Choice name | | Description | Choice Description | @@ -29,19 +28,19 @@ Feature: Update a choice activity removing options | option[2] | Option 3 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3c2e45e4ffd..b8ceeec1a06 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 cade6d16aca..0d2166fd8b0 100644 --- a/mod/data/tests/behat/manageapproved.feature +++ b/mod/data/tests/behat/manageapproved.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Students can manage their approved entries to a database @@ -37,20 +36,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test database name" Then I should see "Student entry" And "Edit" "link" should exist @@ -72,20 +71,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 88ee2d7a70e..b3825cd1481 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 37c246e020a..b7f66798a76 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0db30e6cd51..7ab33ab06ee 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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + 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: | 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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 63765f0f682..8db8432c514 100644 --- a/mod/feedback/tests/behat/coursemapping.feature +++ b/mod/feedback/tests/behat/coursemapping.feature @@ -54,18 +54,17 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Feedback" block - And I am on course page "Course 2" + And I am on "Course 2" course homepage And I add the "Feedback" block - And I am on course page "Course 3" + And I am on "Course 3" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage And I follow "Another feedback" And I should not see "Mapped courses" And I should not see "Map feedback to courses" @@ -96,7 +95,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -109,7 +108,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 am on course page "Course feedback" + And I follow "Course feedback" And I navigate to "Analysis" in current page administration And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" @@ -148,11 +147,11 @@ Feature: Mapping courses in a 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 course page "Course 1" + And I am on "Course 1" course homepage And "Feedback" "block" should not exist And I should not see "Course feedback" - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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" @@ -166,7 +165,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 am on course page "Course 2" + And I am on "Course 2" course homepage 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" @@ -178,7 +177,7 @@ Feature: Mapping courses in a feedback And I press "Continue" And I log out And I log in as "user3" - And I am on course page "Course 3" + And I am on "Course 3" course homepage 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" @@ -237,6 +236,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8682629b980..46f501ca2fc 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9c84be0578c..96350d87813 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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + 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: | 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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 am on course page "Course 1" - And I am on course page "Course anon feedback" + And I am on "Course 1" course homepage + And I follow "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 809664420f5..856120eaa8d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 47bdf44f22b..400cf1d4b45 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 34013441148..d5a52560d1c 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 bfc3dd27a8b..d6b5647c85d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 65a8aa038f7..40a658b130d 100644 --- a/mod/feedback/tests/behat/show_nonrespondents.feature +++ b/mod/feedback/tests/behat/show_nonrespondents.feature @@ -38,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Feedback" to section "1" and I fill the form with: | Name | Frogs | | Description | x | @@ -55,7 +54,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Frogs" And I follow "Answer the questions" And I set the field "Y/N?" to "Y" @@ -64,7 +63,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f457aad2eee..e5f9bed6377 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Another feedback in course 1" And I follow "Templates" And I set the field "Use a template" to "My first template" @@ -65,7 +65,7 @@ Feature: Saving, using and deleting feedback templates And I follow "Edit questions" And I should see "this is a multiple choice 1" # Make sure this template is not available in another course - And I am on course page "Course 2" + And I am on "Course 2" course homepage And I follow "Learning experience course 2" And I follow "Templates" And I should see "No templates available yet" @@ -75,13 +75,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -110,7 +110,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 course page "Course 1" + And I am on "Course 1" course homepage And I follow "Learning experience course 1" And I follow "Templates" And I set the field "Name" to "My first template" @@ -118,7 +118,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 am on course page "Course 2" + And I am on "Course 2" course homepage And I follow "Learning experience course 2" And I follow "Templates" And I set the field "Use a template" to "My first template" @@ -132,7 +132,7 @@ Feature: Saving, using and deleting feedback templates Scenario: Teacher can delete course templates but can not delete public templates # Save feedback as both public and course template When I log in as "manager" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Learning experience course 1" And I follow "Templates" And I set the field "Name" to "My public template" @@ -143,7 +143,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Another feedback in course 1" And I follow "Templates" And I follow "Delete template..." @@ -163,7 +163,7 @@ Feature: Saving, using and deleting feedback templates Scenario: Manager can delete both course and public templates # Save feedback as both public and course template When I log in as "manager" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 5094605dd7c..2d13f382404 100644 --- a/mod/forum/tests/behat/add_forum.feature +++ b/mod/forum/tests/behat/add_forum.feature @@ -18,8 +18,7 @@ Feature: Add forum activities and discussions | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | @@ -29,7 +28,7 @@ Feature: Add forum activities and discussions | Message | This is the body | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 5ab4ab19780..c9134a85b67 100644 --- a/mod/forum/tests/behat/advanced_search.feature +++ b/mod/forum/tests/behat/advanced_search.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Latest announcements" block And I navigate to "Edit settings" node in "Course administration" And I set the field "id_newsitems" to "1" @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add a new topic to "Announcements" forum with: | Subject | My subjective| | Message | My long message | @@ -36,7 +35,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -47,7 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -62,7 +61,7 @@ Feature: The forum search allows users to perform advanced searches for forum po | mysql | | postgres | And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -73,7 +72,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -84,13 +83,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Announcements" And I press "Search forums" And I should see "Advanced search" @@ -101,7 +100,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6d439a0638a..4fa88b6538a 100644 --- a/mod/forum/tests/behat/completion_condition_number_discussions.feature +++ b/mod/forum/tests/behat/completion_condition_number_discussions.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +38,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4166e3dc0bb..95672471c1e 100644 --- a/mod/forum/tests/behat/discussion_display.feature +++ b/mod/forum/tests/behat/discussion_display.feature @@ -15,8 +15,7 @@ Feature: Students can choose from 4 discussion display options and their choice | user | course | role | | student1 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -34,7 +33,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d0937513dfd..e6354772254 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 16f1842dbb9..3c6ee298bd1 100644 --- a/mod/forum/tests/behat/discussion_subscriptions.feature +++ b/mod/forum/tests/behat/discussion_subscriptions.feature @@ -15,8 +15,7 @@ Feature: A user can control their own subscription preferences for a discussion | user | course | role | | student1 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: An optional forum can have discussions subscribed to Given I add a "Forum" to section "1" and I fill the form with: @@ -32,7 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -77,7 +76,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -122,7 +121,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -134,7 +133,7 @@ Feature: A user can control their own subscription preferences for a discussion And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -142,7 +141,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -167,7 +166,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -179,7 +178,7 @@ Feature: A user can control their own subscription preferences for a discussion And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -187,7 +186,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -212,7 +211,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -248,7 +247,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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: @@ -316,7 +315,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 45f89e0d4c8..56ae13ad5ea 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I add a new discussion to "Test forum name" forum with: | Subject | Forum post subject | | Message | This is the body | @@ -47,8 +47,7 @@ Feature: Students can edit or delete their forum posts within a set time limit And I navigate to "Security > Site policies" in site administration And I set the field "Maximum time to edit posts" to "1 minutes" And I press "Save changes" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add the "Recent activity" block And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | @@ -56,7 +55,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f63f4ba7737..5afcd968630 100644 --- a/mod/forum/tests/behat/edit_post_teacher.feature +++ b/mod/forum/tests/behat/edit_post_teacher.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -27,7 +26,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I reply "Teacher post subject" post from "Test forum name" forum with: | Subject | Student post subject | | Message | Student post message | @@ -35,7 +34,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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 +45,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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 07985be0f70..74ad6b09b87 100644 --- a/mod/forum/tests/behat/forum_subscriptions.feature +++ b/mod/forum/tests/behat/forum_subscriptions.feature @@ -15,8 +15,7 @@ Feature: A user can control their own subscription preferences for a forum | user | course | role | | student1 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: A disallowed subscription forum cannot be subscribed to Given I add a "Forum" to section "1" and I fill the form with: @@ -29,7 +28,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" Then I should not see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -47,7 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" Then I should not see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -65,7 +64,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" Then I should see "Subscribe to this forum" And I should not see "Unsubscribe from this forum" @@ -85,7 +84,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 fc60b606e03..db2bec77577 100644 --- a/mod/forum/tests/behat/forum_subscriptions_availability.feature +++ b/mod/forum/tests/behat/forum_subscriptions_availability.feature @@ -35,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: A forced forum lists all subscribers diff --git a/mod/forum/tests/behat/forum_subscriptions_default.feature b/mod/forum/tests/behat/forum_subscriptions_default.feature index 38477966338..3f95ba95a3f 100644 --- a/mod/forum/tests/behat/forum_subscriptions_default.feature +++ b/mod/forum/tests/behat/forum_subscriptions_default.feature @@ -17,8 +17,7 @@ Feature: A user can control their default discussion subscription settings | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Creating a new discussion in an optional forum follows user preferences Given I add a "Forum" to section "1" and I fill the form with: @@ -28,13 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 @@ -50,14 +49,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" And I follow "Test post subject" And I follow "Reply" @@ -71,13 +70,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" And I press "Add a new discussion topic" And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist @@ -93,14 +92,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test forum name" And I follow "Test post subject" And I follow "Reply" @@ -117,7 +116,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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'" @@ -126,7 +125,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f9880810593..fb2b43a0b7d 100644 --- a/mod/forum/tests/behat/forum_subscriptions_management.feature +++ b/mod/forum/tests/behat/forum_subscriptions_management.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Forum type | Standard forum for general use | diff --git a/mod/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 21ac1cf1e62..d9b3d9263cb 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 489c4963a05..9590e650863 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 11d92e98680..1805ff740d8 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 03a871b688d..53fa658c115 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2ec3c2c53bd..7b8ee255e70 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Separate group forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Separate group forum" And I should see "Discussion 1" And I log out And I log in as "student3" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Visible group forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Visible group forum" And I should see "Discussion 1" And I log out And I log in as "student3" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 am on course page "Course 2" + And I am on "Course 2" course homepage When I follow "Groupings forum" Then I should see "Discussion 1" And I log out And I log in as "student2" - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 606563243d2..91c5105eccb 100644 --- a/mod/forum/tests/behat/posts_ordering_blog.feature +++ b/mod/forum/tests/behat/posts_ordering_blog.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Course blog forum | | Description | Single discussion forum description | @@ -33,7 +32,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Course blog forum" # # Add three posts into the blog. @@ -60,7 +59,7 @@ Feature: Blog posts are always displayed in reverse chronological order # Reply to another blog post. # And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +68,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ee77504b0b9..a5ae1d6f8f8 100644 --- a/mod/forum/tests/behat/posts_ordering_general.feature +++ b/mod/forum/tests/behat/posts_ordering_general.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Course general forum | | Description | Single discussion forum description | @@ -33,7 +32,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Course general forum" # # Add three posts into the forum. @@ -61,7 +60,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -69,7 +68,7 @@ Feature: New discussions and discussions with recently added replies are display | Message | Reply to the first post | And I press "Post to forum" And I wait to be redirected - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "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 e508dd2b12a..3d9fec0765b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 77f2995c403..8ade4cca0f9 100644 --- a/mod/forum/tests/behat/separate_group_single_group_discussions.feature +++ b/mod/forum/tests/behat/separate_group_single_group_discussions.feature @@ -39,8 +39,7 @@ Feature: Posting to groups in a separate group discussion when restricted to gro | G1 | G1G2 | | G2 | G2G1 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Multiple groups forum | | Forum type | Standard forum for general use | @@ -57,13 +56,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -72,13 +71,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d540b64e674..7caa2d374bc 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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/split_forum_discussion.feature b/mod/forum/tests/behat/split_forum_discussion.feature index ea79f7e9290..e664f8a56d9 100644 --- a/mod/forum/tests/behat/split_forum_discussion.feature +++ b/mod/forum/tests/behat/split_forum_discussion.feature @@ -17,8 +17,7 @@ Feature: Forum discussions can be split | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I follow "Science 101" - And I turn editing mode on + And I am on "Science 101" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Study discussions | | Forum type | Standard forum for general use | @@ -28,14 +27,14 @@ Feature: Forum discussions can be split | Message | Lets discuss our learning about Photosynethis this week in this thread. | And I log out And I log in as "student1" - And I follow "Science 101" + And I am on "Science 101" course homepage And I reply "Photosynethis discussion" post from "Study discussions" forum with: | Message | Can anyone tell me which number is the mass number in the periodic table? | And I log out Scenario: Split a forum discussion Given I log in as "teacher1" - And I follow "Science 101" + And I am on "Science 101" course homepage And I follow "Study discussions" And I follow "Photosynethis discussion" When I follow "Split" diff --git a/mod/forum/tests/behat/timed_discussions.feature b/mod/forum/tests/behat/timed_discussions.feature index 59e3c11c0bf..b7334290cde 100644 --- a/mod/forum/tests/behat/timed_discussions.feature +++ b/mod/forum/tests/behat/timed_discussions.feature @@ -17,8 +17,7 @@ Feature: Users can choose to set start and end time for display of their discuss And I log in as "admin" And the following config values are set as admin: | forum_enabletimedposts | 1 | - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Test forum name | | Description | Test forum description | @@ -34,14 +33,14 @@ Feature: Users can choose to set start and end time for display of their discuss | Subject | Discussion 3 timed visible now | | Message | Discussion contents 3, first message | | timestart[enabled] | 1 | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 7425ee61aed..6787a2ae220 100644 --- a/mod/forum/tests/behat/track_read_posts.feature +++ b/mod/forum/tests/behat/track_read_posts.feature @@ -17,8 +17,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos | student1 | C1 | student | | student2 | C1 | student | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Tracking forum posts off Given I add a "Forum" to section "1" and I fill the form with: @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage Then I should not see "1 unread post" And I follow "Test forum name" And I should not see "Track unread posts" @@ -47,18 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should not see "1 unread post" Scenario: Tracking forum posts optional with user tracking off @@ -72,7 +71,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 am on course page "Course 1" + And I am on "Course 1" course homepage Then I should not see "1 unread post" And I follow "Test forum name" And I should not see "Track unread posts" @@ -80,7 +79,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos Scenario: Tracking forum posts forced with user tracking on Given the following config values are set as admin: | forum_allowforcedreadtracking | 1 | - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -91,18 +90,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -113,18 +112,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 "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -137,24 +136,24 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 course page "Course 1" + And I am on "Course 1" course homepage 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 | @@ -167,7 +166,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e9722e7f1a5..7e8e6df3fda 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 49227c6421c..fa458ae50ce 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8f66c774280..0d693a04ea3 100644 --- a/mod/glossary/tests/behat/entries_always_editable.feature +++ b/mod/glossary/tests/behat/entries_always_editable.feature @@ -20,15 +20,14 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary description | | Always allow editing | No | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 7bcd0eefb5b..8ece7c3f46a 100644 --- a/mod/glossary/tests/behat/entries_require_approval.feature +++ b/mod/glossary/tests/behat/entries_require_approval.feature @@ -19,15 +19,14 @@ Feature: A teacher can choose whether glossary entries require approval | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Given I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary entries require approval | | Approved by default | No | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Just a test concept | @@ -36,13 +35,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test glossary name" And I follow "Waiting approval" Then I should see "(this entry is currently hidden)" @@ -52,18 +51,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 29fe8dcf024..a8d083b56e4 100644 --- a/mod/glossary/tests/behat/prevent_duplicate_entries.feature +++ b/mod/glossary/tests/behat/prevent_duplicate_entries.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Glossary" to section "1" and I fill the form with: | Name | Test glossary name | | Description | Test glossary description | diff --git a/mod/glossary/tests/behat/print_friendly_version.feature b/mod/glossary/tests/behat/print_friendly_version.feature index e785fa8731a..1eb4bf3d64e 100644 --- a/mod/glossary/tests/behat/print_friendly_version.feature +++ b/mod/glossary/tests/behat/print_friendly_version.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Printer-friendly glossary view enabled @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test glossary name" When I add a glossary entry with the following data: | Concept | Just a test concept | @@ -46,7 +45,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c494651600b..fca9d3a1db1 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test glossary name" @javascript diff --git a/mod/label/tests/behat/label_visibility.feature b/mod/label/tests/behat/label_visibility.feature index 326dc8c0e9c..9895551a54d 100644 --- a/mod/label/tests/behat/label_visibility.feature +++ b/mod/label/tests/behat/label_visibility.feature @@ -19,8 +19,7 @@ Feature: Check label visibility works | teacher | C1 | editingteacher | | student | C1 | student | Given I log in as "teacher" - And I follow "Test" - And I turn editing mode on + And I am on "Test" course homepage with editing mode on When I add a "label" to section "1" and I fill the form with: | Label text | Swanky label | | Visible | Hide | @@ -29,7 +28,7 @@ Feature: Check label visibility works And "Swanky label" activity should be hidden And I log out And I log in as "student" - And I follow "Test" + And I am on "Test" course homepage And I should not see "Swanky label" And I log out @@ -47,15 +46,14 @@ Feature: Check label visibility works | teacher | C1 | editingteacher | | student | C1 | student | Given I log in as "teacher" - And I follow "Test" - And I turn editing mode on + And I am on "Test" course homepage with editing mode on When I add a "label" to section "1" and I fill the form with: | Label text | Swanky label | | Visible | Show | Then "Swanky label" activity should be visible And I log out And I log in as "student" - And I follow "Test" + And I am on "Test" course homepage And "Swanky label" activity should be visible And I log out @@ -73,8 +71,7 @@ Feature: Check label visibility works | teacher | C1 | editingteacher | | student | C1 | student | Given I log in as "teacher" - And I follow "Test" - And I turn editing mode on + And I am on "Test" course homepage with editing mode on When I add a "label" to section "1" and I fill the form with: | Label text | Swanky label | | Visible | Show | @@ -93,6 +90,6 @@ Feature: Check label visibility works And the "Visible" select box should not contain "Show" And I log out And I log in as "student" - And I follow "Test" + And I am on "Test" course homepage And I should not see "Swanky label" And I log out diff --git a/mod/lesson/tests/behat/completion_condition_end_reached.feature b/mod/lesson/tests/behat/completion_condition_end_reached.feature index 3105c1c96bd..ad4b8f9a9c1 100644 --- a/mod/lesson/tests/behat/completion_condition_end_reached.feature +++ b/mod/lesson/tests/behat/completion_condition_end_reached.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -47,22 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7d893962a9a..58e8f55c783 100644 --- a/mod/lesson/tests/behat/completion_condition_time_spent.feature +++ b/mod/lesson/tests/behat/completion_condition_time_spent.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -49,7 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage And the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6989c1d5510..b0be900fc4e 100644 --- a/mod/lesson/tests/behat/date_availability.feature +++ b/mod/lesson/tests/behat/date_availability.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Forbidding lesson accesses until a specified date Given I add a "Lesson" to section "1" @@ -42,7 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +67,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 82ffcf10710..53ff09fc612 100644 --- a/mod/lesson/tests/behat/duplicate_lesson_page.feature +++ b/mod/lesson/tests/behat/duplicate_lesson_page.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | diff --git a/mod/lesson/tests/behat/import_fillintheblank_question.feature b/mod/lesson/tests/behat/import_fillintheblank_question.feature index b4bf1430fe4..9fa478cda71 100644 --- a/mod/lesson/tests/behat/import_fillintheblank_question.feature +++ b/mod/lesson/tests/behat/import_fillintheblank_question.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | diff --git a/mod/lesson/tests/behat/import_images.feature b/mod/lesson/tests/behat/import_images.feature index 679b2e3869a..c9f996c411f 100644 --- a/mod/lesson/tests/behat/import_images.feature +++ b/mod/lesson/tests/behat/import_images.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | diff --git a/mod/lesson/tests/behat/lesson_complete_report.feature b/mod/lesson/tests/behat/lesson_complete_report.feature index 4f802a3ca9e..5ac4b93e75d 100644 --- a/mod/lesson/tests/behat/lesson_complete_report.feature +++ b/mod/lesson/tests/behat/lesson_complete_report.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson name | @@ -47,7 +46,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 am on course page "Course 1" + When I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -85,13 +84,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -144,7 +143,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -163,7 +162,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Complete report" @@ -191,7 +190,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -199,7 +198,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 969c476bab1..f18b3b92a20 100644 --- a/mod/lesson/tests/behat/lesson_course_reset.feature +++ b/mod/lesson/tests/behat/lesson_course_reset.feature @@ -26,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test lesson name" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -46,7 +45,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +55,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I navigate to "Reports > Overview" in current page administration And I should see "Sam1 Student1" @@ -65,7 +64,7 @@ Feature: Lesson reset | Delete all lesson attempts | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +84,7 @@ Feature: Lesson reset | Delete all user overrides | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +103,7 @@ Feature: Lesson reset | Delete all group overrides | 1 | And I press "Reset course" And I press "Continue" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 d2559b489bf..787529f91dc 100644 --- a/mod/lesson/tests/behat/lesson_delete_answers.feature +++ b/mod/lesson/tests/behat/lesson_delete_answers.feature @@ -18,8 +18,7 @@ branch table contents | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -58,7 +57,7 @@ branch table contents And I should not see "Previous page" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I should not see "Previous page" @@ -81,7 +80,7 @@ branch table contents And I should not see "Incorrect answer" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 5bdb6979ca7..b687083df3a 100644 --- a/mod/lesson/tests/behat/lesson_edit_cluster.feature +++ b/mod/lesson/tests/behat/lesson_edit_cluster.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Lesson with cluster | | Description | Test lesson description | @@ -90,7 +89,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 cabd2d0a03f..2026ec004f4 100644 --- a/mod/lesson/tests/behat/lesson_edit_pages.feature +++ b/mod/lesson/tests/behat/lesson_edit_pages.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -70,7 +69,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -109,7 +108,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 80e41d401f6..e44d8532196 100644 --- a/mod/lesson/tests/behat/lesson_essay_question.feature +++ b/mod/lesson/tests/behat/lesson_essay_question.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -32,7 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +46,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 11f7aba79a2..d28ccbf40c1 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -33,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test lesson name" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -110,7 +109,7 @@ Feature: Lesson group override And I should see "Re-takes allowed" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +122,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +149,7 @@ Feature: Lesson group override And I should see "Password protected lesson" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +167,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +203,13 @@ Feature: Lesson group override And I should see "Lesson closes" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -239,13 +238,13 @@ Feature: Lesson group override And I should see "Lesson opens" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -264,7 +263,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +278,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +327,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 fae24fba2e2..0727d307657 100644 --- a/mod/lesson/tests/behat/lesson_informations_at_end.feature +++ b/mod/lesson/tests/behat/lesson_informations_at_end.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -44,7 +43,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e2cda05410b..61892e3a199 100644 --- a/mod/lesson/tests/behat/lesson_navigation.feature +++ b/mod/lesson/tests/behat/lesson_navigation.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Student navigation with pages and questions Given I add a "Lesson" to section "1" and I fill the form with: @@ -59,7 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Test lesson name" Then I should see "First page contents" And I press "Next page" @@ -107,7 +106,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c3f596839e3..6256039d7bf 100644 --- a/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature +++ b/mod/lesson/tests/behat/lesson_number_of_student_attempts.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: number of student attempts Given I add a "Lesson" to section "1" @@ -79,7 +78,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +118,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 c6f20885bef..9182b010900 100644 --- a/mod/lesson/tests/behat/lesson_outline_report.feature +++ b/mod/lesson/tests/behat/lesson_outline_report.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson name | @@ -47,7 +46,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 am on course page "Course 1" + When I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -85,13 +84,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -129,7 +128,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -143,7 +142,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" And I follow "Outline report" @@ -168,7 +167,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -176,7 +175,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 afdf92226e9..ed7307fdfe6 100644 --- a/mod/lesson/tests/behat/lesson_practice.feature +++ b/mod/lesson/tests/behat/lesson_practice.feature @@ -17,8 +17,7 @@ Feature: Practice mode in a lesson activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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: | Name | Test lesson name | @@ -44,14 +43,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I should see "Non-practice lesson" Scenario: Practice lesson doesn't record grades in the gradebook @@ -64,7 +63,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Practice lesson" And I set the following fields to these values: | True | 1 | @@ -85,7 +84,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3b4f697c9ab..8cdc5773b0a 100644 --- a/mod/lesson/tests/behat/lesson_progress_bar.feature +++ b/mod/lesson/tests/behat/lesson_progress_bar.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -58,7 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 a69b43edb0a..9abc8c0d0b3 100644 --- a/mod/lesson/tests/behat/lesson_question_attempts.feature +++ b/mod/lesson/tests/behat/lesson_question_attempts.feature @@ -16,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson name | @@ -94,7 +93,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -103,7 +102,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +117,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -162,7 +161,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b7770a11b6c..27201f1836f 100644 --- a/mod/lesson/tests/behat/lesson_report.feature +++ b/mod/lesson/tests/behat/lesson_report.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson name | @@ -81,7 +80,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -102,7 +101,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I follow "Reports" And I should see "Student 1" @@ -148,7 +147,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -160,7 +159,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 31b57c68f60..246fffa13f6 100644 --- a/mod/lesson/tests/behat/lesson_review.feature +++ b/mod/lesson/tests/behat/lesson_review.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -58,7 +57,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 28696ab388d..51ac6050e09 100644 --- a/mod/lesson/tests/behat/lesson_student_dashboard.feature +++ b/mod/lesson/tests/behat/lesson_student_dashboard.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: A completed lesson with only questions that allows multiple attempts Given I follow "Test lesson name" @@ -53,7 +52,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +103,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +139,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -174,7 +173,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -213,7 +212,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +243,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -332,7 +331,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -343,8 +342,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 am on homepage - And I am on course page "Course 2" + And I am on "Course 2" course homepage 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 +364,13 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 2" + And I am on "Course 2" course homepage 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 72c435c3885..c4b2b40e20d 100644 --- a/mod/lesson/tests/behat/lesson_student_resume.feature +++ b/mod/lesson/tests/behat/lesson_student_resume.feature @@ -15,8 +15,7 @@ Feature: In a lesson activity a student should | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" And I set the following fields to these values: | Name | Test lesson name | @@ -79,7 +78,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -155,7 +154,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I press "Next page" @@ -176,7 +175,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" And I should see "First page contents" And I log out @@ -263,7 +262,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +377,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 1c31bd0f484..5612457f85c 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -26,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I follow "Test lesson name" And I follow "Add a question page" And I set the field "Select a question type" to "True/false" @@ -104,7 +103,7 @@ Feature: Lesson user override And I should see "Re-takes allowed" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +116,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +143,7 @@ Feature: Lesson user override And I should see "Password protected lesson" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 +161,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +197,13 @@ Feature: Lesson user override And I should see "Lesson closes" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -233,13 +232,13 @@ Feature: Lesson user override And I should see "Lesson opens" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I should see "Cat is an amphibian" @@ -258,7 +257,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +272,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 1ed5e66dfd3..f2ecf79c43d 100644 --- a/mod/lesson/tests/behat/lesson_with_clusters.feature +++ b/mod/lesson/tests/behat/lesson_with_clusters.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Lesson with two clusters Given I add a "Lesson" to section "1" and I fill the form with: @@ -122,7 +121,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6553106852e..6a85581e79a 100644 --- a/mod/lesson/tests/behat/lesson_with_subcluster.feature +++ b/mod/lesson/tests/behat/lesson_with_subcluster.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Lesson with subcluster Given I add a "Lesson" to section "1" and I fill the form with: @@ -142,7 +141,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8f28b694c10..87b45ef4ac4 100644 --- a/mod/lesson/tests/behat/link_to_gradebook.feature +++ b/mod/lesson/tests/behat/link_to_gradebook.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | | Description | Test lesson description | @@ -43,7 +42,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -61,7 +60,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -76,7 +75,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -84,14 +83,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 am on course page "Course 1" + Given I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson" And I press "Next page" And I press "Next page" @@ -106,7 +105,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0010348bb8a..057620e6573 100644 --- a/mod/lesson/tests/behat/password_protection.feature +++ b/mod/lesson/tests/behat/password_protection.feature @@ -17,8 +17,7 @@ Feature: A teacher can password protect a lesson | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | | Description | Test lesson description | @@ -33,7 +32,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9ecbd15cd0d..ce3af1ae192 100644 --- a/mod/lesson/tests/behat/questions_images.feature +++ b/mod/lesson/tests/behat/questions_images.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -79,7 +78,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 46e9ba489e3..8c660232916 100644 --- a/mod/lesson/tests/behat/teacher_grade_essays.feature +++ b/mod/lesson/tests/behat/teacher_grade_essays.feature @@ -34,9 +34,7 @@ Feature: In a lesson activity, a non editing teacher can grade essay questions | student2 | G2 | | student3 | G3 | And I log in as "teacher1" - And I am on homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson name | | Description | Test lesson description | @@ -51,19 +49,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test lesson name" Then I should see "Grade essays" And I follow "Grade essays" @@ -88,7 +86,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 aaaf80c8ac5..dc013126262 100644 --- a/mod/lesson/tests/behat/time_limit.feature +++ b/mod/lesson/tests/behat/time_limit.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Lesson" to section "1" and I fill the form with: | Name | Test lesson | | Description | Test lesson description | @@ -35,7 +34,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 448be6c7aa3..1853c06e1e8 100644 --- a/mod/lti/tests/behat/addtool.feature +++ b/mod/lti/tests/behat/addtool.feature @@ -28,8 +28,7 @@ Feature: Add tools @javascript Scenario: Add a tool via the activity picker Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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. And I set the field "Activity name" to "Test tool activity 1" diff --git a/mod/lti/tests/behat/addtype.feature b/mod/lti/tests/behat/addtype.feature index 29a2085e0ba..2381230c8a0 100644 --- a/mod/lti/tests/behat/addtype.feature +++ b/mod/lti/tests/behat/addtype.feature @@ -18,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | And I open "Test tool activity 1" actions menu @@ -37,8 +36,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | And I open "Test tool activity 1" actions menu @@ -61,8 +59,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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "External tool" to section "1" and I fill the form with: | Activity name | Test tool activity 1 | And I open "Test tool activity 1" actions menu diff --git a/mod/lti/tests/behat/contentitem.feature b/mod/lti/tests/behat/contentitem.feature index 3a885bf45ab..3862dc977f5 100644 --- a/mod/lti/tests/behat/contentitem.feature +++ b/mod/lti/tests/behat/contentitem.feature @@ -29,16 +29,14 @@ 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Teaching Tool 1" to section "1" Then the "Select content" "button" should be enabled @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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Teaching Tool 1" to section "1" And the "Select content" "button" should be enabled And I set the field "Activity name" to "Test tool activity 1" @@ -62,8 +60,7 @@ Feature: Content-Item support And I press "Save changes" And I log out When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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. And the field "Preconfigured tool" matches value "Automatic, based on tool URL" @@ -89,8 +86,7 @@ Feature: Content-Item support @javascript Scenario: Editing a manually configured external tool Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "External tool" to section "1" And the field "Preconfigured tool" matches value "Automatic, based on tool URL" And I set the field "Activity name" to "Test tool activity 1" diff --git a/mod/quiz/report/grading/tests/behat/grading.feature b/mod/quiz/report/grading/tests/behat/grading.feature index 4ea9ce5c72d..09e648b4fff 100644 --- a/mod/quiz/report/grading/tests/behat/grading.feature +++ b/mod/quiz/report/grading/tests/behat/grading.feature @@ -18,9 +18,7 @@ Feature: Basic use of the Manual grading report | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Quiz 1 | | Description | Quiz 1 description | @@ -31,7 +29,7 @@ Feature: Basic use of the Manual grading report | Grade | 100% | # Check report shows nothing when there are no attempts. - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Quiz 1" When I navigate to "Results > Manual grading" in current page administration Then I should see "Manual grading" @@ -43,7 +41,7 @@ Feature: Basic use of the Manual grading report # Create an attempt. And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Quiz 1" And I press "Attempt quiz now" And I should see "Question 1" @@ -58,7 +56,7 @@ Feature: Basic use of the Manual grading report # Use the manual grading report. And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 1ad7e59db24..8612ffdedb7 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 1d9081b6667..a35e68f4302 100644 --- a/mod/quiz/tests/behat/add_quiz.feature +++ b/mod/quiz/tests/behat/add_quiz.feature @@ -17,8 +17,7 @@ Feature: Add a quiz | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Test quiz name | | Description | Test quiz description | @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 af34a385cca..e20c17ed913 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 20126c626b7..ab48d67dd06 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 8b308f0b581..218976ad867 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 633408c92f1..6155408b6b0 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0bf6fc731fd..7235af6109a 100644 --- a/mod/quiz/tests/behat/backup.feature +++ b/mod/quiz/tests/behat/backup.feature @@ -26,9 +26,7 @@ Feature: Backup and restore of quizzes | question | page | | TF1 | 1 | | TF2 | 2 | - And I am on site homepage - When I am on course page "Course 1" - And I turn editing mode on + When I am on "Course 1" course homepage with editing mode on And I duplicate "Quiz 1" activity editing the new copy with: | Name | Quiz 2 | And I follow "Quiz 2" @@ -38,8 +36,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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 320a78ecb8e..735b7eda23b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9cf20d2f9b6..f8e783c09e1 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0ca347d4f2d..46fe193d9c8 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f900e9621da..6a0d36bc640 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6c55c09e68e..a5d37a153de 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 07209cd223a..5410cf7b29a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d0cb0f69226..813ab55b407 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 de1fc38947d..16d3dcd02c4 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 84b4c1d9947..90088eec263 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ad0c6ff6a51..5236cac72b9 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Quiz 1" And I press "Attempt quiz now" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 ce4f10085de..72c2c394552 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9c815c84f71..d4e84f77644 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 am on course page "Course 1" + And I am on "Course 1" course homepage @javascript Scenario: Preview a quiz diff --git a/mod/quiz/tests/behat/quiz_reset.feature b/mod/quiz/tests/behat/quiz_reset.feature index f4b1089f6f7..d2d877ab91d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 247cf63e28c..5174a318755 100644 --- a/mod/quiz/tests/behat/settings_form_fields_disableif.feature +++ b/mod/quiz/tests/behat/settings_form_fields_disableif.feature @@ -19,8 +19,7 @@ Feature: Settings form fields disabled if not required | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Depending on the number of attempts, different form fields are disabled. diff --git a/mod/resource/tests/behat/display_resource.feature b/mod/resource/tests/behat/display_resource.feature index 7f791e76509..39ad86e10ba 100644 --- a/mod/resource/tests/behat/display_resource.feature +++ b/mod/resource/tests/behat/display_resource.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on @javascript Scenario: Specifying no additional display options for a file resource @@ -31,7 +30,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 am on course page "Course 1" + And I am on "Course 1" course homepage And ".activity.resource .resourcelinkdetails" "css_element" should not exist And I log out @@ -49,7 +48,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5d3699ec025..e6778481acc 100644 --- a/mod/scorm/tests/behat/add_scorm.feature +++ b/mod/scorm/tests/behat/add_scorm.feature @@ -18,8 +18,7 @@ Feature: Add scorm activity | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "SCORM package" to section "1" And I set the following fields to these values: | Name | Awesome SCORM package | @@ -31,11 +30,11 @@ Feature: Add scorm activity And I should see "Preview" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage diff --git a/mod/scorm/tests/behat/completion_condition_require_status.feature b/mod/scorm/tests/behat/completion_condition_require_status.feature index 81a0417fe1a..42d49f44af8 100644 --- a/mod/scorm/tests/behat/completion_condition_require_status.feature +++ b/mod/scorm/tests/behat/completion_condition_require_status.feature @@ -19,8 +19,7 @@ Feature: Scorm multi-sco completion @javascript Scenario: Test completion with a single sco completion. When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -37,7 +36,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -50,14 +49,13 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -74,7 +72,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -87,11 +85,11 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -184,5 +182,5 @@ Feature: Scorm multi-sco completion And I am on homepage And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 6501d494eaa..d51c632a2a0 100644 --- a/mod/scorm/tests/behat/missing_org.feature +++ b/mod/scorm/tests/behat/missing_org.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "SCORM package" to section "1" And I set the following fields to these values: | Name | MissingOrg SCORM package | @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3507b06ef7a..69a5c8348df 100644 --- a/mod/scorm/tests/behat/multisco_review_mode.feature +++ b/mod/scorm/tests/behat/multisco_review_mode.feature @@ -19,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -35,7 +34,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -45,8 +44,7 @@ Feature: Scorm multi-sco review mode. And I follow "Exit activity" And I wait until the page is ready And I should see "Basic Multi-sco SCORM package" - And I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Basic Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -55,8 +53,7 @@ Feature: Scorm multi-sco review mode. @javascript Scenario: Test review mode with all scos completed. When I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I navigate to "Edit settings" in current page administration And I set the following fields to these values: | Enable completion tracking | Yes | @@ -73,7 +70,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "ADV Multi-sco SCORM package" And I should see "Normal" And I press "Enter" @@ -168,8 +165,7 @@ Feature: Scorm multi-sco review mode. And I follow "Exit activity" And I wait until the page is ready And I should see "ADV Multi-sco SCORM package" - And I am on homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 77a6fccd2f6..71fe93b9d1a 100644 --- a/mod/survey/tests/behat/survey_completion.feature +++ b/mod/survey/tests/behat/survey_completion.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on Scenario: Require survey view Given I add a "Survey" to section "1" and I fill the form with: @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage Then the "Test survey name" "survey" activity with "auto" completion should be marked as complete Scenario: Require survey submission @@ -42,5 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 de41090e877..88472193da4 100644 --- a/mod/survey/tests/behat/survey_types.feature +++ b/mod/survey/tests/behat/survey_types.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "Survey" to section "1" and I fill the form with: | Name | Test survey name | | Survey type | ATTLS (20 item version) | diff --git a/mod/wiki/tests/behat/collaborative_individual.feature b/mod/wiki/tests/behat/collaborative_individual.feature index b6f8e5d3c5e..9bedf03e4c0 100644 --- a/mod/wiki/tests/behat/collaborative_individual.feature +++ b/mod/wiki/tests/behat/collaborative_individual.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Collaborative wiki name | | Description | Collaborative wiki description | @@ -32,7 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +44,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 am on course page "Course 1" + And I am on "Course 1" course homepage When I follow "Collaborative wiki name" Then I should see "Collaborative teacher1 edition" And I follow "Edit" @@ -54,7 +53,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Individual wiki name" And I should not see "Individual teacher1 edition" And I press "Create page" @@ -63,7 +62,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Individual wiki name" And I should not see "Individual teacher1 edition" And I should not see "Individual student1 edition" @@ -73,10 +72,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Collaborative wiki name" And I should see "Collaborative student1 edition" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 6a7a929d732..ab60aab37f5 100644 --- a/mod/wiki/tests/behat/edit_tags.feature +++ b/mod/wiki/tests/behat/edit_tags.feature @@ -17,8 +17,7 @@ Feature: Edited wiki pages handle tags correctly | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | | Description | Test wiki description | @@ -28,7 +27,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test wiki name" And I press "Create page" When I set the following fields to these values: @@ -54,7 +53,7 @@ Feature: Edited wiki pages handle tags correctly And I press "Continue" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 c97a984db1c..4e4d2ff64f4 100644 --- a/mod/wiki/tests/behat/page_history.feature +++ b/mod/wiki/tests/behat/page_history.feature @@ -20,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | | Description | Test wiki description | @@ -34,7 +33,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test wiki name" And I follow "Edit" And I set the following fields to these values: @@ -42,7 +41,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 09a0bd96af7..7ae688c2123 100644 --- a/mod/wiki/tests/behat/preview_page.feature +++ b/mod/wiki/tests/behat/preview_page.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | | Description | Test wiki description | @@ -26,7 +25,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e9f3881565a..fb2bef9c418 100644 --- a/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature +++ b/mod/wiki/tests/behat/reset_wiki_comments_tags_files.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki | | Description | Test wiki description | diff --git a/mod/wiki/tests/behat/wiki_comments.feature b/mod/wiki/tests/behat/wiki_comments.feature index 5150d980b2d..6391e9fc176 100644 --- a/mod/wiki/tests/behat/wiki_comments.feature +++ b/mod/wiki/tests/behat/wiki_comments.feature @@ -19,8 +19,7 @@ Feature: Users can comment on wiki pages | student1 | C1 | student | | student2 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | | Description | Test wiki description | @@ -33,7 +32,7 @@ Feature: Users can comment on wiki pages And I press "Save" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test wiki name" And I follow "Comments" And I follow "Add comment" @@ -59,7 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test wiki name" And I follow "Comments" Then "Edit" "link" should not exist in the "wiki-comments" "table" @@ -69,7 +68,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 de96f343f4f..2c06b826319 100644 --- a/mod/wiki/tests/behat/wiki_formats.feature +++ b/mod/wiki/tests/behat/wiki_formats.feature @@ -15,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Test wiki name | | Description | Test wiki description | diff --git a/mod/wiki/tests/behat/wiki_search.feature b/mod/wiki/tests/behat/wiki_search.feature index a2d65b25f83..e71436f1f60 100644 --- a/mod/wiki/tests/behat/wiki_search.feature +++ b/mod/wiki/tests/behat/wiki_search.feature @@ -22,8 +22,7 @@ Feature: Users can search wikis @javascript Scenario: Searching collaborative wiki Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Collaborative wiki name | | Description | Collaborative wiki description | @@ -34,10 +33,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Collaborative wiki name" And I follow "new page" And I press "Create page" @@ -61,8 +60,7 @@ Feature: Users can search wikis @javascript Scenario: Searching individual wiki Given I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Individual wiki name | | Description | Individual wiki description | @@ -75,7 +73,7 @@ Feature: Users can search wikis And I press "Save" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Individual wiki name" And I press "Create page" And I set the following fields to these values: @@ -87,7 +85,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Individual wiki name" And I press "Create page" And I set the following fields to these values: @@ -100,7 +98,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Individual wiki name" And I set the field "searchstring" to "page" And I press "Search wikis" @@ -128,8 +126,7 @@ Feature: Users can search wikis | student1 | G1 | | student2 | G2 | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Wiki" to section "1" and I fill the form with: | Wiki name | Group wiki name | | Description | Wiki description | @@ -154,7 +151,7 @@ Feature: Users can search wikis And I press "Save" And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Group wiki name" And I follow "new page1" And I press "Create page" @@ -169,7 +166,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Group wiki name" And I follow "new page2" And I press "Create page" @@ -185,5 +182,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 bd29685a571..269a59a7d70 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 7612f70ccee..4ec1c45bde9 100644 --- a/mod/workshop/tests/behat/embedded_images.feature +++ b/mod/workshop/tests/behat/embedded_images.feature @@ -19,9 +19,7 @@ Feature: Teachers can embed images into instructions and conclusion fields And I follow "Manage private files" 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on # Create and edit the workshop. When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Workshop with embedded images | diff --git a/mod/workshop/tests/behat/example_submission.feature b/mod/workshop/tests/behat/example_submission.feature index ee046d2a184..54f6fa379cf 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 am on course page "Course1" + And I am on "Course1" course homepage 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 bf6e124352d..852e542038e 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 d1b788fff3d..a11d811d8a4 100644 --- a/mod/workshop/tests/behat/grade_to_pass.feature +++ b/mod/workshop/tests/behat/grade_to_pass.feature @@ -17,8 +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 am on course page "Course1" - And I turn editing mode on + And I am on "Course1" course homepage with editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Awesome workshop | | Description | Grades to pass are set here | @@ -32,8 +31,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 am on course page "Course1" - And I turn editing mode on + And I am on "Course1" course homepage with editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Another awesome workshop | | Description | No grades to pass are set here | @@ -47,8 +45,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 am on course page "Course1" - And I turn editing mode on + And I am on "Course1" course homepage with editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Almost awesome workshop | | Description | Invalid grade to pass is set here | @@ -58,8 +55,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 am on course page "Course1" - And I turn editing mode on + And I am on "Course1" course homepage with editing mode on When I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Almost awesome workshop | | Description | Invalid grade to pass is set here | @@ -69,8 +65,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 am on course page "Course1" - And I turn editing mode on + And I am on "Course1" course homepage with editing mode on And I add a "Workshop" to section "1" and I fill the form with: | Workshop name | Super awesome workshop | | Description | Grade to pass are set and then unset here | diff --git a/mod/workshop/tests/behat/workshop_assessment.feature b/mod/workshop/tests/behat/workshop_assessment.feature index 36f10646583..d434c9db878 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 am on course page "Course1" + And I am on "Course1" course homepage 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 af8d1539623..aae0dc5cf6c 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b8e57a97362..b8469431b2f 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 1ef4b3468a6..10f900de9a8 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 8313f7da0dc..8c6c8b131ef 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 f7854e050d5..eed354c41d0 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 9f40dec4c77..5bccbb39fb6 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 aa755e6a63f..c9d0bb24263 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Questions" node in "Course administration > Question bank" @javascript @@ -39,8 +39,7 @@ Feature: A teacher can delete questions in the question bank @javascript Scenario: Delete a question used in a quiz - Given I am on course page "Course 1" - And I turn editing mode on + Given I am on "Course 1" course homepage with editing mode on And I add a "Quiz" to section "1" and I fill the form with: | Name | Test quiz | And I add a "True/False" question to the "Test quiz" quiz with: @@ -52,7 +51,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 261bdc71bdb..b71221f5fc1 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 639b5342375..b772b633746 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 01c7f4d5e9d..138becbeace 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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: A new question category can be created When I navigate to "Categories" node in "Course administration > Question bank" diff --git a/question/tests/behat/sort_questions.feature b/question/tests/behat/sort_questions.feature index f8e5d85ac85..c3cc42c7ddc 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 29ac279ce64..df92932c0cd 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 5437d6569c7..5c4633ad925 100644 --- a/question/type/ddimageortext/tests/behat/backup_and_restore.feature +++ b/question/type/ddimageortext/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a drag and drop onto image question And quiz "Test quiz" contains the following questions: | Drag onto image | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 4b9e806210b..2e535bfed94 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f0da03a3c2c..66791de941a 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 b029f2d551d..ec8e7654e71 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 08906fab267..764277067d9 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2224ecfd742..f11c6270dcb 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 21a331b588f..f9648c54742 100644 --- a/question/type/ddmarker/tests/behat/backup_and_restore.feature +++ b/question/type/ddmarker/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a drag and drop markers question And quiz "Test quiz" contains the following questions: | Drag markers | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 eeae29e4769..b6a7db20a0d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6e854678c02..6492c3177a6 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 20a2235420b..8da2e6e3c00 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 733a205b884..e5ff6cb785e 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 dec424106d1..dc619d3fe8f 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 076f1205f20..0234bd9821e 100644 --- a/question/type/ddwtos/tests/behat/backup_and_restore.feature +++ b/question/type/ddwtos/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a drag and drop into text question And quiz "Test quiz" contains the following questions: | Drag to text | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 8a49c2f1d22..6e66eacc79d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 04ba39f3e88..c43122e786a 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 a615ca32784..943de30a885 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 3ac9c59bb8c..60deb7559df 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b31d1b33e38..7af1895baf7 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7ffe2a663d3..d6ce6e80165 100644 --- a/question/type/description/tests/behat/backup_and_restore.feature +++ b/question/type/description/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a Description question And quiz "Test quiz" contains the following questions: | description-001 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 6e1e262aed9..7803872694d 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3cc0edd395e..4a2761acc73 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f32f7306d35..9f1be1f4602 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 c6920e74970..474b785f127 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2114e0979be..a4936bf23c7 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 52381ad5bc9..a29a5f88bec 100644 --- a/question/type/essay/tests/behat/backup_and_restore.feature +++ b/question/type/essay/tests/behat/backup_and_restore.feature @@ -24,7 +24,7 @@ Feature: Test duplicating a quiz containing an Assay question | essay-002 | 1 | | essay-003 | 1 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 8faeba76649..709e51af7a5 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 b1460a68c82..09429d9b52c 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 f622b429e18..7037dea7d3d 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 81b40f3f71f..7eafce8797b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 72ef720398e..bb23c93092b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 7695b5392e1..18321df6e12 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 50a67f2f9f0..b12adfbeee2 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 e7ad3385037..59bfa025836 100644 --- a/question/type/match/tests/behat/backup_and_restore.feature +++ b/question/type/match/tests/behat/backup_and_restore.feature @@ -20,7 +20,7 @@ Feature: Test duplicating a quiz containing a Matching question And quiz "Test quiz" contains the following questions: | matching-001 | 1 | And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 ce144ecb694..d42c2b7e237 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 0dff7bde7e3..8901f8790ae 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2471c19911c..9db62f1ffb7 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 15b166a8df1..7ff32c5c3fc 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 6faf8845735..3948b26f5f3 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 a9991082d40..d88d51a2dbd 100644 --- a/question/type/multichoice/tests/behat/backup_and_restore.feature +++ b/question/type/multichoice/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a Multiple choice question And quiz "Test quiz" contains the following questions: | Multi-choice-001 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 1e409d73d53..691f374318a 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3af15d5cba1..d2715f39869 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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Export a Multiple choice question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/multichoice/tests/behat/import.feature b/question/type/multichoice/tests/behat/import.feature index 0facf8872e5..f39f5821016 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 dfef1f65bf5..22f2e3f966b 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 53a561f3157..c8ab2876e8c 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 ada612789ce..afb47a18694 100644 --- a/question/type/shortanswer/tests/behat/backup_and_restore.feature +++ b/question/type/shortanswer/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a Short answer question And quiz "Test quiz" contains the following questions: | shortanswer-001 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 08e5c399a32..0587a69fd73 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 29eae716e6e..998cb72d0a4 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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Export a Short answer question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/shortanswer/tests/behat/import.feature b/question/type/shortanswer/tests/behat/import.feature index ea7b9b517ee..ded5ebca69d 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 29f5fe5e1db..7bb8a8d6d08 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 58778c43518..4155d280b62 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d1800923e64..32daf26ec19 100644 --- a/question/type/truefalse/tests/behat/backup_and_restore.feature +++ b/question/type/truefalse/tests/behat/backup_and_restore.feature @@ -20,8 +20,7 @@ Feature: Test duplicating a quiz containing a True/False question And quiz "Test quiz" contains the following questions: | true-false-001 | 1 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage @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 e35bc4f787d..2a18f840d64 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 041e89970fc..481ae36fd0a 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 am on course page "Course 1" + And I am on "Course 1" course homepage Scenario: Export a True/False question When I navigate to "Export" node in "Course administration > Question bank" diff --git a/question/type/truefalse/tests/behat/import.feature b/question/type/truefalse/tests/behat/import.feature index 592f9c39a86..4230bd2e18a 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 am on course page "Course 1" + And I am on "Course 1" course homepage @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 976ab3a5e97..920c5c0c1a1 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 4df98072efc..3c571e1d705 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + Given I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Home" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 3840e3294b0..3d2769b811e 100644 --- a/report/log/tests/behat/filter_log_actions.feature +++ b/report/log/tests/behat/filter_log_actions.feature @@ -9,14 +9,13 @@ Feature: In a report, admin can filter log data by action | fullname | shortname | category | groupmode | | Course 1 | C1 | 0 | 1 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with 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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 db5e05e5f4f..356468dbb7b 100644 --- a/report/log/tests/behat/user_log.feature +++ b/report/log/tests/behat/user_log.feature @@ -17,8 +17,7 @@ Feature: User can view activity log. | teacher1 | C1 | editingteacher | | student1 | C1 | student | And I log in as "teacher1" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Assignment" to section "1" and I fill the form with: | Assignment name | Test assignment name | | Description | Submit your online text | @@ -26,7 +25,7 @@ Feature: User can view activity log. | assignsubmission_file_enabled | 0 | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test assignment name" When I press "Add submission" And I set the following fields to these values: @@ -37,7 +36,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 1" When I follow "Today's logs" @@ -53,7 +52,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 3af5e14e85b..913fa976d85 100644 --- a/report/loglive/tests/behat/loglive_report.feature +++ b/report/loglive/tests/behat/loglive_report.feature @@ -13,8 +13,7 @@ Feature: In a report, admin can see loglive data And I click on "Enable" "link" in the "Legacy log" "table_row" And the following config values are set as admin: | loglegacy | 1 | logstore_legacy | - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Database" to section "3" and I fill the form with: | Name | Test name | | Description | Test database description | @@ -38,9 +37,9 @@ 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 am on course page "Course module created" + And I follow "Course module created" And I switch to "action" window - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I add a "Database" to section "3" and I fill the form with: | Name | Test name2 | | Description | Test database description | @@ -60,9 +59,9 @@ 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 am on course page "Course_add mod" + And I follow "course_add mod" And I switch to "action" window - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 b933dca0077..3f0a30cc037 100644 --- a/report/outline/tests/behat/outline.feature +++ b/report/outline/tests/behat/outline.feature @@ -19,8 +19,7 @@ Feature: View an outline report | student1 | C1 | student | | student2 | C1 | student | When I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Forum" to section "1" and I fill the form with: | Forum name | Forum name | | Description | Forum description | @@ -36,17 +35,17 @@ Feature: View an outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -57,17 +56,17 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -80,17 +79,17 @@ Feature: View an outline report | loglegacy | 1 | logstore_legacy | And I log out And I log in as "student1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Book name" And I log out And I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -99,23 +98,23 @@ Feature: View an outline report Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" And "Enable" "link" should exist in the "Legacy log" "table_row" And I click on "Disable" "link" in the "Standard log" "table_row" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" And I am on site homepage And I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -123,25 +122,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" And I am on site homepage And I log out And I log in as "student2" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Forum name" And I am on site homepage And I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -149,7 +148,7 @@ Feature: View an outline report Scenario: No views from any users Given I log out When I log in as "teacher1" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 9d7f61203cd..4cbd2c3110b 100644 --- a/report/outline/tests/behat/user.feature +++ b/report/outline/tests/behat/user.feature @@ -17,8 +17,7 @@ Feature: View the user page for the outline report | teacher1 | C1 | editingteacher | | student1 | C1 | student | When I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "1" and I fill the form with: | Name | Folder name | | Description | Folder description | @@ -35,13 +34,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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 am on course page "Course 1" + And I am on "Course 1" course homepage # We want to view this multiple times, to make sure the count is working. And I follow "URL name" And I follow "URL name" @@ -63,13 +62,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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 am on course page "Course 1" + And I am on "Course 1" course homepage # We want to view this multiple times, to make sure the count is working. And I follow "URL name" And I follow "URL name" @@ -93,13 +92,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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 67a8fe3e3a4..854c4b2b5b0 100644 --- a/report/participation/tests/behat/filter_participation.feature +++ b/report/participation/tests/behat/filter_participation.feature @@ -17,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book name | | Description | Test book | @@ -38,11 +37,11 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test book name" And I log out When I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -59,7 +58,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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test book name" And I log out And I log in as "admin" @@ -67,11 +66,11 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test book name" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -81,11 +80,11 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I follow "Test book name" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 dee871625df..88aae4ed420 100644 --- a/report/participation/tests/behat/message_participants.feature +++ b/report/participation/tests/behat/message_participants.feature @@ -21,8 +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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Book" to section "1" and I fill the form with: | Name | Test book name | | Description | Test book | @@ -32,13 +31,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 +59,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 9c98831b190..e3416e5e304 100644 --- a/repository/recent/tests/behat/add_recent.feature +++ b/repository/recent/tests/behat/add_recent.feature @@ -14,9 +14,7 @@ Feature: Recent files repository lists the recently used files And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "Folder" to section "1" And I set the following fields to these values: | Name | Folder name | diff --git a/repository/tests/behat/cancel_add_file.feature b/repository/tests/behat/cancel_add_file.feature index ca81f690147..7f9bcf81e5e 100644 --- a/repository/tests/behat/cancel_add_file.feature +++ b/repository/tests/behat/cancel_add_file.feature @@ -13,9 +13,7 @@ Feature: A selected file can be cancelled And I follow "Manage private files" 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 am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on When I add a "Folder" to section "1" And I set the following fields to these values: | Name | Folder name | diff --git a/repository/tests/behat/create_folders.feature b/repository/tests/behat/create_folders.feature index 707d1e9abc3..be52aedfc82 100644 --- a/repository/tests/behat/create_folders.feature +++ b/repository/tests/behat/create_folders.feature @@ -10,8 +10,7 @@ Feature: Create folders in the file manager | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "0" And I set the following fields to these values: | Name | Folder resource | diff --git a/repository/tests/behat/create_shortcut.feature b/repository/tests/behat/create_shortcut.feature index 546ac36d679..1cac3cbc3b2 100644 --- a/repository/tests/behat/create_shortcut.feature +++ b/repository/tests/behat/create_shortcut.feature @@ -20,8 +20,7 @@ Feature: Create shortcuts And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager Then I should see "empty.txt" in the "div.fp-content" "css_element" And I press "Save changes" - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "1" And I set the following fields to these values: | Name | Test folder | diff --git a/repository/tests/behat/overwrite_file.feature b/repository/tests/behat/overwrite_file.feature index 2859291baf1..2d2c677132a 100644 --- a/repository/tests/behat/overwrite_file.feature +++ b/repository/tests/behat/overwrite_file.feature @@ -28,9 +28,7 @@ Feature: Overwrite file feature | Save as | empty_copy.txt | And I should see "2" elements in "Files" filemanager And I press "Save changes" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "1" And I set the following fields to these values: | Name | Test folder | diff --git a/repository/tests/behat/zip_and_unzip.feature b/repository/tests/behat/zip_and_unzip.feature index b2288fc5ed1..ba2c61b7984 100644 --- a/repository/tests/behat/zip_and_unzip.feature +++ b/repository/tests/behat/zip_and_unzip.feature @@ -10,9 +10,7 @@ Feature: Zip folders and unzip compressed files | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" - And I turn editing mode on + And I am on "Course 1" course homepage with editing mode on And I add a "Folder" to section "0" And I set the following fields to these values: | Name | Folder resource | diff --git a/theme/boost/tests/behat/contextmenu.feature b/theme/boost/tests/behat/contextmenu.feature index 3cffde0843b..7e5a1002634 100644 --- a/theme/boost/tests/behat/contextmenu.feature +++ b/theme/boost/tests/behat/contextmenu.feature @@ -17,8 +17,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -26,7 +25,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 35a96a2f44a..37fd45046e3 100644 --- a/theme/boost/tests/behat/regionmainsettingsmenu.feature +++ b/theme/boost/tests/behat/regionmainsettingsmenu.feature @@ -20,8 +20,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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" @@ -35,8 +34,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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 bd84abbd7d0..c14ca659a37 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 am on course page "Course preferences" + And I follow "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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 d31d8c7add0..58d99cc90fd 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + When I am on "Course 1" course homepage 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 f08557d17c9..7b0db6c85d9 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 2af9ea9992d..7b7efa0855a 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 am on course page "Course 1" + And I am on "Course 1" course homepage # 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to course participants And I follow "Student 2" And I follow "Full profile" @@ -91,7 +91,7 @@ Feature: Access to full profiles of users @javascript Scenario: View full profiles of someone in the same group in a course with separate groups. Given I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage And I navigate to "Edit settings" node in "Course administration" And I set the following fields to these values: | Group mode | Separate groups | @@ -105,7 +105,7 @@ Feature: Access to full profiles of users And I should see "The details of this user are not available to you" And I log out And I log in as "admin" - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 00cc040dbc5..3ac3a892eee 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 010f79e8f2d..5ca1b0e05da 100644 --- a/user/tests/behat/view_preferences_page.feature +++ b/user/tests/behat/view_preferences_page.feature @@ -27,28 +27,26 @@ 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 am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage When I navigate to course participants And I follow "Student 2" Then I should not see "Preferences" in the "region-main" "region" Scenario: Administrators and Managers can view another user's permissions page. Given I log in as "admin" - And I am on site homepage - And I am on course page "Course 1" + And I am on "Course 1" course homepage 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 am on course page "Course 1" + And I am on "Course 1" course homepage When I navigate to course participants And I follow "Student 2" Then I should see "Preferences" in the "region-main" "region"