Merge branch 'MDL-59602_coursenav' of https://github.com/mrmark/moodle

This commit is contained in:
David Monllao 2017-07-31 13:21:09 +02:00
commit 7190f330b4
33 changed files with 60 additions and 87 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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 |

View File

@ -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"

View File

@ -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:

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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 |

View File

@ -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 |

View File

@ -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"

View File

@ -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"

View File

@ -96,8 +96,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)"

View File

@ -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

View File

@ -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"

View File

@ -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! |

View File

@ -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

View File

@ -247,7 +247,7 @@ Feature: Anonymous feedback
Scenario: Collecting new non-anonymous feedback from a previously anonymous feedback activity
When I log in as "teacher"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
@ -260,7 +260,7 @@ Feature: Anonymous feedback
| Maximum characters accepted | 200 |
And I log out
When I log in as "user1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I set the following fields to these values:
@ -269,7 +269,7 @@ Feature: Anonymous feedback
And I log out
# Switch to non-anon responses.
And I log in as "teacher"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
@ -278,7 +278,7 @@ Feature: Anonymous feedback
And I log out
# Now leave a non-anon feedback as user1
When I log in as "user1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I set the following fields to these values:
@ -287,7 +287,7 @@ Feature: Anonymous feedback
And I log out
# Now check the responses are correct.
When I log in as "teacher"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Show responses"
And I should see "Anonymous entries (1)"

View File

@ -81,7 +81,7 @@ Feature: Mapping courses in a feedback
| this is a simple multiple choice | option d |
And I press "Submit your answers"
And I press "Continue"
And I follow "Course 1"
And I am on "Course 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"

View File

@ -25,7 +25,7 @@ Feature: Non anonymous feedback with multiple submissions
Scenario: Completing a feedback second time
When I log in as "teacher"
And I follow "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 "Short text answer" question to the feedback with:
@ -39,7 +39,7 @@ Feature: Non anonymous feedback with multiple submissions
| Maximum characters accepted | 200 |
And I log out
And I log in as "user1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
And I set the following fields to these values:
@ -50,7 +50,7 @@ Feature: Non anonymous feedback with multiple submissions
And I press "Submit your answers"
And I log out
And I log in as "user1"
And I follow "Course 1"
And I am on "Course 1" course homepage
And I follow "Course feedback"
And I follow "Answer the questions..."
Then the field "first" matches value "111"

View File

@ -67,7 +67,6 @@ Feature: Blog posts are always displayed in reverse chronological order
| Message | Reply to the first post |
And I press "Post to forum"
And I wait to be redirected
And I am on site homepage
And I am on "Course 1" course homepage
And I follow "Course blog forum"
#

View File

@ -17,8 +17,7 @@ Feature: Edited glossary entries 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 "Glossary" to section "1" and I fill the form with:
| Name | Test glossary |
| Description | A glossary about dreams! |

View File

@ -20,8 +20,7 @@ Feature: In a lesson activity, a teacher can duplicate a lesson page
And I follow "Manage private files"
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 1" course homepage with editing mode on
When 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 |

View File

@ -17,8 +17,7 @@ Feature: In a lesson activity, teacher can import blackboard fill in the blank q
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
When I am on homepage
And I am on "Course 1" course homepage with editing mode on
When 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 |

View File

@ -17,8 +17,7 @@ Feature: In a lesson activity, teacher can import embedded images in questions a
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
When I am on homepage
And I am on "Course 1" course homepage with editing mode on
When 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 |

View File

@ -20,8 +20,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
And I follow "Manage private files"
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 1" course homepage with editing mode on
When 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 |

View File

@ -40,14 +40,14 @@ Feature: Set a quiz to be marked complete when the student uses all attempts all
And I set the field "False" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I follow "C1"
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 "Re-attempt quiz"
And I set the field "False" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I follow "C1"
And I am on "Course 1" course homepage
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"

View File

@ -40,7 +40,7 @@ Feature: Set a quiz to be marked complete when the student passes
And I set the field "True" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I follow "C1"
And I am on "Course 1" course homepage
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"

View File

@ -17,8 +17,7 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s
# See that the "activity chooser" is enabled by default.
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 1" course homepage
When 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"
@ -28,8 +27,7 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s
Scenario: As a user, "activity chooser" should be disabled when I uncheck it in "Course preferences"
Given I set the field "enableactivitychooser" to "0"
And I press "Save changes"
When I am on homepage
And I am on "Course 1" course homepage
When 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"

View File

@ -33,6 +33,5 @@ Feature: Set the site home page and dashboard as the default home page
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 1" course homepage
And I am on "Course 1" course homepage
Then "Dashboard" "text" should exist in the ".breadcrumb-nav" "css_element"