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

MDL-72093 navigation: Update behat tests

parent ecf8e77f
......@@ -33,14 +33,14 @@ Feature: Latest announcements block displays the course latest news
Then I should see "Discussion One" in the "Latest announcements" "block"
And I should see "Discussion Two" in the "Latest announcements" "block"
And I should see "Discussion Three" in the "Latest announcements" "block"
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:
| Number of announcements | 2 |
And I press "Save and display"
And I should not see "Discussion One" in the "Latest announcements" "block"
And I should see "Discussion Two" in the "Latest announcements" "block"
And I should see "Discussion Three" in the "Latest announcements" "block"
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:
| Number of announcements | 0 |
And I press "Save and display"
......
......@@ -60,25 +60,25 @@ Feature: View structural changes in recent activity block
And I am on "Course 1" course homepage
And I click on "ForumVisibleGroupsG1" "link"
And I click on "Edit settings" "link"
And I click on "Settings" "link"
And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 1 |
And I press "Save and return to course"
And I click on "ForumSeparateGroupsG1" "link"
And I click on "Edit settings" "link"
And I click on "Settings" "link"
And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 1 |
And I press "Save and return to course"
And I click on "ForumVisibleGroupsG2" "link"
And I click on "Edit settings" "link"
And I click on "Settings" "link"
And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 2 |
And I press "Save and return to course"
And I click on "ForumSeparateGroupsG2" "link"
And I click on "Edit settings" "link"
And I click on "Settings" "link"
And I set the following fields to these values:
| Access restrictions | Grouping: Grouping 2 |
And I press "Save and return to course"
......@@ -170,7 +170,7 @@ Feature: View structural changes in recent activity block
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "ForumNew"
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:
| name | ForumUpdated |
And I press "Save and return to course"
......
......@@ -18,7 +18,7 @@ Feature: The search forums block allows users to search for forum posts on cours
| student1 | C1 | student |
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 field "id_newsitems" to "1"
And I press "Save and display"
And I turn editing mode on
......@@ -41,7 +41,7 @@ Feature: The search forums block allows users to search for forum posts on cours
| Message | My message |
And I am on "Course 1" course homepage with editing mode on
And I follow "Announcements"
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 "id_visible" to "0"
And I press "Save and return to course"
......
......@@ -21,7 +21,7 @@ Feature: Block appearances
And I log in as "admin"
And I am on "Course 1" course homepage
And I follow "Test survey 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:
| Survey type | ATTLS (20 item version) |
And I press "Save and return to course"
......
......@@ -25,7 +25,7 @@ Feature: Allow to mark course as completed without cron for activity completion
| description | Test assignment description |
And I log in as "admin"
And I am on "Completion course" 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 "Enable completion tracking" to "Yes"
And I click on "Save and display" "button"
......
......@@ -101,7 +101,7 @@ class behat_completion extends behat_base {
$toggle = strtolower($completionstatus) == 'enabled' ? get_string('yes') : get_string('no');
// Go to course editing.
$this->execute("behat_general::click_link", get_string('editsettings'));
$this->execute("behat_general::click_link", get_string('settings'));
// Expand all the form fields.
$this->execute("behat_forms::i_expand_all_fieldsets");
......
......@@ -28,7 +28,7 @@ Feature: Allow teachers to bulk edit activity completion rules in a course.
| assign | C1 | a4 | Test assignment four | Submit nothing! | 150 |
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:
| Enable completion tracking | Yes |
And I press "Save and display"
......
......@@ -20,7 +20,7 @@ Feature: Show activity completion status or activity completion configuration on
| student1 | C1 | student |
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:
| Enable completion tracking | Yes |
And I press "Save and display"
......
......@@ -25,7 +25,7 @@ Feature: Completion with no calendar capabilites
And I log in as "admin"
And I am on "Course 1" course homepage
And I follow "Test forum 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_completionexpected_enabled | 1 |
| id_completionexpected_day | 1 |
......@@ -43,7 +43,7 @@ Feature: Completion 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 forum 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_completionexpected_year | 2018 |
And I press "Save and return to course"
......
......@@ -35,7 +35,7 @@ Feature: Allow teachers to edit the visibility of completion conditions in a cou
Scenario: Completion condition displaying setting can be disabled at course level
Given 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
When I set the following fields to these values:
| Show activity completion conditions | No |
And I click on "Save and display" "button"
......@@ -70,10 +70,10 @@ Feature: Allow teachers to edit the visibility of completion conditions in a cou
And I set the field "Show activity completion conditions" to "<siteshowcompletion>"
And I press "Save changes"
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 field "Enable completion tracking" to "No"
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 "Show activity completion conditions" matches value "<expected>"
Examples:
......
......@@ -25,7 +25,7 @@ Feature: Allow teachers to edit the default activity completion rules in a cours
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
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:
| Enable completion tracking | Yes |
And I press "Save and display"
......
......@@ -19,7 +19,7 @@ Feature: Allow students to manually mark an activity as complete
| student1 | C1 | student |
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:
| Enable completion tracking | Yes |
And I press "Save and display"
......
......@@ -21,7 +21,7 @@ Feature: Restrict sections availability through completion or grade conditions
Scenario: Show section greyed-out to student when completion condition is not satisfied
Given 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:
| Enable completion tracking | Yes |
And I press "Save and display"
......
......@@ -16,7 +16,7 @@ Feature: Edit format course to Single Activity format
| 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 | My first course |
| Course short name | myfirstcourse |
......
......@@ -97,7 +97,7 @@ Feature: Change number of discussions displayed
And I am on "Course 1" course homepage
Scenario: When number of discussions is decreased fewer discussions appear
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:
| numdiscussions | 5 |
When I press "Save and display"
......@@ -106,7 +106,7 @@ Feature: Change number of discussions displayed
And I should not see "This is forum post six"
Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
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:
| numdiscussions | -1 |
When I press "Save and display"
......@@ -115,7 +115,7 @@ Feature: Change number of discussions displayed
And I should not see "This is forum post ten"
Scenario: When number of discussions is increased more discussions appear
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:
| numdiscussions | 9 |
When I press "Save and display"
......
......@@ -33,7 +33,7 @@ Feature: Edit completion settings of an activity
Then I should see "Completion options unlocked"
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
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
Then the field "Completion tracking" matches value "Students can manually mark the activity as completed"
......@@ -45,6 +45,6 @@ Feature: Edit completion settings of an activity
When I click on "id_completionexpected_enabled" "checkbox"
And I set the field "id_completionexpected_year" to "2013"
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
Then the field "id_completionexpected_year" matches value "2013"
......@@ -20,7 +20,7 @@ Feature: Toggle activities groups mode from the course page
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
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 | No groups |
| Force group mode | No |
......
......@@ -21,7 +21,7 @@ Feature: Allow teachers to edit the visibility of activity dates in a course
Scenario: Activity dates setting can be enabled to display activity dates in a course
Given 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
When I set the following fields to these values:
| Show activity dates | Yes |
And I click on "Save and display" "button"
......@@ -38,7 +38,7 @@ Feature: Allow teachers to edit the visibility of activity dates in a course
Scenario: Activity dates setting can be disabled to hide activity dates in a course
Given 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
When I set the following fields to these values:
| Show activity dates | No |
And I click on "Save and display" "button"
......
......@@ -24,7 +24,7 @@ Feature: Access to downloading course content can be controlled
Scenario: Site admins can remove the download course content feature
Given I log in as "admin"
And I am on "Hockey 101" 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 "Enable download course content" to "Yes"
And I press "Save and display"
And "Download course content" "link" should exist in current page administration
......@@ -32,7 +32,7 @@ Feature: Access to downloading course content can be controlled
| downloadcoursecontentallowed | 0 |
And I am on "Hockey 101" course homepage
Then "Download course content" "link" should not exist in current page administration
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I should not see "Enable download course content"
Scenario: Site admins can set the default value for whether download course content is enabled in courses
......@@ -49,12 +49,12 @@ Feature: Access to downloading course content can be controlled
Given I log in as "teacher1"
When I am on "Hockey 101" course homepage
And "Download course content" "link" should not exist in current page administration
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I should see "Enable download course content"
And I set the field "Enable download course content" to "Yes"
And I press "Save and display"
Then "Download course content" "link" should exist in current page administration
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I set the field "Enable download course content" to "No"
And I press "Save and display"
And "Download course content" "link" should not exist in current page administration
......@@ -69,7 +69,7 @@ Feature: Access to downloading course content can be controlled
And I log in as "teacher1"
And I am on "Hockey 101" course homepage
And "Download course content" "link" should exist in current page administration
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And "Enable download course content" "select" should exist
And I log out
# Remove teacher's capabilities for download course content.
......@@ -83,7 +83,7 @@ Feature: Access to downloading course content can be controlled
When I log in as "teacher1"
And I am on "Hockey 101" course homepage
Then "Download course content" "link" should not exist in current page administration
And I navigate to "Edit settings" in current page administration
And I navigate to "Settings" in current page administration
And I should see "Enable download course content"
And I should see "Site default (Yes)"
And "Enable download course content" "select" should not exist
......@@ -91,7 +91,7 @@ Feature: Access to downloading course content can be controlled
Scenario: Students require a capability to access the download course content feature in a course
Given I log in as "teacher1"
And I am on "Hockey 101" 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 "Enable download course content" to "Yes"
And I press "Save and display"
And I log out
......
......@@ -40,10 +40,10 @@ Feature: Courses can be set up to display dates relative to the user's enrolment
| Course short name | C2 |
| Relative dates mode | No |
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
Then the "Relative dates mode" "select" should be disabled
And the field "Relative dates mode" matches value "Yes"
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 the "Relative dates mode" "select" should be disabled
And the field "Relative dates mode" matches value "No"
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