Commit 7d821080 authored by Mihail Geshoski's avatar Mihail Geshoski
Browse files

MDL-72093 navigation: Update behat tests

parent ecf8e77f
......@@ -25,7 +25,7 @@ Feature: Tagging courses
| teacher2 | c2 | teacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Tags | Mathematics |
And I press "Save and display"
......@@ -34,14 +34,14 @@ Feature: Tagging courses
Scenario: Set course tags using the course edit form
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then "Mathematics" "autocomplete_suggestions" should exist
And I set the following fields to these values:
| Tags | Mathematics, Algebra |
And I press "Save and display"
And I am on "Course 2" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Tags | Mathematics, Geometry |
And I press "Save and display"
......
......@@ -37,7 +37,7 @@ Feature: Fields locked control who is able to edit it
| Locked | Yes |
And I click on "Save changes" "button" in the "Adding a new Short text" "dialogue"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field1 | testcontent1 |
| Test field2 | testcontent2 |
......@@ -48,7 +48,7 @@ Feature: Fields locked control who is able to edit it
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And the field "Test field1" matches value "testcontent1"
And I should not see "Test field2"
......
......@@ -32,7 +32,7 @@ Feature: The visibility of fields control where they are displayed
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
......@@ -52,7 +52,7 @@ Feature: The visibility of fields control where they are displayed
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
......@@ -72,7 +72,7 @@ Feature: The visibility of fields control where they are displayed
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
......
......@@ -17,7 +17,7 @@ Feature: Edit course settings
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on "Course 1" course homepage
When I navigate to "Edit settings" in current page administration
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Course full name | Edited course fullname |
| Course short name | Edited course shortname |
......@@ -27,7 +27,7 @@ Feature: Edit course settings
And I should not see "C1"
And I should see "Edited course fullname"
And I should see "Edited course shortname"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
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"
......
......@@ -19,7 +19,7 @@ Feature: Force group mode in a course
And I add a "Chat" to section "1" and I fill the form with:
| Name of this chat room | Chat room |
| Description | Chat description |
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
@javascript
Scenario: Forced group mode using separate groups
......
......@@ -33,7 +33,7 @@ Feature: Activities can be moved between sections
And I should not see "Test forum name" in the "Topic 1" "section"
Scenario: Move activities in the course home with Javascript disabled using paged mode
Given I navigate to "Edit settings" in current page administration
Given I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Course layout | Show one section per page |
And I press "Save and display"
......@@ -42,7 +42,7 @@ Feature: Activities can be moved between sections
And I should not see "Test forum name" in the "Topic 1" "section"
Scenario: Move activities in a course section with Javascript disabled using paged mode
Given I navigate to "Edit settings" in current page administration
Given I navigate to "Settings" in current page administration
And the following "activity" exists:
| activity | forum |
| course | C1 |
......
......@@ -31,7 +31,7 @@ Feature: Sections can be moved
| activity | name | intro | course | idnumber | section |
| forum | Test forum name | Test forum name description | C1 | forum1 | 1 |
And I am on "Course 1" course homepage with editing mode on
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Course layout | Show one section per page |
And I press "Save and display"
......@@ -45,7 +45,7 @@ Feature: Sections can be moved
| activity | name | intro | course | idnumber | section |
| forum | Test forum name | Test forum name description | C1 | forum1 | 2 |
And I am on "Course 1" course homepage with editing mode on
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Course layout | Show one section per page |
And I press "Save and display"
......
......@@ -21,7 +21,7 @@ Feature: Rename roles within a course
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
When I navigate to "Edit settings" in current page administration
When I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Your word for 'Non-editing teacher' | Tutor |
| Your word for 'Student' | Learner |
......@@ -44,7 +44,7 @@ Feature: Rename roles within a course
And the "Assign role" select box should contain "Learner (Student)"
And I click on "Cancel" "button" in the "Enrol users" "dialogue"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Your word for 'Non-editing teacher' | |
| Your word for 'Student' | |
......
......@@ -20,7 +20,7 @@ Feature: Rename roles in a course
Scenario: Teacher can rename roles
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I should see "Role renaming"
When I set the following fields to these values:
| Your word for 'Teacher' | Lecturer |
......@@ -46,6 +46,6 @@ Feature: Rename roles in a course
And I follow "Log out"
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
Then I should not see "Role renaming"
And I should not see "Your word for 'Teacher'"
......@@ -57,7 +57,7 @@ Feature: View subfolders in a course in-line
And I set the field "New folder name" to "Test sub subfolder"
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
And I press "Save changes"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
When I set the field "Display folder contents" to "Inline on a course page"
And I press "Save and return to course"
Then I should see "Test subfolder 1"
......
......@@ -69,7 +69,7 @@ Feature: Managers can manage course custom fields checkbox
And I am on site homepage
Then I should see "Test field: Yes"
When I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Test field" to ""
And I press "Save and display"
......
......@@ -68,7 +68,7 @@ Feature: Managers can manage course custom fields date
Then I log in as "teacher1"
When I am on site homepage
When I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then "#id_customfield_testfield_hour" "css_element" should be visible
Then "#id_customfield_testfield_minute" "css_element" should be visible
......@@ -95,7 +95,7 @@ Feature: Managers can manage course custom fields date
Then I log in as "teacher1"
When I am on site homepage
When I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then "#id_customfield_testfield_hour" "css_element" should not be visible
Then "#id_customfield_testfield_minute" "css_element" should not be visible
......
......@@ -73,7 +73,7 @@ Feature: Managers can manage course custom fields text
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| See more on website | course/view.php?id=35 |
And I press "Save and display"
......@@ -102,7 +102,7 @@ Feature: Managers can manage course custom fields text
And I log out
Then I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | 1234 |
And I press "Save and display"
......@@ -131,7 +131,7 @@ Feature: Managers can manage course custom fields text
When I am on site homepage
Then I should see "Test field: testdefault"
When I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
Then the "value" attribute of "#id_customfield_testfield" "css_element" should contain "testdefault"
When I set the following fields to these values:
| Test field | |
......
......@@ -53,7 +53,7 @@ Feature: Default value for the textarea custom field can contain images
# Teacher will see the image when editing existing course.
And I log in as "teacher"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then "//img[contains(@src, 'draftfile.php') and contains(@src, '/gd-logo.png') and @alt='Example']" "xpath_element" should exist in the "Test field" "form_row"
# Save the course without changing the default value.
......
......@@ -28,7 +28,7 @@ Feature: Teachers can edit course custom fields
Scenario: Display custom fields on course edit form
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then I should see "Category for test"
And I should see "Field 1"
......@@ -57,7 +57,7 @@ Feature: Teachers can edit course custom fields
| customfield_f4[year] | 2019 |
| Field 5 | b |
And I press "Save and display"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And the following fields match these values:
| Course full name | Course 2 |
| Course short name | C2 |
......@@ -90,7 +90,7 @@ Feature: Teachers can edit course custom fields
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
Then the image at "//div[contains(@class, 'fitem')][contains(., 'Field 1')]/following-sibling::div[1]//img[contains(@src, 'pluginfile.php') and contains(@src, '/core_customfield/description/') and @alt='Example']" "xpath_element" should be identical to "lib/tests/fixtures/gd-logo.png"
And I log out
......
......@@ -31,7 +31,7 @@ Feature: Requiredness The course custom fields can be mandatory or not
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I press "Save and display"
Then I should see "You must supply a value here"
And I set the field "Test field" to "some value"
......@@ -52,7 +52,7 @@ Feature: Requiredness The course custom fields can be mandatory or not
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I press "Save and display"
Then I should see "Course 1"
And I should see "Topic 1"
......@@ -33,12 +33,12 @@ Feature: Uniqueness The course custom fields can be mandatory or not
Scenario: A course custom field with unique data must not allow same data in same field in different courses
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
And I am on "Course 2" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
......@@ -47,12 +47,12 @@ Feature: Uniqueness The course custom fields can be mandatory or not
Scenario: A course custom field with unique data must not compare with itself
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | testcontent |
And I press "Save and display"
......@@ -62,12 +62,12 @@ Feature: Uniqueness The course custom fields can be mandatory or not
Scenario: A course custom field with unique data must allow empty data
When I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | |
And I press "Save and display"
And I am on "Course 2" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Test field | |
And I press "Save and display"
......
......@@ -51,7 +51,7 @@ Feature: We can set the grade to pass value
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| assignsubmission_onlinetext_enabled | 1 |
| grade[modgrade_type] | Point |
......@@ -64,7 +64,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "25"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Edit settings"
And I follow "Settings"
And I expand all fieldsets
And I set the field "Grade to pass" to "30"
And I press "Save and return to course"
......@@ -78,7 +78,7 @@ Feature: We can set the grade to pass value
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade[modgrade_type] | Scale |
| grade[modgrade_scale] | Test Scale 1 |
......@@ -93,7 +93,7 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Grade to pass" matches value "4"
Scenario: Set a invalid grade to pass for an assignment activity using scales
......@@ -102,7 +102,7 @@ Feature: We can set the grade to pass value
| assign | Test Assignment 1 | Submit your online text | C1 | 1 | assign1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Assignment 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade[modgrade_type] | Scale |
| grade[modgrade_scale] | Test Scale 1 |
......@@ -116,7 +116,7 @@ Feature: We can set the grade to pass value
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 40 |
......@@ -137,7 +137,7 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Workshop 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Submission grade to pass" matches value "45"
And the field "Assessment grade to pass" matches value "15"
......@@ -147,7 +147,7 @@ Feature: We can set the grade to pass value
| workshop | Test Workshop 1 | Test workshop | C1 | 1 | workshop1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Workshop 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| grade | 80 |
| Submission grade to pass | 90 |
......@@ -163,7 +163,7 @@ Feature: We can set the grade to pass value
| quiz | Test Quiz 1 | C1 | 1 | quiz1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Quiz 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Grade to pass | 9.5 |
And I press "Save and return to course"
......@@ -176,7 +176,7 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Quiz 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Grade to pass" matches value "8.00"
Scenario: Set a valid grade to pass for lesson activity
......@@ -185,7 +185,7 @@ Feature: We can set the grade to pass value
| lesson | Test Lesson 1 | Test | C1 | 1 | lesson1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Lesson 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Grade to pass | 90 |
And I press "Save and return to course"
......@@ -198,7 +198,7 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Grade to pass" matches value "80"
Scenario: Set a valid grade to pass for database activity
......@@ -207,7 +207,7 @@ Feature: We can set the grade to pass value
| data | Test Database 1 | Test | C1 | 1 | data1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Database 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings |
......@@ -222,7 +222,8 @@ Feature: We can set the grade to pass value
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on "Course 1" course homepage
And I click on "Edit settings" "link" in the "Test Database 1" activity
And I follow "Test Database 1"
And I follow "Settings"
And the field "Grade to pass" matches value "80"
Scenario: Set an invalid grade to pass for forum activity
......@@ -231,7 +232,7 @@ Feature: We can set the grade to pass value
| forum | Test Forum 1 | Test | C1 | 1 | forum1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Forum 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings |
......@@ -247,7 +248,7 @@ Feature: We can set the grade to pass value
| forum | Test Forum 1 | Test | C1 | 1 | forum1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Forum 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings |
......@@ -263,7 +264,7 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Forum 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Ratings > Grade to pass" matches value "80"
Scenario: Set a valid grade to pass for glossary activity
......@@ -272,7 +273,7 @@ Feature: We can set the grade to pass value
| glossary | Test Glossary 1 | Test | C1 | 1 | glossary1 |
And I am on "Course 1" course homepage with editing mode on
And I follow "Test Glossary 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Ratings > Aggregate type | Average of ratings |
| id_scale_modgrade_type | Point |
......@@ -287,5 +288,5 @@ Feature: We can set the grade to pass value
And I press "Save changes"
And I am on "Course 1" course homepage
And I follow "Test Glossary 1"
And I follow "Edit settings"
And I follow "Settings"
And the field "Grade to pass" matches value "80"
......@@ -28,13 +28,13 @@ Feature: We can enter in grades and view reports from the gradebook
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name 1"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I press "Save and return to course"
And I follow "Test assignment name 2"
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
......
......@@ -23,7 +23,7 @@ Feature: The description of a group can be viewed by students and teachers
Scenario: A student can see the group description when visible groups are set. Teachers can see group details.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Group mode | Visible groups |
And I press "Save and display"
......@@ -72,7 +72,7 @@ Feature: The description of a group can be viewed by students and teachers
Scenario: A student can not see the group description when separate groups are set. Teachers can see group details.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and display"
......
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