Commit fcd4de86 authored by Adrian Greeve's avatar Adrian Greeve
Browse files

MDL-72090 navigation: Update to behat feature files for navigation.

This updates feature files to use the new steps to navigate to certain
pages.
parent 8a5e36fa
...@@ -12,8 +12,7 @@ Feature: Highlight non-inherited permissions ...@@ -12,8 +12,7 @@ Feature: Highlight non-inherited permissions
@javascript @javascript
Scenario: Override a permission Scenario: Override a permission
Given I am on "Course fullname" course homepage Given I am on the "Course fullname" "permissions" page
And I navigate to "Users > Permissions" in current page administration
And I select "Manager (0)" from the "roleid" singleselect And I select "Manager (0)" from the "roleid" singleselect
And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row" And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row"
And I press "Save changes" And I press "Save changes"
......
...@@ -27,8 +27,8 @@ Feature: Staff can check user permissions ...@@ -27,8 +27,8 @@ Feature: Staff can check user permissions
@javascript @javascript
Scenario: Search for a user (enrolled on the course) by custom field and select them to see permissions Scenario: Search for a user (enrolled on the course) by custom field and select them to see permissions
When I am on the "C1" "Course" page logged in as "admin" When I am on the "C1" "permissions" page logged in as "admin"
And I navigate to "Users > Permissions > Check permissions" in current page administration And I select "Check permissions" from the "jump" singleselect
And I set the field "Search" to "Kermit" And I set the field "Search" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels. # The Behat 'I should see' step doesn't work for optgroup labels.
Then "optgroup[label='Matching enrolled users (1)']" "css_element" should exist Then "optgroup[label='Matching enrolled users (1)']" "css_element" should exist
...@@ -41,8 +41,8 @@ Feature: Staff can check user permissions ...@@ -41,8 +41,8 @@ Feature: Staff can check user permissions
@javascript @javascript
Scenario: Search for a user (not enrolled on the course) by custom field and select them to see permissions Scenario: Search for a user (not enrolled on the course) by custom field and select them to see permissions
When I am on the "C1" "Course" page logged in as "admin" When I am on the "C1" "permissions" page logged in as "admin"
And I navigate to "Users > Permissions > Check permissions" in current page administration And I select "Check permissions" from the "jump" singleselect
And I set the field "Search" to "Kermit" And I set the field "Search" to "Kermit"
# The Behat 'I should see' step doesn't work for optgroup labels. # The Behat 'I should see' step doesn't work for optgroup labels.
Then "optgroup[label*='Potential users matching'][label*=' (1)']" "css_element" should exist Then "optgroup[label*='Potential users matching'][label*=' (1)']" "css_element" should exist
......
...@@ -57,8 +57,7 @@ Feature: Set up contextual data for tests ...@@ -57,8 +57,7 @@ Feature: Set up contextual data for tests
| Grouping 1 | C1 | GG1 | | Grouping 1 | C1 | GG1 |
| Grouping 2 | C1 | GG2 | | Grouping 2 | C1 | GG2 |
When I log in as "admin" When I log in as "admin"
And I am on "Course 1" course homepage And I am on the "Course 1" "groups" page
And I navigate to "Users > Groups" in current page administration
Then I should see "Group 1" Then I should see "Group 1"
And I should see "Group 2" And I should see "Group 2"
And I select "Groupings" from the "jump" singleselect And I select "Groupings" from the "jump" singleselect
...@@ -86,8 +85,7 @@ Feature: Set up contextual data for tests ...@@ -86,8 +85,7 @@ Feature: Set up contextual data for tests
| mod/forum:editanypost | Allow | student | Course | C1 | | mod/forum:editanypost | Allow | student | Course | C1 |
| mod/forum:replynews | Prevent | editingteacher | Course | C1 | | mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin" When I log in as "admin"
And I am on "Course 1" course homepage And I am on the "Course 1" "permissions" page
And I navigate to "Users > Permissions" in current page administration
And I set the field "Advanced role override" to "Student (1)" And I set the field "Advanced role override" to "Student (1)"
Then "mod/forum:editanypost" capability has "Allow" permission Then "mod/forum:editanypost" capability has "Allow" permission
And I press "Cancel" And I press "Cancel"
...@@ -254,8 +252,7 @@ Feature: Set up contextual data for tests ...@@ -254,8 +252,7 @@ Feature: Set up contextual data for tests
| grouping | group | | grouping | group |
| GG1 | G1 | | GG1 | G1 |
When I log in as "admin" When I log in as "admin"
And I am on "Course 1" course homepage And I am on the "Course 1" "groups" page
And I navigate to "Users > Groups" in current page administration
Then the "groups" select box should contain "Group 1 (1)" Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)" And the "groups" select box should contain "Group 2 (1)"
And I set the field "groups" to "Group 1 (1)" And I set the field "groups" to "Group 1 (1)"
......
...@@ -35,14 +35,14 @@ Feature: Edit capabilities ...@@ -35,14 +35,14 @@ Feature: Edit capabilities
Scenario: Course capabilities overrides Scenario: Course capabilities overrides
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on the "Course 1" "permissions" page
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Student" role with: And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit | | mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent | | mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow | | mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)" When I set the field "Advanced role override" to "Student (3)"
And I click on "Go" "button" in the "div.advancedoverride" "css_element" # There are two select elements and go buttons and we want to press the second one.
And I click on "//div[@class='advancedoverride']/div/form/noscript/input" "xpath_element"
Then "mod/forum:deleteanypost" capability has "Prohibit" permission Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission And "mod/forum:addquestion" capability has "Allow" permission
...@@ -64,7 +64,7 @@ Feature: Edit capabilities ...@@ -64,7 +64,7 @@ Feature: Edit capabilities
| mod/forum:editanypost | Prevent | | mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow | | mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)" When I set the field "Advanced role override" to "Student (3)"
And I click on "Go" "button" in the "region-main" "region" And I click on "//div[@class='advancedoverride']/div/form/noscript/input" "xpath_element"
Then "mod/forum:deleteanypost" capability has "Prohibit" permission Then "mod/forum:deleteanypost" capability has "Prohibit" permission
And "mod/forum:editanypost" capability has "Prevent" permission And "mod/forum:editanypost" capability has "Prevent" permission
And "mod/forum:addquestion" capability has "Allow" permission And "mod/forum:addquestion" capability has "Allow" permission
...@@ -82,7 +82,7 @@ Feature: Edit capabilities ...@@ -82,7 +82,7 @@ Feature: Edit capabilities
Then I should see "Teacher >= editing (Teacher)" in the "Teacher 1" "table_row" Then I should see "Teacher >= editing (Teacher)" in the "Teacher 1" "table_row"
And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "Teaching Assistant" "table_row" And I should see "Teacher < \"editing\" (Non-editing teacher)" in the "Teaching Assistant" "table_row"
And I should see "Studier & 'learner' (Student)" in the "Student One" "table_row" And I should see "Studier & 'learner' (Student)" in the "Student One" "table_row"
And I navigate to "Users > Permissions" in current page administration And I am on the "C1" "permissions" page
And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row" And I should see "Teacher >= editing" in the "mod/forum:replypost" "table_row"
And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row" And I should see "Teacher < \"editing\"" in the "mod/forum:replypost" "table_row"
And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row" And I should see "Studier & 'learner'" in the "mod/forum:replypost" "table_row"
......
...@@ -33,8 +33,7 @@ Feature: Verify that all form fields values can be get and set ...@@ -33,8 +33,7 @@ Feature: Verify that all form fields values can be get and set
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible | | activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 | | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin" And I log in as "admin"
And I am on "Course 1" course homepage And I am on the "Course 1" "reset" page
And I navigate to "Reset" in current page administration
# Select (multi-select) - Checking "the select box should contain". # Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles" And the "Unenrol users" select box should contain "No roles"
...@@ -147,8 +146,7 @@ Feature: Verify that all form fields values can be get and set ...@@ -147,8 +146,7 @@ Feature: Verify that all form fields values can be get and set
@javascript @javascript
Scenario: with JS enabled all form fields getters and setters works as expected Scenario: with JS enabled all form fields getters and setters works as expected
Then I am on "Course 1" course homepage Then I am on the "Course 1" "groups" page
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain". # Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
And I set the field "groups" to "Group 2" And I set the field "groups" to "Group 2"
And the "members" select box should contain "Student 2 (s2@example.com)" And the "members" select box should contain "Student 2 (s2@example.com)"
......
...@@ -77,8 +77,7 @@ Feature: Basic recycle bin functionality ...@@ -77,8 +77,7 @@ Feature: Basic recycle bin functionality
And I wait to be redirected And I wait to be redirected
And I go to the courses management page And I go to the courses management page
And I should see "Course 2" in the "#course-listing" "css_element" And I should see "Course 2" in the "#course-listing" "css_element"
And I am on "Course 2" course homepage And I am on the "Course 2" "groups" page
And I navigate to "Users > Groups" in current page administration
And I select "Overview" from the "jump" singleselect And I select "Overview" from the "jump" singleselect
And "Student 1" "text" should exist in the "Group A" "table_row" And "Student 1" "text" should exist in the "Group A" "table_row"
And "Student 2" "text" should exist in the "Group A" "table_row" And "Student 2" "text" should exist in the "Group A" "table_row"
......
...@@ -12,8 +12,7 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -12,8 +12,7 @@ Feature: An admin can update courses enrolments using a CSV file
@javascript @javascript
Scenario: Creating enrolment method by enable it Scenario: Creating enrolment method by enable it
Given I am on "Course 1" course homepage Given I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row" And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button" And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table" And I should not see "Guest access" in the "generaltable" "table"
...@@ -25,14 +24,12 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -25,14 +24,12 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row" And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript @javascript
Scenario: Creating enrolment method by disabling it Scenario: Creating enrolment method by disabling it
Given I am on "Course 1" course homepage Given I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row" And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button" And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table" And I should not see "Guest access" in the "generaltable" "table"
...@@ -44,8 +41,7 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -44,8 +41,7 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row" And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript @javascript
...@@ -58,14 +54,12 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -58,14 +54,12 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And "Disable" "icon" should exist in the "Guest access" "table_row" And "Disable" "icon" should exist in the "Guest access" "table_row"
@javascript @javascript
Scenario: Disable an enrolment method Scenario: Disable an enrolment method
Given I am on "Course 1" course homepage Given I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Enable" "link" in the "Guest access" "table_row" And I click on "Enable" "link" in the "Guest access" "table_row"
And "Disable" "icon" should exist in the "Guest access" "table_row" And "Disable" "icon" should exist in the "Guest access" "table_row"
And I navigate to "Courses > Upload courses" in site administration And I navigate to "Courses > Upload courses" in site administration
...@@ -76,8 +70,7 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -76,8 +70,7 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And "Enable" "icon" should exist in the "Guest access" "table_row" And "Enable" "icon" should exist in the "Guest access" "table_row"
@javascript @javascript
...@@ -90,14 +83,12 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -90,14 +83,12 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table" And I should not see "Guest access" in the "generaltable" "table"
@javascript @javascript
Scenario: Delete an unexistent enrolment method (nothing should change) Scenario: Delete an unexistent enrolment method (nothing should change)
Given I am on "Course 1" course homepage Given I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Delete" "link" in the "Guest access" "table_row" And I click on "Delete" "link" in the "Guest access" "table_row"
And I click on "Continue" "button" And I click on "Continue" "button"
And I should not see "Guest access" in the "generaltable" "table" And I should not see "Guest access" in the "generaltable" "table"
...@@ -109,6 +100,5 @@ Feature: An admin can update courses enrolments using a CSV file ...@@ -109,6 +100,5 @@ Feature: An admin can update courses enrolments using a CSV file
And I click on "Preview" "button" And I click on "Preview" "button"
When I click on "Upload courses" "button" When I click on "Upload courses" "button"
Then I should see "Course updated" Then I should see "Course updated"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I should not see "Guest access" in the "generaltable" "table" And I should not see "Guest access" in the "generaltable" "table"
...@@ -33,8 +33,7 @@ Feature: Upload users ...@@ -33,8 +33,7 @@ Feature: Upload users
And I should see "Tom Jones" And I should see "Tom Jones"
And I should see "Trent Reznor" And I should see "Trent Reznor"
And I should see "reznor@example.com" And I should see "reznor@example.com"
And I am on "Maths" course homepage And I am on the "Maths" "groups" page
And I navigate to "Users > Groups" in current page administration
And I set the field "groups" to "Section 1 (1)" And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones (jonest@example.com)" And the "members" select box should contain "Tom Jones (jonest@example.com)"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php'); require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php');
require_once(__DIR__ . '/../../../../../lib/behat/behat_field_manager.php'); require_once(__DIR__ . '/../../../../../lib/behat/behat_field_manager.php');
require_once(__DIR__ . '/../../../../../lib/tests/behat/behat_navigation.php'); require_once(__DIR__ . '/../../../../../lib/tests/behat/behat_navigation.php');
require_once(__DIR__ . '/../../../../../lib/behat/form_field/behat_form_field.php');
use Behat\Gherkin\Node\TableNode as TableNode, use Behat\Gherkin\Node\TableNode as TableNode,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException, Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
......
...@@ -40,10 +40,10 @@ Feature: Import course's contents into another course ...@@ -40,10 +40,10 @@ Feature: Import course's contents into another course
And I log in as "teacher1" And I log in as "teacher1"
When I import "Course 1" course into "Course 2" course using this options: When I import "Course 1" course into "Course 2" course using this options:
| Initial | Include permission overrides | 1 | | Initial | Include permission overrides | 1 |
And I navigate to "Users > Permissions" in current page administration And I am on the "Course 1" "permissions" page
Then I should see "Non-editing teacher (1)" Then I should see "Non-editing teacher (1)"
And I set the field "Advanced role override" to "Non-editing teacher (1)" And I set the field "Advanced role override" to "Non-editing teacher (1)"
And I click on "Go" "button" in the "div.advancedoverride" "css_element" And I click on "//div[@class='advancedoverride']/div/form/noscript/input" "xpath_element"
And "enrol/manual:enrol" capability has "Allow" permission And "enrol/manual:enrol" capability has "Allow" permission
Scenario: Import process without permission option Scenario: Import process without permission option
...@@ -53,5 +53,5 @@ Feature: Import course's contents into another course ...@@ -53,5 +53,5 @@ Feature: Import course's contents into another course
And I log in as "teacher1" And I log in as "teacher1"
When I import "Course 1" course into "Course 2" course using this options: When I import "Course 1" course into "Course 2" course using this options:
| Initial | Include permission overrides | 0 | | Initial | Include permission overrides | 0 |
And I navigate to "Users > Permissions" in current page administration And I am on the "Course 2" "permissions" page
Then I should see "Non-editing teacher (0)" Then I should see "Non-editing teacher (0)"
...@@ -30,7 +30,7 @@ Feature: Option to include groups and groupings when importing a course to anoth ...@@ -30,7 +30,7 @@ Feature: Option to include groups and groupings when importing a course to anoth
Scenario: Include groups and groupings when importing a course to another course Scenario: Include groups and groupings when importing a course to another course
Given I import "Course 1" course into "Course 2" course using this options: Given I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 1 | | Initial | Include groups and groupings | 1 |
When I navigate to "Users > Groups" in current page administration When I am on the "Course 2" "groups" page
Then I should see "Group 1" Then I should see "Group 1"
And I should see "Group 2" And I should see "Group 2"
And I select "Groupings" from the "jump" singleselect And I select "Groupings" from the "jump" singleselect
...@@ -40,7 +40,7 @@ Feature: Option to include groups and groupings when importing a course to anoth ...@@ -40,7 +40,7 @@ Feature: Option to include groups and groupings when importing a course to anoth
Scenario: Do not include groups and groupings when importing a course to another course Scenario: Do not include groups and groupings when importing a course to another course
Given I import "Course 1" course into "Course 2" course using this options: Given I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 0 | | Initial | Include groups and groupings | 0 |
When I navigate to "Users > Groups" in current page administration When I am on the "Course 2" "groups" page
Then I should not see "Group 1" Then I should not see "Group 1"
And I should not see "Group 2" And I should not see "Group 2"
And I select "Groupings" from the "jump" singleselect And I select "Groupings" from the "jump" singleselect
......
...@@ -66,7 +66,7 @@ Feature: Restore Moodle 2 course backups ...@@ -66,7 +66,7 @@ Feature: Restore Moodle 2 course backups
And I add a "Forum" to section "1" and I fill the form with: And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name | | Forum name | Test forum post backup name |
| Description | Test forum post backup description | | Description | Test forum post backup description |
And I navigate to "Restore" in current page administration And I am on the "Course 1" "restore" page
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Section 3 | 0 | | Schema | Section 3 | 0 |
Then I should see "Course 1" Then I should see "Course 1"
...@@ -169,8 +169,7 @@ Feature: Restore Moodle 2 course backups ...@@ -169,8 +169,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options: When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 | | Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
And I am on "Course 2" course homepage And I am on the "Course 2" "restore" page
And I navigate to "Restore" in current page administration
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | Yes | | Schema | Overwrite course configuration | Yes |
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
...@@ -198,8 +197,7 @@ Feature: Restore Moodle 2 course backups ...@@ -198,8 +197,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options: When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 | | Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
And I am on "Course 2" course homepage And I am on the "Course 2" "restore" page
And I navigate to "Restore" in current page administration
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | No | | Schema | Overwrite course configuration | No |
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
...@@ -227,8 +225,7 @@ Feature: Restore Moodle 2 course backups ...@@ -227,8 +225,7 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 1" course using this options: When I backup "Course 1" course using this options:
| Initial | Include enrolled users | 0 | | Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
And I am on "Course 4" course homepage And I am on the "Course 4" "restore" page
And I navigate to "Restore" in current page administration
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | Overwrite course configuration | No | | Schema | Overwrite course configuration | No |
And I navigate to "Settings" in current page administration And I navigate to "Settings" in current page administration
...@@ -254,7 +251,7 @@ Feature: Restore Moodle 2 course backups ...@@ -254,7 +251,7 @@ Feature: Restore Moodle 2 course backups
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
When I restore "test_backup.mbz" backup into a new course using this options: When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include permission overrides | 1 | | Settings | Include permission overrides | 1 |
Then I navigate to "Users > Permissions" in current page administration Then I am on the "Course 1 copy 1" "permissions" page
And I should see "Non-editing teacher (1)" And I should see "Non-editing teacher (1)"
And I set the field "Advanced role override" to "Non-editing teacher (1)" And I set the field "Advanced role override" to "Non-editing teacher (1)"
And "enrol/manual:enrol" capability has "Allow" permission And "enrol/manual:enrol" capability has "Allow" permission
...@@ -268,5 +265,5 @@ Feature: Restore Moodle 2 course backups ...@@ -268,5 +265,5 @@ Feature: Restore Moodle 2 course backups
| Confirmation | Filename | test_backup.mbz | | Confirmation | Filename | test_backup.mbz |
When I restore "test_backup.mbz" backup into a new course using this options: When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include permission overrides | 0 | | Settings | Include permission overrides | 0 |
Then I navigate to "Users > Permissions" in current page administration Then I am on the "Course 1 copy 1" "permissions" page
And I should see "Non-editing teacher (0)" And I should see "Non-editing teacher (0)"
...@@ -99,8 +99,7 @@ Feature: Restore Moodle 2 course backups with different user data settings ...@@ -99,8 +99,7 @@ Feature: Restore Moodle 2 course backups with different user data settings
Given I navigate to "Courses > Backups > General restore defaults" in site administration Given I navigate to "Courses > Backups > General restore defaults" in site administration
And I set the field "s_restore_restore_general_users" to "" And I set the field "s_restore_restore_general_users" to ""
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage And I am on the "Course 1" "restore" page
And I navigate to "Restore" in current page administration
# "User data" marks the user data field for the section # "User data" marks the user data field for the section
# "-" marks the user data field for the data activity # "-" marks the user data field for the data activity
And I restore "test_backup.mbz" backup into a new course using this options: And I restore "test_backup.mbz" backup into a new course using this options:
...@@ -116,8 +115,7 @@ Feature: Restore Moodle 2 course backups with different user data settings ...@@ -116,8 +115,7 @@ Feature: Restore Moodle 2 course backups with different user data settings
Given I navigate to "Courses > Backups > General restore defaults" in site administration Given I navigate to "Courses > Backups > General restore defaults" in site administration
And I set the field "s_restore_restore_general_users" to "" And I set the field "s_restore_restore_general_users" to ""
And I press "Save changes" And I press "Save changes"
And I am on "Course 1" course homepage And I am on the "Course 1" "restore" page
And I navigate to "Restore" in current page administration
When I restore "test_backup.mbz" backup into a new course using this options: When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 0 | | Settings | Include enrolled users | 0 |
Then I should see "Test database name" Then I should see "Test database name"
......
...@@ -82,8 +82,7 @@ Feature: Award badges with separate groups ...@@ -82,8 +82,7 @@ Feature: Award badges with separate groups
@javascript @javascript
Scenario: Award course badge as non-editing teacher with more than one group Scenario: Award course badge as non-editing teacher with more than one group
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on the "Course 1" "groups" page
And I navigate to "Users > Groups" in current page administration
And I set the field "groups" to "Class B (2)" And I set the field "groups" to "Class B (2)"
And I press "Add/remove users" And I press "Add/remove users"
And I set the field "addselect" to "Teacher 2 (teacher2@example.com)" And I set the field "addselect" to "Teacher 2 (teacher2@example.com)"
...@@ -107,8 +106,7 @@ Feature: Award badges with separate groups ...@@ -107,8 +106,7 @@ Feature: Award badges with separate groups
@javascript @javascript
Scenario: Award course badge as non-editing teacher without any group Scenario: Award course badge as non-editing teacher without any group
Given I log in as "teacher1" Given I log in as "teacher1"
And I am on "Course 1" course homepage And I am on the "Course 1" "groups" page
And I navigate to "Users > Groups" in current page administration
And I set the field "groups" to "Class A (2)" And I set the field "groups" to "Class A (2)"
And I press "Add/remove users" And I press "Add/remove users"
And I set the field "removeselect" to "Teacher 2 (teacher2@example.com)" And I set the field "removeselect" to "Teacher 2 (teacher2@example.com)"
......
...@@ -45,8 +45,7 @@ Feature: Expand the courses nodes within the navigation block ...@@ -45,8 +45,7 @@ Feature: Expand the courses nodes within the navigation block
| Page contexts | Display throughout the entire site | | Page contexts | Display throughout the entire site |
And I press "Save changes" And I press "Save changes"
And I turn editing mode off And I turn editing mode off
And I am on "Course 2" course homepage And I am on the "Course 2" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I click on "Edit" "link" in the "Guest access" "table_row" And I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values: And I set the following fields to these values:
| Allow guest access | Yes | | Allow guest access | Yes |
......
...@@ -27,8 +27,7 @@ Feature: Allowed blocks controls ...@@ -27,8 +27,7 @@ Feature: Allowed blocks controls
Given I log in as "admin" Given I log in as "admin"
And I set the following system permissions of "Teacher" role: And I set the following system permissions of "Teacher" role:
| block/activity_modules:addinstance | Prohibit | | block/activity_modules:addinstance | Prohibit |
And I am on "Course 1" course homepage And I am on the "Course 1" "permissions" page
And I navigate to "Users > Permissions" in current page administration
And I override the system permissions of "Teacher" role with: And I override the system permissions of "Teacher" role with:
| block/completionstatus:addinstance | Prohibit | | block/completionstatus:addinstance | Prohibit |
And I log out And I log out
......
...@@ -47,8 +47,7 @@ Feature: Access visible and hidden cohorts ...@@ -47,8 +47,7 @@ Feature: Access visible and hidden cohorts
@javascript @skip_chrome_zerosize @javascript @skip_chrome_zerosize
Scenario: Teacher can see visible cohorts defined in the above contexts Scenario: Teacher can see visible cohorts defined in the above contexts
When I log in as "teacher" When I log in as "teacher"
And I am on "Course 1" course homepage And I am on the "Course 1" "enrolment methods" page
And I navigate to "Users > Enrolment methods" in current page administration
And I select "Cohort sync" from the "Add method" singleselect And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list