Commit 197e2bca authored by Mark Nielsen's avatar Mark Nielsen
Browse files

MDL-59602 behat: make use of new course nav steps

parent 229ae617
......@@ -221,7 +221,7 @@ Feature: Set up contextual data for tests
And I should see "Test workshop name"
And I follow "Test assignment name"
And I should see "Test assignment description"
And I follow "C1"
And I am on "Course 1" course homepage
And I follow "Test assignment name with scale"
And I follow "Edit settings"
And the field "Type" matches value "Scale"
......@@ -312,7 +312,6 @@ Feature: Set up contextual data for tests
| fullname | course | gradecategory |
| 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 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
Then I should see "Grade category 1"
......
......@@ -17,7 +17,6 @@ Feature: tool_monitor_rule
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 site homepage
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"
......
......@@ -96,7 +96,7 @@ Feature: availability_grade
And I click on "Add submission" "button"
And I set the field "Online text" to "Q"
And I click on "Save changes" "button"
And I follow "C1"
And I am on "Course 1" course homepage
# None of the pages should appear (check assignment though).
Then I should not see "P2" in the "region-main" "region"
......
......@@ -36,7 +36,7 @@ Feature: edit_availability
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should not exist
Given I follow "C1"
Given I am on "Course 1" course homepage
When I edit the section "1"
Then "Restrict access" "fieldset" should not exist
......@@ -47,7 +47,7 @@ Feature: edit_availability
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
Given I follow "C1"
Given I am on "Course 1" course homepage
When I edit the section "1"
Then "Restrict access" "fieldset" should exist
......
......@@ -169,8 +169,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on site homepage
And I follow "Course 2"
And I am on "Course 2" course homepage
And I navigate to "Restore" node in "Course administration"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | Yes |
......@@ -199,8 +198,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on site homepage
And I follow "Course 2"
And I am on "Course 2" course homepage
And I navigate to "Restore" node in "Course administration"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | No |
......@@ -229,8 +227,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on site homepage
And I follow "Course 4"
And I am on "Course 4" course homepage
And I navigate to "Restore" node in "Course administration"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | No |
......
......@@ -109,7 +109,6 @@ Feature: Block activity modules
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
When I log in as "admin"
And I am on course index
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"
......
......@@ -22,7 +22,7 @@ Feature: The activity results block doesn't display student scores for unsupport
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "C1"
And I am on "Course 1" course homepage
And I add the "Activity results" block
And I configure the "Activity results" block
And I set the following fields to these values:
......
......@@ -32,7 +32,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I press "Save changes"
Then I should see "S1 First Blog"
And I should see "This is my awesome blog!"
And I follow "C1"
And I am on "Course 1" course homepage
And I should see "S1 First Blog"
And I follow "S1 First Blog"
And I should see "This is my awesome blog!"
......@@ -47,7 +47,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
| Blog entry body | This is my awesome blog! |
And I press "Save changes"
And I wait "1" seconds
And I follow "C1"
And I am on "Course 1" course homepage
And I follow "Add an entry about this course"
# Blog 2 of 5
And I set the following fields to these values:
......@@ -57,7 +57,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I wait "1" seconds
And I should see "S1 Second Blog"
And I should see "This is my awesome blog!"
And I follow "C1"
And I am on "Course 1" course homepage
And I follow "Add an entry about this course"
# Blog 3 of 5
And I set the following fields to these values:
......@@ -67,7 +67,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I wait "1" seconds
And I should see "S1 Third Blog"
And I should see "This is my awesome blog!"
And I follow "C1"
And I am on "Course 1" course homepage
And I follow "Add an entry about this course"
# Blog 4 of 5
And I set the following fields to these values:
......@@ -77,7 +77,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I wait "1" seconds
And I should see "S1 Fourth Blog"
And I should see "This is my awesome blog!"
And I follow "C1"
And I am on "Course 1" course homepage
And I follow "Add an entry about this course"
# Blog 5 of 5
And I set the following fields to these values:
......@@ -86,7 +86,7 @@ Feature: Students can use the recent blog entries block to view recent entries o
And I press "Save changes"
And I should see "S1 Fifth Blog"
And I should see "This is my awesome blog!"
When I follow "C1"
When I am on "Course 1" course homepage
And I should not see "S1 First Blog"
And I should see "S1 Second Blog"
And I should see "S1 Third Blog"
......
......@@ -81,7 +81,6 @@ Feature: Enable the calendar block in a course and test it's functionality
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 1" course homepage
And I follow "Hide course events"
And I hover over today in the calendar
......@@ -96,8 +95,7 @@ Feature: Enable the calendar block in a course and test it's functionality
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 1" course homepage
When I am on "Course 1" course homepage
And I hover over today in the calendar
Then I should see "User Event"
......@@ -113,8 +111,7 @@ Feature: Enable the calendar block in a course and test it's functionality
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 1" course homepage
When 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"
......
......@@ -60,7 +60,7 @@ Feature: Enable Block Completion in a course using activity completion
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test page name"
And I follow "C1"
And I am on "Course 1" course homepage
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
......
......@@ -26,7 +26,7 @@ Feature: Limit displayed upcoming events
And I create a calendar event:
| Type of event | course |
| Event title | Two months away event |
When I follow "C1"
When I am on "Course 1" course homepage
Then I should not see "Two months away event"
And I am on site homepage
And I follow "Preferences" in the user menu
......
......@@ -27,9 +27,7 @@ Feature: Allow teachers to bulk edit activity completion rules in a course.
| assign | C1 | a3 | Test assignment three | Submit something! | 150 |
| assign | C1 | a4 | Test assignment four | Submit nothing! | 150 |
And I log in as "teacher1"
And I am on site homepage
And I follow "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 |
......
......@@ -24,9 +24,7 @@ Feature: Allow teachers to edit the default activity completion rules in a cours
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
And I log in as "teacher1"
And I am on site homepage
And I follow "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 |
......
......@@ -26,7 +26,7 @@ Feature: Browse course list and return back from enrolment page
Then I should see "Courses" in the ".breadcrumb-nav" "css_element"
And I click on "Courses" "link" in the ".breadcrumb-nav" "css_element"
And I follow "Sample category"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I press "Continue"
And I should see "Sample category" in the ".breadcrumb-nav" "css_element"
......@@ -45,7 +45,7 @@ Feature: Browse course list and return back from enrolment page
And I open my profile in edit mode
And I expand "Courses" node
And I expand "Sample category" node
And I follow "Course 1"
And I am on "Course 1" course homepage
And I press "Continue"
Then I should see "Edit profile" in the ".breadcrumb-nav" "css_element"
......
......@@ -12,9 +12,9 @@ Feature: Course paged mode
And I log in as "admin"
And I am on "Course 1" course homepage
Then I click on <section2> "link" in the <section2> "section"
And I follow "C1"
And I am on "Course 1" course homepage
And I click on <section3> "link" in the <section3> "section"
And I follow "C1"
And I am on "Course 1" course homepage
And I click on <section1> "link" in the <section1> "section"
And I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
......@@ -45,9 +45,9 @@ Feature: Course paged mode
And I log in as "admin"
And I am on "Course 1" course homepage
Then I click on <section2> "link" in the <section2> "section"
And I follow "C1"
And I am on "Course 1" course homepage
And I click on <section3> "link" in the <section3> "section"
And I follow "C1"
And I am on "Course 1" course homepage
And I click on <section1> "link" in the <section1> "section"
And I should see <section1> in the "div.single-section" "css_element"
And I should see <section2> in the ".single-section span.mdl-right" "css_element"
......
......@@ -93,8 +93,7 @@ Feature: Enrolments are synchronised with meta courses
And I press "Next"
And I press "Perform restore"
And I trigger cron
And I am on course index
And I follow "Course 4"
And I am on "Course 4" course homepage
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)"
......
......@@ -12,7 +12,6 @@ Feature: User can be enrolled into a course
| fullname | shortname |
| Course 001 | C001 |
And I log in as "admin"
And I am on course index
And I am on "Course 001" course homepage
Scenario: User can be enrolled without javascript
......
......@@ -24,8 +24,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
And I log in as "admin"
And I set the following administration settings values:
| grade_minmaxtouse | Min and max grades as specified in grade item settings |
And I am on site homepage
And I follow "C1"
And I am on "C1" 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:
......@@ -66,7 +65,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| Aggregation | Natural |
And I log out
And I log in as "teacher1"
And I follow "C1"
And I am on "C1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1"
......
......@@ -17,8 +17,7 @@ Feature: Edited book chapters handle tags correctly
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
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! |
......
......@@ -17,8 +17,7 @@ Feature: Set entries required as a completion condition for a data item
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I follow "C1"
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 |
......@@ -26,38 +25,38 @@ Feature: Set entries required as a completion condition for a data item
| completionview | 0 |
| completionentriesenabled | checked |
| completionentries | 2 |
And I follow "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 |
And I follow "C1"
And I am on "Course 1" course homepage
And I log out
When I log in as "student1"
And I follow "C1"
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 |
And I press "Save and view"
And I follow "C1"
And I am on "Course 1" course homepage
And I log out
And I log in as "teacher1"
And I follow "C1"
And I am on "Course 1" course homepage
#One entry is not enough to mark as complete
And "Student 1" user has not completed "Test database name" activity
And I log out
When I log in as "student1"
And I follow "C1"
And I am on "Course 1" course homepage
And I add an entry to "Test database name" database with:
| Test field name | Student second entry |
And I press "Save and view"
And I log out
And I log in as "teacher1"
And I follow "C1"
And I am on "Course 1" course homepage
Then "Student 1" user has completed "Test database name" activity
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Test database name"
And I navigate to "Edit settings" in current page administration
And I press "Unlock completion"
And I set the field "completionentries" to "1"
And I press "Save and display"
And I follow "C1"
And I am on "Course 1" course homepage
Then "Student 1" user has completed "Test database name" activity
And I log out
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