Definition step deprecated and affected tests modified.
Scenario: Enable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 1 |
- When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
+ When I navigate to "Users > Accounts > Add a new user" in site administration
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
Scenario: Disable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 0 |
- When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
+ When I navigate to "Users > Accounts > Add a new user" in site administration
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
And the following config values are set as admin:
| enableavailability | 1 |
And I am on homepage
- And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
+ And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Having clicked on it, I should also see the list of plugins.
And I should see "Restriction by date"
| Course 1 | C1 | topics |
And I log in as "admin"
And I am on site homepage
- When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
+ When I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Check the icon is there (it should be a Hide icon, meaning is currently visible).
Then "Hide" "icon" should exist in the "Restriction by date" "table_row"
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > Cohorts" in site administration
Then the following should exist in the "cohorts" table:
| Name | Cohort size |
| System cohort A | 1 |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage
- And I navigate to "Reset" node in "Course administration"
+ And I navigate to "Reset" in current page administration
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles"
And the field "two" matches value ""
# Check if field xpath set/match works.
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
And the field with xpath "//input[@name='idnumber']" does not match value ""
And I press "Save and display"
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And the field "Course ID number" matches value "Course id number"
Scenario: with JS disabled all form fields getters and setters works as expected
Background:
Given I am on homepage
And I log in as "admin"
- And I navigate to "Acceptance testing" node in "Site administration > Development"
+ And I navigate to "Development > Acceptance testing" in site administration
@javascript
Scenario: Accessing the list
Scenario: Add a new file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
And I press "Add"
# Try setting all the form fields, not just the optional ones.
And I set the following fields to these values:
Scenario: Update an existing file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
When I click on "Edit 7z" "link"
And I set the following fields to these values:
| Extension | doc |
Scenario: Change the text option (was buggy)
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
When I click on "Edit 7z" "link"
And I set the following fields to these values:
| Description type | Custom description specified in this form |
Scenario: Try to select a text option without entering a value.
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
When I click on "Edit dmg" "link"
And I set the field "Description type" to "Custom description"
And I press "Save changes"
Scenario: Delete an existing file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
When I click on "Delete 7z" "link"
Then I should see "Are you absolutely sure you want to remove .7z?"
And I press "Yes"
Scenario: Delete a custom file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
And I press "Add"
And I set the following fields to these values:
| Extension | frog |
Scenario: Revert changes to deleted file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
When I click on "Delete 7z" "link"
And I press "Yes"
And I follow "Restore 7z to Moodle defaults"
Scenario: Revert changes to updated file type
Given I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
And I click on "Edit 7z" "link"
And I set the following fields to these values:
| Type groups | document |
| fullname | shortname |
| Course 1 | C1 |
And I log in as "admin"
- And I navigate to "File types" node in "Site administration > Server"
+ And I navigate to "Server > File types" in site administration
And I press "Add"
And I set the following fields to these values:
| Extension | frog |
@javascript
Scenario: Go to the HTTPS replace report screen. Make sure broken domains are reported.
- When I navigate to "HTTP security" node in "Site administration > Security"
+ When I navigate to "Security > HTTP security" in site administration
And I follow "HTTPS conversion tool"
And I press "Continue"
Then I should see "intentionally.unavailable"
@javascript
Scenario: Use the find and replace tool.
- When I navigate to "HTTP security" node in "Site administration > Security"
+ When I navigate to "Security > HTTP security" in site administration
And I follow "HTTPS conversion tool"
And I press "Continue"
And I set the field "I understand the risks of this operation" to "1"
Scenario: Install language pack
Given I log in as "admin"
- And I navigate to "Language packs" node in "Site administration > Language"
+ And I navigate to "Language > Language packs" in site administration
When I set the field "Available language packs" to "en_ar"
And I press "Install selected language pack(s)"
Then I should see "Language pack 'en_ar' was successfully installed"
And the "Installed language packs" select box should contain "en_ar"
- And I navigate to "Live logs" node in "Site administration > Reports"
+ And I navigate to "Reports > Live logs" in site administration
And I should see "The language pack 'en_ar' was installed."
And I log out
Scenario: Update language pack
Given outdated langpack 'en_ar' is installed
And I log in as "admin"
- And I navigate to "Language packs" node in "Site administration > Language"
+ And I navigate to "Language > Language packs" in site administration
When I press "Update all installed language packs"
Then I should see "Language pack 'en_ar' was successfully updated"
And I should see "Language pack update completed"
- And I navigate to "Live logs" node in "Site administration > Reports"
+ And I navigate to "Reports > Live logs" in site administration
And I should see "The language pack 'en_ar' was updated."
And I log out
Scenario: Try to uninstall language pack
Given I log in as "admin"
- And I navigate to "Language packs" node in "Site administration > Language"
+ And I navigate to "Language > Language packs" in site administration
And I set the field "Available language packs" to "en_ar"
And I press "Install selected language pack(s)"
When I set the field "Installed language packs" to "en_ar"
Then I should see "Language pack 'en_ar' was uninstalled"
And the "Installed language packs" select box should not contain "en_ar"
And the "Available language packs" select box should contain "en_ar"
- And I navigate to "Live logs" node in "Site administration > Reports"
+ And I navigate to "Reports > Live logs" in site administration
And I should see "The language pack 'en_ar' was removed."
And I should see "Language pack uninstalled"
And I log out
Scenario: Try to uninstall English language pack
Given I log in as "admin"
- And I navigate to "Language packs" node in "Site administration > Language"
+ And I navigate to "Language > Language packs" in site administration
When I set the field "Installed language packs" to "en"
And I press "Uninstall selected language pack(s)"
Then I should see "The English language pack cannot be uninstalled."
- And I navigate to "Live logs" node in "Site administration > Reports"
+ And I navigate to "Reports > Live logs" in site administration
And I should not see "Language pack uninstalled"
And I log out
Scenario: Tool is disabled by default.
Given I log in as "admin"
- When I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ When I navigate to "Reports > Event monitoring rules" in site administration
Then I should see "Event monitoring is currently disabled"
And I should see "Enable"
And I should not see "Add a new rule"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
And I click on "Enable" "link"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
| minutes | 1 |
| Notification message | The forum post was created. {modulelink} |
And I press "Save changes"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule site level |
Scenario: Add a rule on course level
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
When I press "Add a new rule"
And I set the following fields to these values:
| name | New rule |
Scenario: Delete a rule on course level
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete the rule \"New rule course level\"?"
And I press "Continue"
Scenario: Edit a rule on course level
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
When I click on "Edit rule" "link"
And I set the following fields to these values:
| name | New rule quiz |
Scenario: Duplicate a rule on course level
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
When I click on "Duplicate rule" "link" in the "New rule course level" "table_row"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r1" "css_element" should appear before "#toolmonitorrules_r2" "css_element"
Scenario: Add a rule on site level
Given I log in as "admin"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
When I press "Add a new rule"
And I set the following fields to these values:
| name | New rule |
Scenario: Delete a rule on site level
Given I log in as "admin"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
When I click on "Delete rule" "link"
Then I should see "Are you sure you want to delete the rule \"New rule site level\"?"
And I press "Continue"
Scenario: Edit a rule on site level
Given I log in as "admin"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
When I click on "Edit rule" "link"
And I set the following fields to these values:
| name | New Rule Quiz |
Scenario: Duplicate a rule on site level
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
When I click on "Duplicate rule" "link" in the "New rule site level" "table_row"
Then I should see "Rule successfully duplicated"
And "#toolmonitorrules_r2" "css_element" should appear after "#toolmonitorrules_r1" "css_element"
| teacher2 | C1 | teacher |
| teacher2 | C2 | editingteacher |
And I log in as "admin"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
And I click on "Enable" "link"
And I am on "Course 1" course homepage
- And I navigate to "Event monitoring rules" node in "Course administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in current page administration
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule course level |
| minutes | 1 |
| Notification message | The course was viewed. {modulelink} |
And I press "Save changes"
- And I navigate to "Event monitoring rules" node in "Site administration > Reports"
+ And I navigate to "Reports > Event monitoring rules" in site administration
And I press "Add a new rule"
And I set the following fields to these values:
| name | New rule site level |
| minutes | 1 |
| Notification message | The course was viewed. {modulelink} |
And I press "Save changes"
- And I navigate to "Define roles" node in "Site administration > Users > Permissions"
+ And I navigate to "Users > Permissions > Define roles" in site administration
And I follow "Non-editing teacher"
And I press "Edit"
And I click on "tool/monitor:managerules" "checkbox"
And I log out
# Create new policy document.
And I log in as "admin"
- And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies"
+ And I navigate to "Users > Privacy and policies > Manage policies" in site administration
And I should see "Policies and agreements"
And I should see "New policy"
And I follow "New policy"
And I log out
# Create new version of the policy document.
And I log in as "admin"
- And I navigate to "Manage policies" node in "Site administration > Users > Privacy and policies"
+ And I navigate to "Users > Privacy and policies > Manage policies" in site administration
When I follow "Actions"
Then I should see "View"
And I should see "Edit"
And I am on "Course 1" course homepage with editing mode on
And I delete "Quiz 1" activity
And I run all adhoc tasks
- And I navigate to "Recycle bin" node in "Course administration"
+ And I navigate to "Recycle bin" in current page administration
And I should see "Quiz 1"
And I click on "Restore" "link" in the "region-main" "region"
And I log out
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity
- When I navigate to "Recycle bin" node in "Course administration"
+ When I navigate to "Recycle bin" in current page administration
Then I should see "Test assign"
And I should see "Contents will be permanently deleted after 7 days"
And I click on "Restore" "link" in the "region-main" "region"
And I go to the courses management page
And I should see "Course 2" in the "#course-listing" "css_element"
And I am on "Course 2" course homepage
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And I follow "Overview"
And "Student 1" "text" should exist in the "Group A" "table_row"
And "Student 2" "text" should exist in the "Group A" "table_row"
| Description | Test |
And I delete "Test assign" activity
And I run all adhoc tasks
- And I navigate to "Recycle bin" node in "Course administration"
+ And I navigate to "Recycle bin" in current page administration
When I click on "Delete" "link"
Then I should see "Are you sure you want to delete the selected item from the recycle bin?"
And I press "Cancel"
And I delete "Test assign 1" activity
And I delete "Test assign 2" activity
And I run all adhoc tasks
- And I navigate to "Recycle bin" node in "Course administration"
+ And I navigate to "Recycle bin" in current page administration
And I should see "Test assign 1"
And I should see "Test assign 2"
When I click on "Delete all" "link"
Background:
Given the scheduled task "\core\task\send_new_user_passwords_task" has a fail delay of "60" seconds
And I log in as "admin"
- And I navigate to "Scheduled tasks" node in "Site administration > Server"
+ And I navigate to "Server > Scheduled tasks" in site administration
Scenario: Clear fail delay
When I click on "Clear" "text" in the "Send new user passwords" "table_row"
Background:
Given I log in as "admin"
- And I navigate to "Scheduled tasks" node in "Site administration > Server"
+ And I navigate to "Server > Scheduled tasks" in site administration
Scenario: Disable scheduled task
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row"
Scenario: Run a task
Given I log in as "admin"
- When I navigate to "Scheduled tasks" node in "Site administration > Server"
+ When I navigate to "Server > Scheduled tasks" in site administration
Then I should see "Never" in the "Log table cleanup" "table_row"
And I click on "Run now" "text" in the "Log table cleanup" "table_row"
Scenario: Cancel running a task
Given I log in as "admin"
- When I navigate to "Scheduled tasks" node in "Site administration > Server"
+ When I navigate to "Server > Scheduled tasks" in site administration
And I click on "Run now" "text" in the "Log table cleanup" "table_row"
And I press "Cancel"
# Confirm we're back on the scheduled tasks page by looking for the table.
Given the following config values are set as admin:
| enablerunnow | 0 | tool_task |
When I log in as "admin"
- And I navigate to "Scheduled tasks" node in "Site administration > Server"
+ And I navigate to "Server > Scheduled tasks" in site administration
Then I should not see "Run now"
| fullname | shortname | category |
| First course | C1 | 0 |
And I log in as "admin"
- And I navigate to "Upload courses" node in "Site administration > Courses"
+ And I navigate to "Courses > Upload courses" in site administration
@javascript
Scenario: Creation of unexisting courses
| fullname | shortname | category |
| Some random name | C1 | 0 |
And I log in as "admin"
- And I navigate to "Upload courses" node in "Site administration > Courses"
+ And I navigate to "Courses > Upload courses" in site administration
@javascript
Scenario: Updating a course fullname
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
- And I navigate to "Upload users" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Upload users" in site administration
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
Then I should see "Upload users preview"
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
- And I navigate to "Upload users" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > Upload users" in site administration
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
And I set the following fields to these values:
Scenario: Upload users with custom profile fields
# Create user profile field.
Given I log in as "admin"
- And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > User profile fields" in site administration
And I set the field "datatype" to "Text area"
And I set the following fields to these values:
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button"
# Upload users.
- When I navigate to "Upload users" node in "Site administration > Users > Accounts"
+ When I navigate to "Users > Accounts > Upload users" in site administration
And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
# Check that users were created and the superfield is filled.
- And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > Browse list of users" in site administration
And I follow "Tom Jones"
And I should see "Super field"
And I should see "The big guy"
* @Given /^I open the User tour settings page$/
*/
public function i_open_the_user_tour_settings_page() {
- $this->execute('behat_navigation::i_navigate_to_node_in', [
- get_string('usertours', 'tool_usertours'),
- implode(' > ', [
- get_string('administrationsite', 'moodle'),
- get_string('appearance', 'admin'),
- ])
- ]);
+ $this->execute('behat_navigation::i_navigate_to_in_site_administration',
+ get_string('appearance', 'admin') . ' > ' .
+ get_string('usertours', 'tool_usertours')
+ );
}
}
Background:
Given I log in as "admin"
- And I navigate to "Privacy settings" node in "Site administration > Users > Privacy and policies"
+ And I navigate to "Users > Privacy and policies > Privacy settings" in site administration
Scenario: Admin provides valid value for 'Age of digital consent'.
Given I set the field "s__agedigitalconsentmap" to multiline:
# Set up course.
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And I set the field "Enable completion tracking" to "Yes"
And I press "Save and display"
Scenario: Test with custom user profile field
# Add custom field.
Given I log in as "admin"
- And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > User profile fields" in site administration
And I set the field "datatype" to "Text input"
And I set the following fields to these values:
| Short name | superfield |
And I click on "Save changes" "button"
# Set field value for user.
- And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > Browse list of users" in site administration
And I click on ".icon[title=Edit]" "css_element" in the "s@example.com" "table_row"
And I expand all fieldsets
And I set the field "Super field" to "Bananaman"
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:
| Initial | Include groups and groupings | 1 |
- When I navigate to "Groups" node in "Course administration > Users"
+ When I navigate to "Users > Groups" in current page administration
Then I should see "Group 1"
And I should see "Group 2"
And I follow "Groupings"
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:
| Initial | Include groups and groupings | 0 |
- When I navigate to "Groups" node in "Course administration > Users"
+ When I navigate to "Users > Groups" in current page administration
Then I should not see "Group 1"
And I should not see "Group 2"
And I follow "Groupings"
And I should see "Test forum name"
And I should see "Topic 15"
And I should not see "Topic 16"
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "id_format" matches value "Topics format"
And I press "Cancel"
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum post backup name |
| Description | Test forum post backup description |
- And I navigate to "Restore" node in "Course administration"
+ 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:
| Schema | Section 3 | 0 |
Then I should see "Course 1"
When I restore "test_backup.mbz" backup into a new course using this options:
Then I should see "Topic 1"
And I should see "Test forum name"
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "id_format" matches value "Topics format"
And I set the following fields to these values:
And I press "Save and display"
And I should see "1 January - 7 January"
And I should see "Test forum name"
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "id_format" matches value "Weekly format"
And I set the following fields to these values:
| id_format | Social format |
And I press "Save and display"
And I should see "An open forum for chatting about anything you want to"
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And the field "id_format" matches value "Social format"
And I press "Cancel"
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| Schema | Overwrite course configuration | Yes |
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Course layout" matches value "Show one section per page"
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| Schema | Overwrite course configuration | No |
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Course short name" matches value "C2"
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on "Course 2" course homepage
- And I navigate to "Restore" node in "Course administration"
+ 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:
| Schema | Overwrite course configuration | Yes |
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Course layout" matches value "Show one section per page"
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on "Course 2" course homepage
- And I navigate to "Restore" node in "Course administration"
+ 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:
| Schema | Overwrite course configuration | No |
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Course short name" matches value "C2"
| Initial | Include enrolled users | 0 |
| Confirmation | Filename | test_backup.mbz |
And I am on "Course 4" course homepage
- And I navigate to "Restore" node in "Course administration"
+ 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:
| Schema | Overwrite course configuration | No |
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then the field "id_format" matches value "Topics format"
And the field "Course short name" matches value "C4"
@javascript
Scenario: Restore a backup with user data with site config for including users set to 0
- Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups"
+ 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 press "Save changes"
And I am on "Course 1" course homepage
- And I navigate to "Restore" node in "Course administration"
+ And I navigate to "Restore" in current page administration
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
And I restore "test_backup.mbz" backup into a new course using this options:
@javascript
Scenario: Restore a backup with user data with local and site config config for including users set to 0
- Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups"
+ 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 press "Save changes"
And I am on "Course 1" course homepage
- And I navigate to "Restore" node in "Course administration"
+ And I navigate to "Restore" in current page administration
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 0 |
Then I should see "Test database name"
@javascript
Scenario: Setting badges settings
- Given I navigate to "Badges settings" node in "Site administration > Badges"
+ Given I navigate to "Badges > Badges settings" in site administration
And I set the field "Default badge issuer name" to "Test Badge Site"
And I set the field "Default badge issuer contact details" to "testuser@example.com"
And I press "Save changes"
And I press "Customise this page"
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
And I add the "Navigation" block if not present
- Given I navigate to "Site badges" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ Given I click on "Site badges" "link" in the "Navigation" "block"
Then I should see "There are no badges available."
@javascript @_file_upload
Scenario: Add a badge
- Given I navigate to "Add a new badge" node in "Site administration > Badges"
+ Given I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Test badge with 'apostrophe' and other friends (<>&@#) |
| Description | Test badge description |
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Create course badge 1.
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge 1 |
And I press "Enable access"
And I press "Continue"
# Badge #2
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I am on "Course 1" course homepage
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge 2 |
@javascript
Scenario: Award profile badge
Given I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Profile Badge |
| Description | Test badge description |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
| Description | Submit your online text |
| id_completion | 1 |
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | Yes |
And I press "Save and display"
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| id_completion | 1 |
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link"
And I set the field "Assignment - Test assignment name" to "1"
And I press "Save changes"
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Create course badge 1.
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge 1 |
And I follow "Recipients (1)"
Then I should see "Recipients (1)"
# Add course badge 2.
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I am on "Course 1" course homepage
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge 2 |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
| user1 | CH1 |
| user2 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user2 | CH1 |
| user2 | CH3 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user3 | CH2 |
| user3 | CH3 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user1 | CH1 |
| user2 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user2 | CH2 |
| user3 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user2 | CH2 |
| user2 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user2 | CH1 |
| user3 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
| user1 | CH2 |
| user2 | CH2 |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge 1 |
| Description | Site badge description |
And I press "Enable access"
When I press "Continue"
And I should see "Recipients (1)"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge 2 |
| Description | Site badge description |
| user2 | Second | User | second@example.com |
| user3 | Third | User | third@example.com |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge 1 |
| Description | Site badge description |
And I press "Enable access"
When I press "Continue"
And I should see "Recipients (0)"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge 2 |
| Description | Site badge description |
And I press "Save"
And I press "Enable access"
And I press "Continue"
- Then I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ Then I navigate to "Users > Accounts >Cohorts" in site administration
And I add "First User (first@example.com)" user to "CH1" cohort members
And I add "First User (first@example.com)" user to "CH2" cohort members
And I add "Second User (second@example.com)" user to "CH2" cohort members
| username | firstname | lastname | email |
| user1 | First | User | first@example.com |
And I log in as "admin"
- And I navigate to "Add a new badge" node in "Site administration > Badges"
+ And I navigate to "Badges > Add a new badge" in site administration
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
Scenario: Check hidden roles are not visible
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
Background:
Given I log in as "admin"
- And I navigate to "Scheduled tasks" node in "Site administration > Server"
+ And I navigate to "Server > Scheduled tasks" in site administration
And I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
And I log out
# Test bookmark functionality using the "User profile fields" page as our bookmark.
Scenario: Admin page can be bookmarked
Given I log in as "admin"
- And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > User profile fields" in site administration
When I click on "Bookmark this page" "link" in the "Admin bookmarks" "block"
Then I should see "User profile fields" in the "Admin bookmarks" "block"
# See the existing bookmark is there too.
Scenario: Admin page can be accessed through bookmarks block
Given I log in as "admin"
- And I navigate to "Notifications" node in "Site administration"
+ And I navigate to "Notifications" in site administration
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
# Verify that we are on the right page.
Then I should see "Scheduled tasks" in the "h1" "css_element"
Scenario: Admin page can be removed from bookmarks
Given I log in as "admin"
- And I navigate to "Notifications" node in "Site administration"
+ And I navigate to "Notifications" in site administration
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block"
When I click on "Unbookmark this page" "link" in the "Admin bookmarks" "block"
Then I should see "Bookmark deleted"
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Issue badge 1 of 2
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| id_name | Badge 1 |
| id_description | Badge 1 |
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)"
And I press "Award badge"
# Issue Badge 2 of 2
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I am on "Course 1" course homepage
+ And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| id_name | Badge 2 |
| id_description | Badge 2 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Issue badge 1 of 2
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| id_name | Badge 1 |
| id_description | Badge 1 |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Latest badges" block
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Issue badge 1 of 2
- And I navigate to "Add a new badge" node in "Course administration > Badges"
+ And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| id_name | Badge 1 |
| id_description | Badge 1 |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Blog menu" block
And I log out
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Recent blog entries" block
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
And I add the "Navigation" block if not present
Scenario: Students use the recent blog entries block to view blogs
Given I log in as "student1"
And I am on site homepage
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Add a new entry"
When I set the following fields to these values:
| Entry title | S1 First Blog |
Scenario: Students only see a few entries in the recent blog entries block
Given I log in as "student1"
And I am on site homepage
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Add a new entry"
# Blog 1 of 5
And I set the following fields to these values:
Then I log out
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I configure the "Recent blog entries" block
And I set the following fields to these values:
| id_config_numberofrecentblogentries | 2 |
| student2 | G2 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| id_groupmode | Separate groups |
| id_groupmodeforce | Yes |
| student2 | G2 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| id_groupmode | Separate groups |
| id_groupmodeforce | Yes |
| id_eventtype | Site |
| id_name | My Site Event |
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Upcoming events" block
And I log out
When I log in as "teacher1"
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Comments" block
And I follow "Show comments"
And I add "I'm a comment from admin" comment to comments block
Scenario: Add the block to a the course where completion is disabled
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Enable completion tracking | No |
And I press "Save and display"
| Require view | 1 |
And I press "Save and return to course"
When I add the "Course completion status" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test page name | 1 |
| Require view | 1 |
And I press "Save and return to course"
And I add the "Course completion status" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test page name | 1 |
| Require view | 1 |
And I press "Save and return to course"
And I add the "Course completion status" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test page name | 1 |
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Teacher | 1 |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Course completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Course completion" in current page administration
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Teacher | 1 |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Course completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Course completion" in current page administration
And I follow "Click to mark user complete"
And I log out
And I log in as "student1"
And I log out
And I log in as "teacher2"
And I am on "Course 1" course homepage
- And I navigate to "Course completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Course completion" in current page administration
And I follow "Click to mark user complete"
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
And I add the "Self completion" block
- And I navigate to "Course completion" node in "Course administration"
+ And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| id_criteria_self | 1 |
Scenario: Add the course list block on the frontpage and navigate to the course listing
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Scenario: Add the course list block on the frontpage page and navigate to another course
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Courses" block
And I log out
When I log in as "teacher1"
Scenario: Add the course list block on the frontpage page and view as an admin
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
When I add the "Courses" block
Then I should see "Miscellaneous" in the "Course categories" "block"
And I should see "Category 1" in the "Course categories" "block"
Scenario: Add the course list block on the frontpage page and view as a guest
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Courses" block
And I log out
When I log in as "guest"
And I am on site homepage
And I turn editing mode on
And I add the "Course/site summary" block
- And I navigate to "Edit settings" node in "Front page settings"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| summary | Proved the summary block works! |
And I press "Save changes"
| testuser | testpass | Test | User | student1@example.com |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Login" block
Scenario: Login block visible to non-logged in users
| teacher1 | Teacher | One | teacher1@example.com | T1 |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Logged in user" block
And I log out
And I press "Save changes"
And I turn editing mode off
And I am on "Course 2" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ 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 set the following fields to these values:
| Allow guest access | Yes |
Scenario: View the online users block on the front page and see myself
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
When I add the "Online users" block
Then I should see "Admin User" in the "Online users" "block"
And I should see "1 online user" in the "Online users" "block"
Scenario: View the online users block on the front page as a logged in user
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Online users" block
And I log out
And I log in as "student2"
Scenario: View the online users block on the front page as a guest
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Online users" block
And I log out
And I log in as "student2"
Scenario: Hide/show user's online status from/to other users in the online users block on front page
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Online users" block
And I log out
When I log in as "student1"
| student1 | Sam | Student | student1@example.com |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "People" block
And I log out
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Private files" block
And I log out
| student1 | C1 | student |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit 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
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Search forums" block
And I log out
Scenario: Add a URL in menu block and ensure it appears
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Main menu" block
When I add a "URL" to section "0" and I fill the form with:
| Name | google |
Scenario: Edit name of acitivity in-place in site main menu block
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Main menu" block
When I add a "Forum" to section "0" and I fill the form with:
| Forum name | My forum name |
And I set the following administration settings values:
| allowstealth | 1 |
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
And I add the "Main menu" block
When I add a "Forum" to section "0" and I fill the form with:
| Forum name | Visible forum |
And the field "Availability" matches value "Make available but not shown on course page"
And I press "Save and return to course"
And "My forum name" activity in site main menu block should be available but hidden from course page
- And I navigate to "Turn editing off" node in "Front page settings"
+ And I navigate to "Turn editing off" in current page administration
And "My forum name" activity in site main menu block should be available but hidden from course page
And I log out
And I should not see "My forum name" in the "Main menu" "block"
And I press "Customise this page"
# TODO MDL-57120 site "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
- And I navigate to "Tags" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Tags" "link" in the "Navigation" "block"
And I add the "Flickr" block
And I configure the "Flickr" block
Then I should see "Flickr block title"
| manager1 | Acceptance test site | manager |
# Allow at least one role assignment in the block context:
And I log in as "admin"
- And I navigate to "Define roles" node in "Site administration > Users > Permissions"
+ And I navigate to "Users > Permissions > Define roles" in site administration
And I follow "Edit Non-editing teacher role"
And I set the following fields to these values:
| Block | 1 |
| testuser2 | C1 | student |
And I log in as "admin"
And I am on site homepage
- And I navigate to "Blog" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Blog" in site administration
And I set the following fields to these values:
| Blog visibility | Users can only see their own blog |
And I press "Save changes"
And I press "Save changes"
And I log out
And I log in as "testuser"
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post from user 1 |
Scenario: Commenting on my own blog entry
Given I am on site homepage
And I log in as "testuser"
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Blog post from user 1"
And I should see "User 1 blog post content"
And I follow "Comments (0)"
Scenario: Deleting my own comment
Given I am on site homepage
And I log in as "testuser"
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Blog post from user 1"
And I should see "User 1 blog post content"
And I follow "Comments (0)"
Given I am on site homepage
And I log in as "testuser2"
And I am on site homepage
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Blog post from user 1"
When I follow "Comments (0)"
And I set the field "content" to "$My own >nasty< \"string\"!"
And I press "Save changes"
And I log out
And I log in as "testuser"
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
And I follow "Add a new entry"
And I set the following fields to these values:
| Entry title | Blog post one |
| Blog entry body | User 1 blog post content |
And I press "Save changes"
And I am on site homepage
- And I navigate to "Site blogs" node in "Site pages"
+ And I click on "Site blogs" "link" in the "Navigation" "block"
Scenario: Delete blog post results in post deleted
Given I follow "Blog post one"
@javascript
Scenario: Manager of a Category can see all child and parent events in their category
Given I log in as "managera"
- When I navigate to "Calendar" node in "Site pages"
+ And I press "Customise this page"
+ # TODO MDL-57120 site "Tags" link not accessible without navigation block.
+ When I add the "Navigation" block if not present
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Calendar" "link" in the "Navigation" "block"
Then I should see "FA event"
And I should see "DA1 event"
And I should see "DA2 event"
And I should not see "DB2 event"
And I log out
Given I log in as "managerb"
- When I navigate to "Calendar" node in "Site pages"
+ And I press "Customise this page"
+ # TODO MDL-57120 site "Tags" link not accessible without navigation block.
+ When I add the "Navigation" block if not present
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Calendar" "link" in the "Navigation" "block"
Then I should see "FB event"
And I should see "DB1 event"
And I should see "DB2 event"
@javascript
Scenario: Users enrolled in a course can see all child and parent events in their category
Given I log in as "student1"
- When I navigate to "Calendar" node in "Site pages"
+ And I press "Customise this page"
+ # TODO MDL-57120 site "Tags" link not accessible without navigation block.
+ When I add the "Navigation" block if not present
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Calendar" "link" in the "Navigation" "block"
Then I should see "FA event"
And I should see "DA1 event"
And I should see "DA2 event"
Scenario: Teacher can see visible cohorts defined in the above contexts
When I log in as "teacher"
And I am on "Course 1" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
Then "Cohort in category 1" "autocomplete_suggestions" should exist
And I set the field "Cohort" to "System cohort"
And I press "Add method"
And I am on "Course 1" course homepage
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I navigate to "Users > Enrolled users" in current page administration
And I should see "student@example.com"
And I am on "Course 1" course homepage
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And I press "Auto-create groups"
And the "Select members from cohort" select box should contain "Cohort in category 1"
And the "Select members from cohort" select box should contain "System cohort"
Scenario: System manager can see all cohorts defined in the above contexts
When I log in as "user1"
And I am on "Course 1" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
Then "Cohort in category 1" "autocomplete_suggestions" should exist
And "System empty cohort" "autocomplete_suggestions" should exist
And I set the field "Cohort" to "System cohort"
And I press "Add method"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 1" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
And I should see "student@example.com"
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And I press "Auto-create groups"
And the "Select members from cohort" select box should contain "Cohort in category 1"
And the "Select members from cohort" select box should contain "System cohort"
Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above
When I log in as "user2"
And I am on "Course 1" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
And I select "Cohort sync" from the "Add method" singleselect
And I open the autocomplete suggestions list
Then "Cohort in category 1" "autocomplete_suggestions" should exist
And "System empty cohort" "autocomplete_suggestions" should exist
And I set the field "Cohort" to "System cohort"
And I press "Add method"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 1" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
And I should see "student@example.com"
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And I press "Auto-create groups"
And the "Select members from cohort" select box should contain "Cohort in category 1"
And the "Select members from cohort" select box should contain "System cohort"
| user3 | Third | User | third@example.com |
| user4 | Forth | User | forth@example.com |
And I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Add new cohort"
And I set the following fields to these values:
| Name | Test cohort name |
if (!$this->getSession()->getPage()->find('css', 'input#cohort_search_q')) {
// With JS enabled we should expand a few tree nodes.
- $parentnodes = get_string('administrationsite') . ' > ' .
- get_string('users', 'admin') . ' > ' .
+ $parentnodes = get_string('users', 'admin') . ' > ' .
get_string('accounts', 'admin');
$this->execute("behat_general::i_am_on_homepage");
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('cohorts', 'cohort'), $parentnodes)
+ $this->execute("behat_navigation::i_navigate_to_in_site_administration",
+ $parentnodes . ' > ' . get_string('cohorts', 'cohort')
);
}
And I am on "Course 2" course homepage
And I add "Cohort sync" enrolment method with:
| Cohort | Cohort 2 |
- When I navigate to "Upload users" node in "Site administration > Users > Accounts"
+ When I navigate to "Users > Accounts > Upload users" in site administration
And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
@javascript
Scenario: Upload cohorts with default System context as admin
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Upload cohorts"
And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager
And I click on "Preview" "button"
@javascript @_file_upload
Scenario: Upload cohorts with default category context as admin
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Upload cohorts"
And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager
And I set the field "Default context" to "Cat 1 / Cat 3"
And I should see "Uploaded 6 cohorts"
And I press "Continue"
And I should see "Category: Cat 3: available cohorts (3)"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "All cohorts"
And the following should exist in the "cohorts" table:
| Category | Name | Cohort ID | Description | Cohort size | Source |
| name | idnumber |
| Cohort | cohortid2 |
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Upload cohorts"
And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager
And I click on "Preview" "button"
@javascript @_file_upload
Scenario: Upload cohorts with different ways of specifying context
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Upload cohorts"
And I upload "cohort/tests/fixtures/uploadcohorts2.csv" file to "File" filemanager
And I click on "Preview" "button"
@javascript @_file_upload
Scenario: Upload cohorts with theme
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
And I follow "Upload cohorts"
And I upload "cohort/tests/fixtures/uploadcohorts4.csv" file to "File" filemanager
And I click on "Preview" "button"
Scenario: Admin can see system cohorts and all cohorts
When I log in as "admin"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
Then I should see "System cohort"
And I should not see "Cohort in category"
And I follow "All cohorts"
Scenario: Manager can see system cohorts and all cohorts
When I log in as "user1"
- And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts >Cohorts" in site administration
Then I should see "System cohort"
And I should not see "Cohort in category"
And I follow "All cohorts"
*/
public function go_to_the_current_course_activity_completion_report() {
$completionnode = get_string('pluginname', 'report_progress');
- $reportsnode = get_string('courseadministration') . ' > ' . get_string('reports');
+ $reportsnode = get_string('reports');
- $this->execute("behat_navigation::i_navigate_to_node_in", array($completionnode, $reportsnode));
+ $this->execute("behat_navigation::i_navigate_to_in_current_page_administration",
+ $reportsnode . ' > ' . $completionnode);
}
/**
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Reports > Activity completion" in current page administration
And "Student First" user has completed "Test forum name" activity
*/
public function i_go_to_the_courses_management_page() {
- $parentnodes = get_string('administrationsite') . ' > ' . get_string('courses', 'admin');
+ $parentnodes = get_string('courses', 'admin');
// Go to home page.
$this->execute("behat_general::i_am_on_homepage");
- // Navigate to course management page via navigation block.
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('coursemgmt', 'admin'), $parentnodes)
+ // Navigate to course management via system administration.
+ $this->execute("behat_navigation::i_navigate_to_in_site_administration",
+ array($parentnodes . ' > ' . get_string('coursemgmt', 'admin'))
);
}
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" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element"
And I set the following fields to these values:
| Tags | Algebra |
And I press "Save and display"
And I am on "Course 2" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Tags | Mathematics, Geometry |
And I press "Save and display"
And I press "Customise this page"
# TODO MDL-57120 "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
- And I navigate to "Tags" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Tags" "link" in the "Navigation" "block"
And I follow "Mathematics"
Then I should see "Course 1"
And I should see "Course 2"
And I press "Customise this page"
# TODO MDL-57120 "Tags" link not accessible without navigation block.
And I add the "Navigation" block if not present
- And I navigate to "Tags" node in "Site pages"
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ And I click on "Tags" "link" in the "Navigation" "block"
And I follow "Mathematics"
Then I should see "Course 1"
And I should see "Course 2"
And the following "categories" exist:
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
- And I navigate to "Define roles" node in "Site administration > Users > Permissions"
+ And I navigate to "Users > Permissions > Define roles" in site administration
And I click on "Add a new role" "button"
And I click on "Continue" "button"
And I set the following fields to these values:
| contextlevel50 | 1 |
| enrol/self:holdkey | 1 |
And I click on "Create this role" "button"
- And I navigate to "Courses" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Courses" in site administration
And I click on "Keyholder" "checkbox"
And I press "Save changes"
And the following "users" exist:
| user | course | role |
| manager1 | Acceptance test site | manager |
And I log in as "admin"
- And I navigate to "Course default settings" node in "Site administration > Courses"
+ And I navigate to "Courses > Course default settings" in site administration
@javascript
Scenario: The number of sections can be increased and the limits are applied to courses
| Your word for 'Teacher' | Lecturer |
| Your word for 'Student' | Learner |
And I press "Save and display"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "Lecturer" in the "Teacher 1" "table_row"
And I should see "Learner" in the "Student 1" "table_row"
| Description | Test forum description |
Scenario: Allow guest access without password
- Given I navigate to "Enrolment methods" node in "Course administration > Users"
+ Given I navigate to "Users > Enrolment methods" in current page administration
And I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values:
| Allow guest access | Yes |
Then I should not see "Subscribe to this forum"
Scenario: Allow guest access with password
- Given I navigate to "Enrolment methods" node in "Course administration > Users"
+ Given I navigate to "Users > Enrolment methods" in current page administration
And I click on "Edit" "link" in the "Guest access" "table_row"
And I set the following fields to these values:
| Allow guest access | Yes |
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
+ And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
- And I navigate to "Publish as LTI tool" node in "Site administration > Plugins > Enrolments"
+ And I navigate to "Plugins > Enrolments > Publish as LTI tool" in site administration
And I set the following fields to these values:
| Email display | Allow everyone to see my email address |
| City/town | Perth |
Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
And I select "Publish as LTI tool" from the "Add method" singleselect
When I expand all fieldsets
Then the field "Email display" matches value "Allow everyone to see my email address"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
+ And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
And I log out
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Submit your online text |
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
And I select "Publish as LTI tool" from the "Add method" singleselect
And I set the following fields to these values:
| Custom instance name | Assignment - LTI |
| Tool to be published | Test assignment name |
And I press "Add method"
- And I navigate to "Published as LTI tools" node in "Course administration"
And I should see "Assignment - LTI" in the ".generaltable" "css_element"
When I click on "Disable" "link" in the "Assignment - LTI" "table_row"
Then ".dimmed_text" "css_element" should exist in the "Assignment - LTI" "table_row"
| student1 | C4C4 | student | 0 |
| student2 | C4C4 | student | 1 |
And I log in as "admin"
- And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
+ And I navigate to "Plugins > Enrolments > Manage enrol plugins" in site administration
And I click on "Enable" "link" in the "Course meta link" "table_row"
And I am on course index
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 3" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "No groups" in the "Student 1" "table_row"
And I should see "No groups" in the "Student 4" "table_row"
And I add "Course meta link" enrolment method with:
| Link course | C2C2 |
| Add to group | Groupcourse 2 |
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 3" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "Groupcourse 1" in the "Student 1" "table_row"
And I should see "Groupcourse 1" in the "Student 2" "table_row"
And I should see "Groupcourse 1" in the "Student 3" "table_row"
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
| Add to group | Create new group |
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 3" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "Course 1 course" in the "Student 1" "table_row"
And I should see "Course 1 course" in the "Student 2" "table_row"
And I should see "Course 1 course" in the "Student 3" "table_row"
And I should see "Course 1 course" in the "Student 4" "table_row"
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And the "Groups" select box should contain "Course 1 course (4)"
Scenario: Backup and restore of meta enrolment instance
And I press "Perform restore"
And I trigger cron
And I am on "Course 5 copy 1" course homepage
- And I navigate to "Enrolment methods" node in "Course administration > Users"
+ And I navigate to "Users > Enrolment methods" in current page administration
Then I should see "Course meta link (Course 1)"
And I should see "Course meta link (Course 2)"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 5 copy 1" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
And I should see "Groupcourse 1" in the "Student 1" "table_row"
And I should see "Groupcourse 1" in the "Student 2" "table_row"
And I should see "Groupcourse 1" in the "Student 3" "table_row"
| fullname | shortname | format |
| Course 1 | C1 | topics |
And I log in as "admin"
- And I navigate to "Define roles" node in "Site administration > Users > Permissions"
+ And I navigate to "Users > Permissions > Define roles" in site administration
And I click on "Add a new role" "button"
And I click on "Continue" "button"
And I set the following fields to these values:
| contextlevel50 | 1 |
| enrol/self:holdkey | 1 |
And I click on "Create this role" "button"
- And I navigate to "Courses" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Courses" in site administration
And I set the following fields to these values:
| Key holder | 1 |
And I press "Save changes"
*/
public function i_add_enrolment_method_with($enrolmethod, TableNode $table) {
// Navigate to enrolment method page.
- $parentnodes = get_string('courseadministration') . ' > ' . get_string('users', 'admin');
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('type_enrol_plural', 'plugin'), $parentnodes)
+ $parentnodes = get_string('users', 'admin');
+ $this->execute("behat_navigation::i_navigate_to_in_current_page_administration",
+ array($parentnodes .' > '. get_string('type_enrol_plural', 'plugin'))
);
// Select enrolment method.
public function i_enrol_user_as($userfullname, $rolename) {
// Navigate to enrolment page.
- $parentnodes = get_string('courseadministration') . ' > ' . get_string('users', 'admin');
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('enrolledusers', 'enrol'), $parentnodes)
+ $parentnodes = get_string('users', 'admin');
+ $this->execute("behat_navigation::i_navigate_to_in_current_page_administration",
+ array($parentnodes . ' > '. get_string('enrolledusers', 'enrol'))
);
$this->execute("behat_forms::press_button", get_string('enrolusers', 'enrol'));
Scenario: User can be enrolled without javascript
When I enrol "Studie One" user as "Student"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 001" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "Studie One"
@javascript
Scenario: User can be enrolled with javascript enrol element
When I enrol "Studie One" user as "Student"
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I navigate to "Users > Enrolled users" in current page administration
Then I should see "Studie One"
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I follow "Course 1"
- When I navigate to "Enrolled users" node in "Course administration > Users"
+ When I navigate to "Users > Enrolled users" in current page administration
Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
And "Manager 1" row "Roles" column of "participants" table should contain "Manager"
Scenario: Do not allow managers to view any roles but manager and check they are hidden
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- When I navigate to "Enrolled users" node in "Course administration > Users"
+ When I navigate to "Users > Enrolled users" in current page administration
Then "Learner 1" row "Roles" column of "participants" table should contain "Student"
And "Teacher 1" row "Roles" column of "participants" table should contain "Teacher"
And "Manager 1" row "Roles" column of "participants" table should not contain "Manager"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "File types" node in "Site administration>Server"
+ And I navigate to "Server > File types" in site administration
And I press "Add a new file type"
And I set the following fields to these values:
| Extension | mdlr |
When I log in as "admin"
And I am on "Course 1" course homepage
Then "Legacy course files" "link" should exist in current page administration
- And I navigate to "Legacy course files" node in "Course administration"
+ And I navigate to "Legacy course files" in current page administration
And I press "Edit legacy course files"
And "Add..." "link" should be visible
And "Create folder" "link" should be visible
When I log in as "admin"
And I am on "Course 1" course homepage
Then "Legacy course files" "link" should exist in current page administration
- And I navigate to "Legacy course files" node in "Course administration"
+ And I navigate to "Legacy course files" in current page administration
And I press "Edit legacy course files"
And "Add..." "link" should not be visible
And "Create folder" "link" should not be visible
Scenario: Hide minimum grade
When I click on "Edit assign Assignment1" "link"
And I should see "Minimum grade"
- Then I navigate to "General settings" node in "Site administration > Grades"
+ Then I navigate to "Grades > General settings" in site administration
And I set the field "Show minimum grade" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage
@javascript
Scenario: Hide calculation icons
And "Edit calculation for Course total" "link" should exist
- When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
+ When I navigate to "Grades > Report settings > Grader report" in site administration
And I set the field "Show calculations" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage
@javascript
Scenario: Disable category overriding
And "tr .course input[type='text']" "css_element" should exist
- Then I navigate to "Grade category settings" node in "Site administration > Grades"
+ Then I navigate to "Grades > Grade category settings" in site administration
And I set the field "Allow category grades to be manually overridden" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage
And I press "Save changes"
And I turn editing mode off
# Suspend a user
- And I navigate to "Enrolled users" node in "Course administration > Users"
+ And I am on "Course 1" course homepage
+ And I navigate to "Users > Enrolled users" in current page administration
And I click on "Edit enrolment" "link" in the "Student 2" "table_row"
And I set the following fields to these values:
| Status | Suspended |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
And I press "Save changes"
And I set "=[[a4]]/2" calculation for grade item "calculated" with idnumbers:
| Sub category 1 | sub1 |
- And I navigate to "Overview report" node in "Site administration > Grades > Report settings"
+ And I navigate to "Grades > Report settings > Overview report" in site administration
And I set the field "s__grade_report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items"
- And I navigate to "User report" node in "Site administration > Grades > Report settings"
+ And I navigate to "Grades > Report settings > User report" in site administration
And I set the field "s__grade_report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items"
And I press "Save changes"
When I log out
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
| id_gradeletter11 | |
| id_gradeboundary11 | |
And I press "Save changes"
- When I navigate to "Live logs" node in "Site administration > Reports"
+ When I navigate to "Reports > Live logs" in site administration
Then I should see "Grade letter created"
And I should see "Grade letter updated"
And I should see "Grade letter deleted"
| activity | course | idnumber | name | intro |
| assign | C1 | assign1| Test Assignment 1 | Test Assignment 1 |
And I log in as "admin"
- And I navigate to "General settings" node in "Site administration > Grades"
+ And I navigate to "Grades > General settings" in site administration
And I set the following fields to these values:
| Grade point maximum | 900 |
| Grade point default | 800 |
And I set the field "grade[modgrade_type]" to "point"
And I set the field "grade[modgrade_point]" to "600"
And I press "Save and display"
- And I navigate to "General settings" node in "Site administration > Grades"
+ And I navigate to "Grades > General settings" in site administration
And I set the following fields to these values:
| Grade point maximum | 100 |
And I press "Save changes"
And I set the following administration settings values:
| grade_report_showranges | 1 |
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Letterscale |
And I set the following administration settings values:
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
| grade_report_user_showcontributiontocoursetotal | 1 |
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Letterscale |
Scenario: I edit scales and then view the logs.
Given I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
# Add a scale
And I press "Add a new scale"
And I set the following fields to these values:
And I set the following fields to these values:
| id_scale | ONE,TWO,THREE |
And I press "Save changes"
- When I navigate to "Live logs" node in "Site administration > Reports"
+ When I navigate to "Reports > Live logs" in site administration
Then I should see "Scale created"
And I should see "Scale updated"
And I should see "Scale deleted"
And I set the following administration settings values:
| grade_report_showranges | 1 |
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Singleitem |
Scenario: Filter the overview in various different ways
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
And I follow "Overview"
# Grouping All and Group All filter
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I am on "Course 1" course homepage
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should not exist in the "#members" "css_element"
Scenario: Do not allow managers to view any roles and check they are hidden
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Groups" node in "Course administration > Users"
+ And I navigate to "Users > Groups" in current page administration
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should exist in the "#members" "css_element"
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Atto toolbar settings" node in "Site administration > Plugins > Text editors > Atto HTML editor"
+ And I navigate to "Plugins > Text editors > Atto HTML editor > Atto toolbar settings" in site administration
And I set the field "Autosave frequency" to "3"
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" node in "Course administration"
+ And I navigate to "Edit 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
Scenario: Restore a draft
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit 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" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
# Wait for the autorestore
And I wait "2" seconds
Then I should see "This is my draft"
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" node in "Course administration"
+ And I navigate to "Edit 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 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" node in "Course administration"
+ And I navigate to "Edit 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"
And I log out
When I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit 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" node in "Course administration"
+ And I navigate to "Edit 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" node in "Course administration"
+ And I navigate to "Edit 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" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
Then I should not see "This is my draft"
And I should see "Modified text"
Scenario: Being able to change the grade type, scale and maximum grade when there are no grades
Given I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
@javascript
Scenario: Attempting to change the scale when grades already exist in rating activity
Given I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
@javascript
Scenario: Attempting to change the scale when grades already exist in non-rating activity
Given I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | ABCDEF |
And I log out
And I log in as "teacher"
And I am on "Course 1" course homepage
- And I navigate to "Activity completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Activity completion" in current page administration
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
And ".initialbarall.page-item.active" "css_element" should exist in the ".initialbar.lastinitial" "css_element"
And ".page-item.active.B" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
And I should see "Bstudent Astudent"
And I should not see "Cstudent Cstudent"
And I am on "Course 1" course homepage
- And I navigate to "Activity completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Activity completion" in current page administration
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.firstinitial" "css_element"
And ".initialbarall.page-item.active" "css_element" should not exist in the ".initialbar.lastinitial" "css_element"
And ".page-item.active.B" "css_element" should exist in the ".initialbar.firstinitial" "css_element"
$this->execute('behat_grade::i_navigate_to_in_the_course_gradebook', $gradepath);
}
+ /**
+ * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one)
+ *
+ * @Given /^I navigate to "(?P<nodetext_string>(?:[^"]|\\")*)" node in "(?P<parentnodes_string>(?:[^"]|\\")*)"$/
+ *
+ * @throws ExpectationException
+ * @param string $nodetext navigation node to click.
+ * @param string $parentnodes comma seperated list of parent nodes.
+ * @return void
+ * @deprecated since Moodle 3.6 MDL-57281 - please do not use this definition step any more.
+ * @todo MDL-63004 This will be deleted in Moodle 4.0.
+ */
+ public function i_navigate_to_node_in($nodetext, $parentnodes) {
+ $alternative[] = 'I navigate to "PATH" in current page administration';
+ $alternative[] = 'I navigate to "PATH" in site administration';
+ $alternative[] = 'I navigate to "TAB1 > TAB2" in the course gradebook';
+ $alternative[] = 'I navigate to course participants';
+ $alternative[] = 'If some items are not available without Navigation block at all, one can use combination of:
+ I add the "Navigation" block if not present
+ I click on "LINK" "link" in the "Navigation" "block"';
+
+ $this->deprecated_message($alternative);
+
+ $parentnodes = array_map('trim', explode('>', $parentnodes));
+ $this->execute('behat_navigation::select_node_in_navigation', array($nodetext, $parentnodes));
+ }
+
/**
* Throws an exception if $CFG->behat_usedeprecated is not allowed.
*
$node->click();
}
- /**
- * Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one)
- *
- * @Given /^I navigate to "(?P<nodetext_string>(?:[^"]|\\")*)" node in "(?P<parentnodes_string>(?:[^"]|\\")*)"$/
- *
- * @todo MDL-57281 deprecate in Moodle 3.1
- *
- * @throws ExpectationException
- * @param string $nodetext navigation node to click.
- * @param string $parentnodes comma seperated list of parent nodes.
- * @return void
- */
- public function i_navigate_to_node_in($nodetext, $parentnodes) {
- // This step needs to be deprecated and replaced with one of:
- // - I navigate to "PATH" in current page administration
- // - I navigate to "PATH" in site administration
- // - I navigate to course participants
- // - I navigate to "PATH" in the course gradebook
- // - I click on "LINK" "link" in the "Navigation" "block" .
- $parentnodes = array_map('trim', explode('>', $parentnodes));
- $this->select_node_in_navigation($nodetext, $parentnodes);
- }
-
/**
* Finds a node in the Navigation or Administration tree
*
throw new ExpectationException('Navigation node "' . $nodetext . '" not found under "' .
implode($parentnodes, ' > ') . '"', $this->getSession());
}
-
$nodetoclick->click();
}
*/
public function i_set_the_following_system_permissions_of_role($rolename, $table) {
- $parentnodes = get_string('administrationsite') . ' > ' .
- get_string('users', 'admin') . ' > ' .
+ $parentnodes = get_string('users', 'admin') . ' > ' .
get_string('permissions', 'role');
// Go to home page.
$this->execute("behat_general::i_am_on_homepage");
// Navigate to course management page via navigation block.
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('defineroles', 'role'), $parentnodes)
+ $this->execute("behat_navigation::i_navigate_to_in_site_administration",
+ array($parentnodes . ' > ' . get_string('defineroles', 'role'))
);
$this->execute("behat_general::click_link", "Edit " . $this->escape($rolename) . " role");
* @return void Executes other steps
*/
public function i_define_the_allowed_role_assignments_for_a_role_as($rolename, $table) {
- $parentnodes = get_string('administrationsite') . ' > ' .
- get_string('users', 'admin') . ' > ' .
+ $parentnodes = get_string('users', 'admin') . ' > ' .
get_string('permissions', 'role');
// Go to home page.
$this->execute("behat_general::i_am_on_homepage");
- // Navigate to course management page via navigation block.
- $this->execute("behat_navigation::i_navigate_to_node_in",
- array(get_string('defineroles', 'role'), $parentnodes)
+ // Navigate to Define roles page via site administration menu.
+ $this->execute("behat_navigation::i_navigate_to_in_site_administration",
+ $parentnodes .' > '. get_string('defineroles', 'role')
);
$this->execute("behat_general::click_link", "Allow role assignments");
Scenario: Admin sees default timezone Australia/Perth
When I log in as "admin"
- And I navigate to "Location settings" node in "Site administration > Location"
+ And I navigate to "Location > Location settings" in site administration
Then I should see "Default: Australia/Perth"
And the field "Default timezone" matches value "Australia/Perth"
* Following behat steps have been removed from core:
- I set the field "<field_string>" to multiline
- I follow "<link_string>"" in the open menu
+* The following behat steps have been deprecated, please do not use these step definitions any more:
+ - behat_navigation.php: i_navigate_to_node_in()
+ - theme/boost/tests/behat/behat_theme_boost_behat_navigation.php: i_navigate_to_node_in()
+ Use one of the following steps instead:
+ - I navigate to "PATH > ITEM" in current page administration
+ - I navigate to "PATH > ITEM" in site administration
+ - I navigate to course participants
+ - I navigate to "TAB1 > TAB2" in the course gradebook
+
+ If some items are not available without Navigation block at all, one can use combination of:
+ - I add the "Navigation" block if not present
+ - I click on "LINK" "link" in the "Navigation" "block"
* Removed the lib/password_compat/lib/password.php file.
* The eventslib.php file has been deleted and its functions have been moved to deprecatedlib.php. The affected functions are:
- events_get_cached()
Background:
Given I log in as "admin"
And I am on site homepage
- And I navigate to "Turn editing on" node in "Front page settings"
+ And I navigate to "Turn editing on" in current page administration
@javascript
Scenario: Add a video in a URL resource. Make sure media filters work
Background:
Given I log in as "admin"
- And I navigate to "Manage message outputs" node in "Site administration > Plugins > Message outputs"
+ And I navigate to "Plugins > Message outputs > Manage message outputs" in site administration
And I click on "//table[contains(@class, 'admintable')]/tbody/tr/td[contains(text(), 'Email')]/following-sibling::td[1]/a" "xpath_element"
Scenario: Alter my message preferences
Given the following "users" exist:
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
- And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
+ And I navigate to "Users > Accounts > Browse list of users" in site administration
And I click on "User 1" "link"
And I click on "Preferences" "link" in the ".profile_tree" "css_element"
And I click on "Message preferences" "link" in the "region-main" "region"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
- And I navigate to "Annotate PDF" node in "Site administration > Plugins > Activity modules > Assignment > Feedback plugins"
+ And I am on site homepage
+ And I navigate to "Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF" in site administration
And I upload "pix/help.png" file to "" filemanager
And I upload "pix/docs.png" file to "" filemanager
When I press "Save changes"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I should see "Submitted for grading"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
| duedate[minute] | 00 |
And I press "Save"
And I should see "Sam1 Student1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
| duedate[minute] | 00 |
And I press "Save"
And I should see "Group 1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
And I press "Continue"
And I should see "Sam1 Student1"
And I am on "Course 1" course homepage
- When I navigate to "Reset" node in "Course administration"
+ When I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all submissions | 1 |
And I press "Reset course"
And the following config values are set as admin:
| enableoutcomes | 1 |
And I log in as "admin"
- And I navigate to "Scales" node in "Site administration > Grades"
+ And I navigate to "Grades > Scales" in site administration
And I press "Add a new scale"
And I set the following fields to these values:
| Name | Test Scale |
| Scale | Disappointing, Excellent, Good, Very good, Excellent |
And I press "Save changes"
- And I navigate to "Outcomes" node in "Site administration > Grades"
+ And I navigate to "Grades > Outcomes" in site administration
And I press "Add a new outcome"
And I set the following fields to these values:
| Full name | Outcome Test |
| Scale | Test Scale |
And I press "Save changes"
And I am on "Course 1" course homepage
- And I navigate to "Outcomes" node in "Course administration"
+ And I navigate to "Outcomes" in current page administration
And I set the field "Available standard outcomes" to "Outcome Test"
And I click on "#add" "css_element"
And I log out
| enableoutcomes | 1 |
When I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Outcomes" node in "Course administration"
+ And I navigate to "Outcomes" in current page administration
And I follow "Edit outcomes"
And I press "Add a new outcome"
And I follow "Add a new scale"
| Scale | Noob, Nub, 1337, HaXor |
And I press "Save changes"
And I am on "Course 1" course homepage
- And I navigate to "Outcomes" node in "Course administration"
+ And I navigate to "Outcomes" in current page administration
And I follow "Edit outcomes"
And I press "Add a new outcome"
And I set the following fields to these values:
| activity | name | intro | course | idnumber | schedule |
| chat | Test chat name | Test chat description | C1 | chat1 | 0 |
And I log in as "teacher1"
- And I am on "Course 1" course homepage
- When I navigate to "Calendar" node in "Site pages"
+ And I am on "Course 1" course homepage with editing mode on
+ # TODO MDL-57120 site "Calendar" link not accessible without navigation block.
+ And I add the "Navigation" block if not present
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ Given I click on "Calendar" "link" in the "Navigation" "block"
Then I should not see "Test chat name"
Scenario: Create a chat activity and publish the start date to the calendar
| activity | name | intro | course | idnumber | schedule |
| chat | Test chat name | Test chat description | C1 | chat1 | 1 |
And I log in as "teacher1"
- And I am on "Course 1" course homepage
- When I navigate to "Calendar" node in "Site pages"
+ And I am on "Course 1" course homepage with editing mode on
+ # TODO MDL-57120 site "Calendar" link not accessible without navigation block.
+ And I add the "Navigation" block if not present
+ And I click on "Site pages" "list_item" in the "Navigation" "block"
+ Given I click on "Calendar" "link" in the "Navigation" "block"
Then I should see "Test chat name"
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" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| startdate[day] | 1 |
| startdate[month] | January |
| chattime[hour] | 12 |
| chattime[minute] | 00 |
And I press "Save and display"
- When I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ When I navigate to "Reset" in current page administration
And I set the following fields to these values:
| reset_start_date[enabled] | 1 |
| reset_start_date[day] | 1 |
public function i_add_an_entry_to_database_with($activityname, TableNode $entrydata) {
$this->execute("behat_general::click_link", $this->escape($activityname));
- $this->execute("behat_navigation::i_navigate_to_node_in", array(get_string('add', 'mod_data'),
- get_string('pluginadministration', 'mod_data')));
+ $this->execute("behat_navigation::i_navigate_to_in_current_page_administration",
+ get_string('add', 'mod_data'));
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $entrydata);
}
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add the "Latest announcements" block
- And I navigate to "Edit settings" node in "Course administration"
+ And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
And I set the field "id_newsitems" to "1"
And I press "Save and display"
And I follow "Test lesson name"
And I navigate to "Reports > Overview" in current page administration
And I should see "Sam1 Student1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all lesson attempts | 1 |
And I press "Reset course"
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Sam1 Student1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
| Re-takes allowed | 1 |
And I press "Save"
And I should see "Group 1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And I follow "Manage preconfigured tools"
And I follow "Add preconfigured tool"
And I set the following fields to these values:
Scenario: Backup and restore course with preconfigured site LTI tool on the same site
When I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And I follow "Manage preconfigured tools"
And I follow "Add preconfigured tool"
And I set the following fields to these values:
| Tool URL | https://www.moodle.org |
| lti_coursevisible | 1 |
And I press "Save changes"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And "This tool has not yet been used" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element"
And I am on site homepage
And I follow "Course 1"
And I open "My LTI module" actions menu
And I choose "Edit settings" in the open action menu
Then the field "Preconfigured tool" matches value "My site tool"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And "This tool is being used 2 times" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element"
@javascript @_switch_window
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
# Create tool type that supports content-item.
And I follow "configure a tool manually"
And I set the field "Tool name" to "Teaching Tool 1"
@javascript
Scenario: Changing preconfigured tool selection
Given I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And I follow "configure a tool manually"
And I set the field "Tool name" to "Teaching Tool 2"
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
Background:
Given I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
Scenario: Verifying ContentItemSelectionRequest selection support in external tool registration
When I follow "Manage external tool registrations"
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin"
- And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+ And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
@javascript
Scenario: Add a tool type from a cartridge URL
@javascript @_file_upload
Scenario: Restore a Moodle 2.8 quiz backup
When I am on "Course 1" course homepage
- And I navigate to "Restore" node in "Course administration"
+ And I navigate to "Restore" in current page administration
And I press "Manage backup files"
And I upload "mod/quiz/tests/fixtures/moodle_28_quiz.mbz" file to "Files" filemanager
And I press "Save changes"
$this->execute('behat_general::click_link', $quizname);
- $this->execute("behat_navigation::i_navigate_to_node_in", array($editquiz, $quizadmin));
+ $this->execute("behat_navigation::i_navigate_to_in_current_page_administration", $editquiz);
$this->execute("behat_general::i_click_on", array($menuxpath, "xpath_element"));
$this->execute("behat_general::i_click_on", array($itemxpath, "xpath_element"));
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Activity completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Activity completion" in current page administration
And "Completed" "icon" should exist in the "Student 1" "table_row"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Activity completion" node in "Course administration > Reports"
+ And I navigate to "Reports > Activity completion" in current page administration
And "Completed" "icon" should exist in the "Student 1" "table_row"
# Create a couple of sub categories.
And I am on "Course 1" course homepage
- And I navigate to "Categories" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Categories" in current page administration
Then I should see "Add category"
Then I set the field "Parent category" to "Default for C1"
And I set the field "Name" to "Subcat 1"
Then I press "id_submitbutton"
And I should see "Subcat 2"
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I follow "Question bank"
Then I should see "Question bank"
And I should see "Select a category"
| Test questions | essay | question 2 name | teacher1 | Question 2 text |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
And I click on "Edit" "link" in the "question 1 name" "table_row"
And I set the following fields to these values:
| Tags | foo |
Scenario: Available tags are shown in the autocomplete tag field
Given I log in as "teacher1"
And I am on "Course 1" course homepage
- When I navigate to "Questions" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Questions" in current page administration
And I click on "Edit" "link" in the "question 1 name" "table_row"
And I set the following fields to these values:
| Tags | foo |
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Reset" node in "Course administration"
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all quiz attempts | 1 |
And I press "Reset course"
| Attempts allowed | 2 |
And I press "Save"
And I should see "Sam1 Student1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all user overrides | 1 |
And I press "Reset course"
| Attempts allowed | 2 |
And I press "Save"
And I should see "Group 1"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
And I set the following fields to these values:
| Delete all group overrides | 1 |
And I press "Reset course"
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I press "Save changes"
And I should see "empty.txt"
- And I navigate to "Reset" node in "Course administration"
+ And I am on "Course 1" course homepage
+ And I navigate to "Reset" in current page administration
Scenario: Reset page, tags and files
And I set the following fields to these values:
Scenario: Reset Dashboard for all users
Given I log in as "admin"
- And I navigate to "Default Dashboard page" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Default Dashboard page" in site administration
And I press "Blocks editing on"
And I add the "Latest announcements" block
And I open the "Online users" blocks action menu
And I log out
And I log in as "admin"
- And I navigate to "Default Dashboard page" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Default Dashboard page" in site administration
When I press "Reset Dashboard for all users"
And I should see "All Dashboard pages have been reset to default."
And I log out
Scenario: Reset profile for all users
Given I log in as "admin"
- And I navigate to "Default profile page" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Default profile page" in site administration
And I press "Blocks editing on"
And I add the "Latest announcements" block
And I log out
And I log out
And I log in as "admin"
- And I navigate to "Default profile page" node in "Site administration > Appearance"
+ And I navigate to "Appearance > Default profile page" in site administration
When I press "Reset profile for all users"
And I should see "All profile pages have been reset to default."
And I log out
@javascript @_file_upload
Scenario: import some GIFT questions
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_gift" to "1"
And I upload "question/format/gift/tests/fixtures/questions.gift.txt" file to "Import" filemanager
And I press "id_submitbutton"
Then I should see "colours"
# Now export again.
- And I navigate to "Export" node in "Course administration > Question bank"
+ And I follow "Export"
And I set the field "id_format_gift" to "1"
And I press "Export questions to file"
And following "click here" should download between "1550" and "1650" bytes
@javascript @_file_upload
Scenario: import some WebCT questions
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_webct" to "1"
And I upload "question/format/webct/tests/fixtures/sample_webct.txt" file to "Import" filemanager
And I press "id_submitbutton"
@javascript @_file_upload
Scenario: import a WebCT calculated question
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_webct" to "1"
And I upload "question/format/webct/tests/fixtures/sample_calculated_webct.txt" file to "Import" filemanager
And I press "id_submitbutton"
@javascript @_file_upload
Scenario: import some true/false questions from Moodle XML format
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager
And I press "id_submitbutton"
Then I should see "Moodle acronym (True)"
# Now export again.
- And I navigate to "Export" node in "Course administration > Question bank"
+ And I follow "Export"
And I set the field "id_format_xml" to "1"
And I set the field "Export category" to "TrueFalse"
And I press "Export questions to file"
@javascript @_file_upload
Scenario: import some multiple choice questions from Moodle XML format
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager
And I press "id_submitbutton"
@javascript @_file_upload
Scenario: import some multi-answer questions from Moodle XML format
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager
And I press "id_submitbutton"
@javascript @_file_upload
Scenario: import some questions with legacy-style images from Moodle XML format
- When I navigate to "Import" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Import" in current page administration
And I set the field "id_format_xml" to "1"
And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager
And I press "id_submitbutton"
| Test questions | essay | Test question to be copied | Write about whatever you want |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
@javascript
Scenario: Duplicating a previously created question
| Test questions | essay | Test question to be deleted | Write about whatever you want |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
@javascript
Scenario: A question not used anywhere can really be deleted
And I add a "True/False" question to the "Test quiz" quiz with:
| Question name | Test used question to be deleted |
| Question text | Write about whatever you want |
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I am on "Course 1" course homepage
+ And I navigate to "Question bank > Questions" in current page administration
When I click on "Delete" "link" in the "Test used question to be deleted" "table_row"
And I press "Delete"
Then I should not see "Test used question to be deleted"
| Test questions | essay | Test question to be edited | Write about whatever you want |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
@javascript
Scenario: Edit a previously created question
Scenario: The tags autocomplete should include standard tags
When I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
And I press "Create a new question ..."
And I set the field "item_qtype_truefalse" to "1"
And I press "Add"
| Test questions | essay | question 2 name | teacher1 | Question 2 text |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
And I click on "Edit" "link" in the "question 1 name" "table_row"
And I set the following fields to these values:
| Tags | foo |
Scenario: A question category can be moved to another context
When I follow "Test quiz"
- And I navigate to "Categories" node in "Quiz administration > Question bank"
+ And I navigate to "Quiz administration > Question bank > Categories" in current page administration
And I set the following fields to these values:
| Name | Test category |
| Parent category | Top for Test quiz |
Scenario: A question category can be moved to top level
When I follow "Test quiz"
- And I navigate to "Categories" node in "Quiz administration > Question bank"
+ And I navigate to "Quiz administration > Question bank > Categories" in current page administration
And I set the following fields to these values:
| Name | Test category |
| Parent category | Default for Test quiz |
| Test questions | numerical | Test question to be previewed |
And I log in as "teacher1"
And I am on "Course 1" course homepage
- And I navigate to "Questions" node in "Course administration > Question bank"
+ And I navigate to "Question bank > Questions" in current page administration
When I click on "Preview" "link" in the "Test question to be previewed" "table_row"
And I switch to "questionpreview" window
And I am on "Course 1" course homepage
Scenario: A new question category can be created
- When I navigate to "Categories" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Categories" in current page administration
And I set the following fields to these values:
| Name | New Category 1 |
| Parent category | Top |
And I should see "Created as a test" in the "New Category 1" "list_item"
Scenario: A question category can be edited
- When I navigate to "Categories" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Categories" in current page administration
And I click on "Edit" "link" in the "Subcategory" "list_item"
And the field "parent" matches value " Default for C1"
And I set the following fields to these values:
And I should see "I was edited" in the "New name" "list_item"
Scenario: An empty question category can be deleted
- When I navigate to "Categories" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Categories" in current page administration
And I click on "Delete" "link" in the "Subcategory" "list_item"
Then I should not see "Subcategory"
Scenario: An non-empty question category can be deleted if you move the contents elsewhere
- When I navigate to "Categories" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Categories" in current page administration
And I click on "Delete" "link" in the "Used category" "list_item"
And I should see "The category 'Used category' contains 1 questions"
And I press "Save in category"
@javascript
Scenario: Move a question between categories via the question page
- When I navigate to "Questions" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Questions" in current page administration
And I set the field "Select a category" to "Used category"
And I click on "Test question to be moved" "checkbox" in the "Test question to be moved" "table_row"
And I set the field "Question category" to "Subcategory"
@javascript
Scenario: Move a question between categories via the question settings page
- When I navigate to "Questions" node in "Course administration > Question bank"
+ When I navigate to "Question bank > Questions" in current page administration
And I set the field "Select a category" to "Used category"
And I click on "Edit" "link" in the "Test question to be moved" "table_row"
And I click on "Use this category" "checkbox"