Commit c987d1b2 authored by Simey Lameze's avatar Simey Lameze Committed by Damyon Wiese
Browse files

MDL-58265 core_test: replace all uses of I follow course steps

Part of MDL-55611 epic.
parent 95f11fde
......@@ -13,7 +13,7 @@ Feature: Highlight non-inherited permissions
@javascript
Scenario: Override a permission
Given I follow "Course fullname"
Given I am on course page "Course fullname"
And I navigate to "Users > Permissions" in current page administration
And I select "Manager (0)" from the "roleid" singleselect
And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row"
......
......@@ -50,7 +50,7 @@ Feature: Manage availability conditions
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
And I expand all fieldsets
......
......@@ -58,7 +58,7 @@ Feature: Set up contextual data for tests
| Grouping 2 | C1 | GG2 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Users > Groups" in current page administration
Then I should see "Group 1"
And I should see "Group 2"
......@@ -88,7 +88,7 @@ Feature: Set up contextual data for tests
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Users > Permissions" in current page administration
And I set the field "Advanced role override" to "Student (1)"
Then "mod/forum:editanypost" capability has "Allow" permission
......@@ -108,7 +108,7 @@ Feature: Set up contextual data for tests
| user | course | role |
| student1 | C1 | student |
When I log in as "student1"
And I follow "Course 1"
And I am on course page "Course 1"
Then I should see "Topic 1"
Scenario: Add role assigns
......@@ -145,23 +145,23 @@ Feature: Set up contextual data for tests
And I log out
And I log in as "user2"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user3"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user4"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user5"
And I should see "You are logged in as"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I should see "You can not enrol yourself in this course."
Scenario: Add modules
......@@ -200,7 +200,7 @@ Feature: Set up contextual data for tests
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
Then I should see "Test assignment name"
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
......@@ -262,7 +262,7 @@ Feature: Set up contextual data for tests
| GG1 | G1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Users > Groups" in current page administration
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
......@@ -321,7 +321,7 @@ Feature: Set up contextual data for tests
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin"
And I am on course index
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "View > Grader report" in the course gradebook
Then I should see "Grade category 1"
And I should see "Grade sub category 2"
......@@ -345,7 +345,7 @@ Feature: Set up contextual data for tests
| Test Grade Item 3 | C1 | Grade sub category 2 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Grade Item 1"
And I follow "Edit Test Grade Item 1"
......@@ -374,7 +374,7 @@ Feature: Set up contextual data for tests
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Scales" in the course gradebook
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
......@@ -396,7 +396,7 @@ Feature: Set up contextual data for tests
| enableoutcomes | 1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I follow "Outcomes"
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
......@@ -425,7 +425,7 @@ Feature: Set up contextual data for tests
| enableoutcomes | 1 |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Setup > Gradebook setup" in the course gradebook
Then I should see "Test Outcome Grade Item 1"
And I follow "Edit Test Outcome Grade Item 1"
......@@ -443,5 +443,5 @@ Feature: Set up contextual data for tests
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
Then I should see "Online users"
......@@ -19,7 +19,7 @@ Feature: Transform date time string arguments
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I log out
......@@ -31,7 +31,7 @@ Feature: Edit capabilities
Scenario: Course capabilities overrides
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
......@@ -45,7 +45,7 @@ Feature: Edit capabilities
Scenario: Module capabilities overrides
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | I'm the name |
......
......@@ -34,7 +34,7 @@ Feature: Verify that all form fields values can be get and set
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Reset" node in "Course administration"
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
......@@ -49,7 +49,7 @@ Feature: Verify that all form fields values can be get and set
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I follow "Test this one"
And I press "Create page"
......@@ -100,7 +100,7 @@ Feature: Verify that all form fields values can be get and set
| Default format | HTML |
| Force format | 1 |
And I press "Cancel"
And I follow "Course 1"
And I am on course page "Course 1"
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
......@@ -116,7 +116,7 @@ Feature: Verify that all form fields values can be get and set
And the field "two" matches value ""
# Check if field xpath set/match works.
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
......@@ -129,7 +129,7 @@ Feature: Verify that all form fields values can be get and set
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Then I follow "Course 1"
Then I am on course page "Course 1"
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
And I set the field "groups" to "Group 2"
......@@ -141,7 +141,7 @@ Feature: Verify that all form fields values can be get and set
And the "members" select box should contain "Student 2"
And the "members" select box should not contain "Student 3"
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
And I follow "Course 1"
And I am on course page "Course 1"
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson |
......
......@@ -24,7 +24,7 @@ Feature: Forms manipulation
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Quiz" to section "1"
When I expand all fieldsets
......
......@@ -121,7 +121,7 @@ Feature: Add customised file types
And I press "Save changes"
# Create a resource activity and add it to a course
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
When I add a "File" to section "1"
And I set the following fields to these values:
......
......@@ -18,7 +18,7 @@ Feature: tool_monitor_rule
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I click on "Enable" "link"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
......@@ -46,7 +46,7 @@ Feature: tool_monitor_rule
Scenario: Add a rule on course level
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I press "Add a new rule"
And I set the following fields to these values:
......@@ -66,7 +66,7 @@ Feature: tool_monitor_rule
Scenario: Delete a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete the rule \"New rule course level\"?"
......@@ -76,7 +76,7 @@ Feature: tool_monitor_rule
Scenario: Edit a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Edit rule" "link"
And I set the following fields to these values:
......@@ -95,7 +95,7 @@ Feature: tool_monitor_rule
Scenario: Duplicate a rule on course level
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Duplicate rule" "link" in the "New rule course level" "table_row"
Then I should see "Rule successfully duplicated"
......@@ -154,7 +154,7 @@ Feature: tool_monitor_rule
Scenario: Duplicate a rule on site level
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
When I click on "Duplicate rule" "link" in the "New rule site level" "table_row"
Then I should see "Rule successfully duplicated"
......
......@@ -23,7 +23,7 @@ Feature: tool_monitor_subscriptions
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
And I click on "Enable" "link"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
And I press "Add a new rule"
And I set the following fields to these values:
......@@ -133,7 +133,7 @@ Feature: tool_monitor_subscriptions
And I should see "Subscription successfully created"
And "#toolmonitorsubs_r0" "css_element" should exist
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I trigger cron
And I am on site homepage
When I click on ".popover-region-notifications" "css_element"
......
......@@ -23,7 +23,7 @@ Feature: Backup user data
@javascript
Scenario: Delete and restore a quiz with user data
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Quiz" to section "1" and I fill the form with:
| Name | Quiz 1 |
......@@ -44,7 +44,7 @@ Feature: Backup user data
| Feedback for the response 'False'. | So you think it is false |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I am on course page "Course 1"
And I follow "Quiz 1"
And I press "Attempt quiz now"
And I click on "True" "radio" in the "First question" "question"
......@@ -55,7 +55,7 @@ Feature: Backup user data
And I should see "5.00 out of 10.00"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I delete "Quiz 1" activity
And I run all adhoc tasks
......@@ -64,7 +64,7 @@ Feature: Backup user data
And I click on "Restore" "link" in the "region-main" "region"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I am on course page "Course 1"
When I navigate to "User report" in the course gradebook
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
......@@ -25,7 +25,7 @@ Feature: Basic recycle bin functionality
Scenario: Restore a deleted assignment
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign |
......@@ -38,7 +38,7 @@ Feature: Basic recycle bin functionality
And I should see "'Test assign' has been restored"
And I wait to be redirected
And I am on homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I should see "Test assign" in the "Topic 1" "section"
Scenario: Restore a deleted course
......@@ -64,7 +64,7 @@ Feature: Basic recycle bin functionality
@javascript
Scenario: Deleting a single item from the recycle bin
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign |
......@@ -84,7 +84,7 @@ Feature: Basic recycle bin functionality
@javascript
Scenario: Deleting all the items from the recycle bin
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assign 1 |
......
......@@ -33,8 +33,7 @@ Feature: Upload users
And I should see "Tom Jones"
And I should see "Trent Reznor"
And I should see "reznor@example.com"
And I am on site homepage
And I follow "Maths"
And I am on course page "Maths"
And I navigate to "Users > Groups" in current page administration
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
......
......@@ -47,16 +47,16 @@ Feature: Apply tour filters to a tour
And I log out
And I log in as "editor1"
And I am on site homepage
When I follow "Course 1"
When I am on course page "Course 1"
Then I should not see "Welcome to your course tour."
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I should see "Welcome to your course tour."
And I click on "End tour" "button"
And I log out
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I should see "Welcome to your course tour."
......@@ -22,7 +22,7 @@ Feature: availability_completion
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
# Add a Page with a completion tickbox.
......@@ -49,7 +49,7 @@ Feature: availability_completion
When I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# Page 2 should not appear yet.
Then I should not see "Page 2" in the "region-main" "region"
......
......@@ -19,7 +19,7 @@ Feature: Confirm that conditions on completion no longer cause a bug
Scenario: Multiple completion conditions on glossary
# Set up course.
Given I log in as "teacher1"
And I follow "Course 1"
And I am on course page "Course 1"
And I navigate to "Edit settings" node in "Course administration"
And I expand all fieldsets
And I set the field "Enable completion tracking" to "Yes"
......
......@@ -22,7 +22,7 @@ Feature: availability_date
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
# Add a Page with a date condition that does match (from the past).
......@@ -56,7 +56,7 @@ Feature: availability_date
When I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# Page 1 should appear, but page 2 does not.
Then I should see "Page 1" in the "region-main" "region"
......
......@@ -22,7 +22,7 @@ Feature: availability_grade
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
# Add an assignment.
......@@ -71,7 +71,7 @@ Feature: availability_grade
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
And I follow "Course 1"
And I am on course page "Course 1"
# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
......@@ -92,7 +92,7 @@ Feature: availability_grade
When I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# Do the assignment.
And I follow "A1"
......@@ -111,7 +111,7 @@ Feature: availability_grade
When I log out
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# Give the assignment 40%.
And I follow "A1"
......@@ -127,7 +127,7 @@ Feature: availability_grade
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# Check pages are visible.
Then I should see "P2" in the "region-main" "region"
......
......@@ -22,7 +22,7 @@ Feature: availability_group
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
# Start to add a Page. If there aren't any groups, there's no Group option.
......@@ -40,7 +40,7 @@ Feature: availability_group
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I add a "Page" to section "1"
And I expand all fieldsets
And I click on "Add restriction..." "button"
......@@ -86,7 +86,7 @@ Feature: availability_group
When I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
......@@ -100,7 +100,7 @@ Feature: availability_group
And I log out
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# P1 (any groups) and P2 should show but not P3.
Then I should see "P1" in the "region-main" "region"
......
......@@ -28,7 +28,7 @@ Feature: availability_grouping
# Basic setup.
Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And I turn editing mode on
# Start to add a Page. If there aren't any groupings, there's no Grouping option.
......@@ -42,7 +42,7 @@ Feature: availability_grouping
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
And the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
......@@ -78,7 +78,7 @@ Feature: availability_grouping
# Log back in as student.
When I log out
And I log in as "student1"
And I follow "Course 1"
And I am on course page "Course 1"
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
......@@ -91,7 +91,7 @@ Feature: availability_grouping
| GXI1 | GI1 |
And I log in as "student1"
And I am on site homepage
And I follow "Course 1"
And I am on course page "Course 1"
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment