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

MDL-72093 navigation: Update behat tests

parent ecf8e77f
......@@ -113,7 +113,7 @@ Feature: Add h5ps to Atto
Then I should not see "reveal"
And I should see "Cloudberries"
And I switch to the main frame
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I click on ".h5p-placeholder" "css_element"
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
# External URL
......@@ -149,7 +149,7 @@ Feature: Add h5ps to Atto
And I should not see "Embed"
And I should not see "Rights of use"
And I switch to the main frame
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I click on ".h5p-placeholder" "css_element"
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
And I click on "H5P options" "link"
......@@ -165,7 +165,7 @@ Feature: Add h5ps to Atto
And I should not see "Embed"
And I should not see "Rights of use"
And I switch to the main frame
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I click on ".h5p-placeholder" "css_element"
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
# Embed and copyright buttons displayed. Download not displayed
......@@ -197,7 +197,7 @@ Feature: Add h5ps to Atto
And I should see "Far far away"
And I should not see "Embed"
And I switch to the main frame
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I click on ".h5p-placeholder" "css_element"
And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
And I click on "H5P options" "link"
......
......@@ -20,7 +20,7 @@ Feature: Atto Autosave
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 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 field with xpath "//select[@name='summary_editor[format]']" to "1"
And I click on "Save and display" "button"
And I log out
......@@ -29,14 +29,14 @@ Feature: Atto Autosave
Scenario: Restore a draft
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 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 1" course homepage
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
# Wait for the autorestore
And I wait "2" seconds
Then I should see "This is my draft"
......@@ -45,7 +45,7 @@ Feature: Atto Autosave
Scenario: Do not restore a draft if files have been modified
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 field "Course summary" to "This is my draft"
# Wait for the autosave
And I wait "5" seconds
......@@ -55,7 +55,7 @@ Feature: Atto Autosave
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 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 field "Course summary" to "<p>Image test</p>"
And I select the text in the "Course summary" Atto editor
And I click on "Insert or edit image" "button"
......@@ -71,26 +71,26 @@ Feature: Atto Autosave
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
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 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 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 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 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 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 "This is my draft"
And I should see "Modified text"
......@@ -38,7 +38,7 @@ Feature: Add text direction and alignment
| <component> | <stringid> | <localstring> |
And I log in as "admin"
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 press "Show more buttons"
And I press "HTML"
Then I should see "<partialtext>"
......
......@@ -49,13 +49,13 @@ Feature: Using the activity grade form element
And I set the field "scale[modgrade_scale]" to "ABCDEF"
And I press "Save and display"
And I should not see "You cannot change the type, as grades already exist for this item"
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 should not see "Some grades have already been awarded, so the grade type"
And I set the field "scale[modgrade_scale]" to "Letter scale"
And I press "Save and display"
And I should not see "You cannot change the scale, as grades already exist for this item"
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 should not see "Some grades have already been awarded, so the grade type"
And I set the field "scale[modgrade_type]" to "Point"
......@@ -100,13 +100,13 @@ Feature: Using the activity grade form element
And I follow "Discussion subject"
And I set the field "rating" to "D"
And I am on the "Test forum name" "forum activity" page
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
When I expand all fieldsets
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed"
# Try saving the form and visiting it back to verify that everything is working ok.
And I press "Save and display"
And I should not see "When selecting a ratings aggregate type you must also select"
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 "Aggregate type" matches value "Average of ratings"
And the field "scale[modgrade_type]" matches value "Scale"
......@@ -144,7 +144,7 @@ Feature: Using the activity grade form element
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed"
# Try saving the form and visiting it back to verify everything is working ok.
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 I expand all fieldsets
And the field "grade[modgrade_type]" matches value "Scale"
And the field "grade[modgrade_scale]" matches value "ABCDEF"
......@@ -174,7 +174,7 @@ Feature: Using the activity grade form element
And I follow "Discussion subject"
And I set the field "rating" to "100"
And I am on the "Test forum name" "forum activity" page
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
When I expand all fieldsets
Then I should see "You cannot change the type, as grades already exist for this item."
And the "Maximum grade" "field" should be disabled
......
......@@ -25,20 +25,20 @@ Feature: In an assignment, limit submittable file types
| activity | course | name | duedate | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | assignsubmission_file_maxfiles | assignsubmission_file_maxsizebytes |
| assign | C1 | Test assignment name | 1388534400 | 0 | 1 | 1 | 0 |
And I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
When I set the field "Accepted file types" to "image/png;doesntexist;.anything;unreal/mimetype;nodot"
And I press "Save and display"
And I should see "Unknown file types: .doesntexist, .anything, unreal/mimetype, .nodot"
And I set the field "Accepted file types" to "image/png;spreadsheet"
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 field "Accepted file types" matches value "image/png,spreadsheet"
And I set the field "Accepted file types" to ""
And I press "Choose"
And I set the field "Image files" to "1"
And I press "Save changes"
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
Then the field "Accepted file types" matches value "image"
@javascript @_file_upload
......
......@@ -44,7 +44,7 @@ Feature: View activity completion in the assignment activity
@javascript
Scenario: The manual completion button will not be shown on the course page if the Show activity completion conditions is set to No
Given I am on the "Course 1" course page logged in as teacher1
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 "Show activity completion conditions" to "No"
And I press "Save and display"
......
......@@ -108,7 +108,7 @@ Feature: Assign reset
Scenario: Use course reset to reset blind marking assignment.
When I am on the "Test assignment name" Activity page logged in as teacher1
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:
| blindmarking | 1 |
And I press "Save"
......
......@@ -70,7 +70,7 @@ Feature: Assign group override
Scenario: Allow a group to have a different due date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Allow submissions from | disabled |
| Due date | ##1 Jan 2000 08:00## |
......@@ -92,7 +92,7 @@ Feature: Assign group override
Scenario: Allow a group to have a different cut off date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Due date | disabled |
| Allow submissions from | disabled |
......@@ -114,7 +114,7 @@ Feature: Assign group override
Scenario: Allow a group to have a different start date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Due date | disabled |
| Allow submissions from | ##1 January 2030 08:00## |
......@@ -138,7 +138,7 @@ Feature: Assign group override
@javascript
Scenario: Add both a user and group override and verify that both are applied correctly
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Due date | disabled |
| Allow submissions from | ##1 January 2040 08:00## |
......
......@@ -25,7 +25,7 @@ Feature: Assignment with no calendar capabilites
| activity | name | intro | course | section |
| assign | Test assignment name | Test assignment description | C1 | 1 |
And I am on the "Test assignment name" Activity page
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:
| Allow submissions from | ##1 January 2017## |
| Due date | ##1 February 2017## |
......@@ -35,7 +35,7 @@ Feature: Assignment with no calendar capabilites
And I log out
When I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Allow submissions from | ##1 January 2018## |
| Due date | ##1 February 2018## |
......
......@@ -62,7 +62,7 @@ Feature: Assign user override
@javascript
Scenario: Allow a user to have a different due date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Allow submissions from | disabled |
| Due date | ##1 Jan 2000 08:00## |
......@@ -85,7 +85,7 @@ Feature: Assign user override
@javascript
Scenario: Allow a user to have a different cut off date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Due date | disabled |
| Allow submissions from | disabled |
......@@ -108,7 +108,7 @@ Feature: Assign user override
@javascript
Scenario: Allow a user to have a different start date
Given I am on the "Test assignment name" Activity page logged in as teacher1
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:
| Due date | disabled |
| Allow submissions from | ##1 January 2030 08:00## |
......@@ -206,7 +206,7 @@ Feature: Assign user override
@javascript
Scenario: Create a user override when the assignment is not available to the student
Given I am on the "Test assignment name" Activity page logged in as teacher1
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 "Availability" to "Hide from students"
And I click on "Save and display" "button"
......
......@@ -43,7 +43,7 @@ Feature: Group assignment submissions
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and return to course"
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"
......
......@@ -58,7 +58,7 @@ Feature: Hide grader identities identity from students
Scenario: Hidden grading is enabled.
# Enable the hidden grader option
Given I am on the "Test assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
And I set the field "Hide grader identity from students" to "1"
And I press "Save and return to course"
......
......@@ -39,7 +39,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
And I am on the "Test assignment name" "assign activity" page
Scenario: Update the max grade for an assignment without rescaling existing grades
Given I navigate to "Edit settings" in current page administration
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "No"
And I set the field "Maximum grade" to "80"
......@@ -48,14 +48,14 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
Scenario: Update an assignment without touching the max grades
Given I navigate to "Edit settings" in current page administration
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "No"
And I set the field "Maximum grade" to "80"
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 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 I expand all fieldsets
And I set the field "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "80"
......@@ -64,7 +64,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00"
Scenario: Update the max grade for an assignment rescaling existing grades
Given I navigate to "Edit settings" in current page administration
Given I navigate to "Settings" in current page administration
And I expand all fieldsets
And I set the field "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "50"
......@@ -77,7 +77,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
And I click on "Grade" "link" in the "Student 2" "table_row"
And I wait until the page is ready
And I follow "Assignment: Test assignment name"
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 "Rescale existing grades" to "Yes"
And I set the field "Maximum grade" to "50"
......
......@@ -30,7 +30,7 @@ Feature: Set availability dates for an assignment
Scenario: Student cannot submit an assignment prior to the 'allow submissions from' date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
# Set 'Allow submissions from' to tomorrow at noon.
And I set the field "Allow submissions from" to "##tomorrow noon##"
......@@ -44,7 +44,7 @@ Feature: Set availability dates for an assignment
Scenario: Student can see the assignment's due date in the course calendar
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
# Set 'Allow submissions from' to the first day of this month at noon.
And I set the field "Allow submissions from" to "##first day of this month noon##"
......@@ -63,7 +63,7 @@ Feature: Set availability dates for an assignment
@_file_upload
Scenario: Student can submit an assignment before the due date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
# Set 'Allow submissions from' to now.
And I set the field "Allow submissions from" to "##now##"
......@@ -91,7 +91,7 @@ Feature: Set availability dates for an assignment
@_file_upload
Scenario: Student can submit an assignment after the due date and the submission is marked as late
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
# Set 'Allow submissions from' to 3 days ago.
And I set the field "Allow submissions from" to "##3 days ago##"
......@@ -122,7 +122,7 @@ Feature: Set availability dates for an assignment
Scenario: Student cannot submit an assignment after the cut-off date
Given I am on the "Assignment name" Activity page logged in as teacher1
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I follow "Expand all"
# Set 'Allow submissions from' to 3 days ago.
And I set the field "Allow submissions from" to "##3 days ago##"
......
......@@ -34,7 +34,7 @@ Feature: Display the book description in the book and optionally in the course
Scenario: Show book description in the course homepage
Given I am on "Course 1" course homepage
And I follow "Test book"
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:
| Display description on course page | |
And I set the following fields to these values:
......@@ -46,7 +46,7 @@ Feature: Display the book description in the book and optionally in the course
Scenario: Hide book description in the course homepage
Given I am on "Course 1" course homepage
And I follow "Test book"
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:
| Display description on course page | |
And I press "Save and return to course"
......
......@@ -40,13 +40,13 @@ Feature: In a book, change the navigation options
And "Next" "link" should not exist
And I click on "2. Test chapter 2" "link" in the "Table of contents" "block"
And "Previous" "link" should not exist
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the field "Style of navigation" to "Images"
And I press "Save and display"
And "Next:" "icon" should exist
And I click on "2. Test chapter 2" "link" in the "Table of contents" "block"
And "Previous:" "icon" should exist
When I navigate to "Edit settings" in current page administration
When I navigate to "Settings" in current page administration
And I set the field "Style of navigation" to "Text"
And I press "Save and display"
Then "Next" "link" should exist
......
......@@ -33,7 +33,7 @@ Feature: In a book, verify log entries
And I click on "Next" "link"
And I click on "Previous" "link"
And I navigate to "Print book" in current page administration
And I navigate to "Generate IMS CP" in current page administration
And I navigate to "Download" in current page administration
And I navigate to "Logs" in current page administration
Then I should see "Book exported"
And I should see "Book printed"
......
......@@ -18,7 +18,7 @@ Feature: View activity completion information in the chat activity
| teacher1 | C1 | editingteacher |
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 I set the following fields to these values:
| Enable completion tracking | Yes |
......
......@@ -23,14 +23,14 @@ Feature: Chat reset
Scenario: Use course reset to update chat start date
And I log in as "teacher1"
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:
| startdate[day] | 1 |
| startdate[month] | January |
| startdate[year] | 2020 |
And I press "Save and display"
And I follow "Test chat name"
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:
| chattime[day] | 1 |
| chattime[month] | January |
......@@ -50,6 +50,6 @@ Feature: Chat reset
And I press "Continue"
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 navigate to "Settings" in current page administration
And I expand all fieldsets
And the "chattime[year]" select box should contain "2030"
......@@ -29,7 +29,7 @@ Feature: Chat with no calendar capabilites
| moodle/calendar:manageentries | Prohibit |
And 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 navigate to "Settings" in current page administration
And I set the following fields to these values:
| Repeat/publish session times | No repeats - publish the specified time only |
| id_chattime_day | 1 |
......@@ -42,7 +42,7 @@ Feature: Chat with no calendar capabilites
When I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test chat name"
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:
| id_chattime_year | 2018 |
And I press "Save and return to course"
......
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