Commit 02fda279 authored by victor's avatar victor 🙇
Browse files

MDL-57281 behat: deprecated step definition I navigate to node in

Definition step deprecated and affected tests modified.
parent a9428fab
......@@ -10,7 +10,7 @@ Feature: Enable multiple accounts to have the same email address
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 |
......@@ -35,7 +35,7 @@ Feature: Enable multiple accounts to have the same email address
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 |
......
......@@ -20,7 +20,7 @@ Feature: Manage availability conditions
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"
......@@ -34,7 +34,7 @@ Feature: Manage availability conditions
| 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"
......
......@@ -286,7 +286,7 @@ Feature: Set up contextual data for tests
| 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 |
......
......@@ -34,7 +34,7 @@ Feature: Verify that all form fields values can be get and set
| 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"
......@@ -131,12 +131,12 @@ Feature: Verify that all form fields values can be get and set
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
......
......@@ -7,7 +7,7 @@ Feature: List the system steps definitions
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
......
......@@ -6,7 +6,7 @@ Feature: Add customised file types
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:
......@@ -24,7 +24,7 @@ Feature: Add customised file types
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 |
......@@ -37,7 +37,7 @@ Feature: Add customised file types
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 |
......@@ -51,7 +51,7 @@ Feature: Add customised file types
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"
......@@ -66,7 +66,7 @@ Feature: Add customised file types
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"
......@@ -74,7 +74,7 @@ Feature: Add customised file types
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 |
......@@ -86,7 +86,7 @@ Feature: Add customised file types
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"
......@@ -95,7 +95,7 @@ Feature: Add customised file types
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 |
......@@ -110,7 +110,7 @@ Feature: Add customised file types
| 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 |
......
......@@ -13,14 +13,14 @@ Feature: View the httpsreplace report
@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"
......
......@@ -11,29 +11,29 @@ Feature: Manage language packs
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"
......@@ -42,17 +42,17 @@ Feature: Manage language packs
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
......@@ -6,7 +6,7 @@ Feature: Enable/disable managment of the event monitor
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"
......
......@@ -15,10 +15,10 @@ Feature: tool_monitor_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 |
......@@ -29,7 +29,7 @@ Feature: tool_monitor_rule
| 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 |
......@@ -45,7 +45,7 @@ Feature: tool_monitor_rule
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 |
......@@ -65,7 +65,7 @@ Feature: tool_monitor_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"
......@@ -75,7 +75,7 @@ Feature: tool_monitor_rule
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 |
......@@ -94,7 +94,7 @@ Feature: tool_monitor_rule
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"
......@@ -106,7 +106,7 @@ Feature: tool_monitor_rule
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 |
......@@ -125,7 +125,7 @@ Feature: tool_monitor_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"
......@@ -134,7 +134,7 @@ Feature: tool_monitor_rule
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 |
......@@ -153,7 +153,7 @@ Feature: tool_monitor_rule
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"
......
......@@ -20,10 +20,10 @@ Feature: tool_monitor_subscriptions
| 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 |
......@@ -34,7 +34,7 @@ Feature: tool_monitor_subscriptions
| 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 |
......@@ -45,7 +45,7 @@ Feature: tool_monitor_subscriptions
| 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"
......
......@@ -364,7 +364,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
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"
......@@ -419,7 +419,7 @@ Feature: User must accept policy managed by this plugin when logging in and sign
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"
......
......@@ -57,7 +57,7 @@ Feature: Backup user data
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
......
......@@ -48,7 +48,7 @@ Feature: Basic recycle bin functionality
| 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"
......@@ -77,7 +77,7 @@ Feature: Basic recycle bin functionality
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"
......@@ -92,7 +92,7 @@ Feature: Basic recycle bin functionality
| 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"
......@@ -115,7 +115,7 @@ Feature: Basic recycle bin functionality
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"
......
......@@ -7,7 +7,7 @@ Feature: Clear scheduled task fail delay
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"
......
......@@ -6,7 +6,7 @@ Feature: Manage scheduled tasks
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"
......
......@@ -6,7 +6,7 @@ Feature: Run tasks from web interface
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"
......@@ -21,7 +21,7 @@ Feature: Run tasks from web interface
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.
......@@ -31,5 +31,5 @@ Feature: Run tasks from web interface
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"
......@@ -9,7 +9,7 @@ Feature: An admin can create courses using a CSV file
| 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
......
......@@ -9,7 +9,7 @@ Feature: An admin can update courses using a CSV file
| 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
......
......@@ -14,7 +14,7 @@ Feature: Upload users
| 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"
......@@ -48,7 +48,7 @@ Feature: Upload users
| 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:
......@@ -67,19 +67,19 @@ Feature: Upload users
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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment