MDL-73848 administration: Add tests for breadcrumbs and nav highlights

This change includes addition of tests for verifying the secondary
and tertiary nav highlights.
It also includes the tests to verify the breadcrumbs for the pages.
This commit is contained in:
Sujith Haridasan
2022-03-25 17:44:58 +08:00
committed by Jun Pataleta
parent aa1c2e2382
commit 1bb972ae0a
15 changed files with 419 additions and 0 deletions
@@ -0,0 +1,32 @@
@core @core_admin @core_admin_roles @javascript
Feature: Verify the breadcrumbs in define roles site administration pages
Whenever I navigate to define roles page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify breadcrumbs in manage roles tab
Given I navigate to "Users > Permissions > Define roles" in site administration
When "Define roles" "text" should exist in the ".breadcrumb" "css_element"
Then "Permissions" "link" should exist in the ".breadcrumb" "css_element"
Scenario Outline: Verify breadcrumbs in allow role tabs
Given I navigate to "Users > Permissions > Define roles" in site administration
When I click on "<allowlink>" "link"
Then "Define roles" "text" should exist in the ".breadcrumb" "css_element"
And "Permissions" "link" should exist in the ".breadcrumb" "css_element"
Examples:
| allowlink |
| Allow role assignments |
| Allow role overrides |
| Allow role switches |
| Allow role to view |
Scenario: Verify breadcrumbs in new role page
Given I navigate to "Users > Permissions > Define roles" in site administration
And I click on "Add a new role" "button"
Then "Define roles" "text" should exist in the ".breadcrumb" "css_element"
And "Permissions" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,31 @@
@core @core_admin @javascript
Feature: Verify the breadcrumbs in external webservice site administration pages
Whenever I navigate to external webservice page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in external services page
Given I navigate to "Server > Web services > External services" in site administration
And "External services" "text" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
When I click on "Edit" "link"
Then "Edit external service" "text" should exist in the ".breadcrumb" "css_element"
And "External services" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Add" "link"
And I set the field "Name" to "function to test"
And "Add external service" "text" should exist in the ".breadcrumb" "css_element"
And "External services" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
And I press "Add service"
And "Functions" "text" should exist in the ".breadcrumb" "css_element"
And "External services" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
And I navigate to "Server > Web services > External services" in site administration
And I click on "Delete" "link"
And "External services" "text" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,25 @@
@core @core_admin @javascript
Feature: Verify the breadcrumbs in webservice tokens site administration pages
Whenever I navigate to manage tokens page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in manage tokens page as an admin
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | John | Doe | s1@example.com |
And I log in as "admin"
And I navigate to "Server > Web services > Manage tokens" in site administration
And I click on "Create token" "button"
And "Create token" "text" should exist in the ".breadcrumb" "css_element"
And "Manage tokens" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
And I set the field "User" to "John Doe"
And I press "Save changes"
When I click on "Delete" "link"
Then "Delete token" "text" should exist in the ".breadcrumb" "css_element"
And "Manage tokens" "link" should exist in the ".breadcrumb" "css_element"
And "Web services" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,37 @@
@core @tool @tool_analytics @javascript
Feature: Verify the breadcrumbs in analytics site administration pages
Whenever I navigate to analytics page in site administration to create, import, edit or restore models
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in analytics models page by visiting the create model, import model, restore model and edit page
Given I navigate to "Analytics > Analytics models" in site administration
And I click on "New model" "link"
When I click on "Create model" "link"
Then "Create model" "text" should exist in the ".breadcrumb" "css_element"
And "Analytics model" "link" should exist in the ".breadcrumb" "css_element"
And "Analytics" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
# Testing import model page
And I click on "New model" "link"
And I click on "Import model" "link"
And "Import model" "text" should exist in the ".breadcrumb" "css_element"
And "Analytics model" "link" should exist in the ".breadcrumb" "css_element"
And "Analytics" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
# Testing restore defaults
And I click on "New model" "link"
And I click on "Restore default models" "link"
And "Restore default models" "text" should exist in the ".breadcrumb" "css_element"
And "Analytics model" "link" should exist in the ".breadcrumb" "css_element"
And "Analytics" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Back" "link"
# Testing edit page
And I click on "Actions" "link"
And I click on "Edit" "link"
And "Edit \"Courses at risk of not starting\" model" "text" should exist in the ".breadcrumb" "css_element"
And "Analytics model" "link" should exist in the ".breadcrumb" "css_element"
And "Analytics" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,21 @@
@tool @tool_customlang @javascript
Feature: Verify the breadcrumbs in language customisation site administration pages
Whenever I navigate to language customisation page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in language customisation page by visiting open language pack for editing and import custom strings pages
Given I navigate to "Language > Language customisation" in site administration
And I set the field "lng" to "en"
When I click on "Open language pack for editing" "button"
And I wait until the page is ready
And "Language customisation" "text" should exist in the ".breadcrumb" "css_element"
And "Language" "link" should exist in the ".breadcrumb" "css_element"
And I press the "back" button in the browser
And I click on "Import custom strings" "button"
And I wait until the page is ready
And "Language customisation" "text" should exist in the ".breadcrumb" "css_element"
And "Language" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,29 @@
@core @tool @tool_dataprivacy @javascript
Feature: Verify the breadcrumbs in different privacy site administration pages
Whenever I navigate to data registry page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in data registry page as an admin
Given I navigate to "Users > Privacy and policies > Data registry" in site administration
And "Data registry" "text" should exist in the ".breadcrumb" "css_element"
And "Privacy and policies" "link" should exist in the ".breadcrumb" "css_element"
When I click on "Set defaults" "link"
Then "Set defaults" "text" should exist in the ".breadcrumb" "css_element"
And "Data registry" "link" should exist in the ".breadcrumb" "css_element"
And "Privacy and policies" "link" should exist in the ".breadcrumb" "css_element"
And I navigate to "Users > Privacy and policies > Data registry" in site administration
And I click on "Edit" "link"
And I choose "Categories" in the open action menu
And "Edit categories" "text" should exist in the ".breadcrumb" "css_element"
And "Data registry" "link" should exist in the ".breadcrumb" "css_element"
And "Privacy and policies" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Back" "link"
And I click on "Edit" "link"
And I choose "Purposes" in the open action menu
And "Edit purposes" "text" should exist in the ".breadcrumb" "css_element"
And "Data registry" "link" should exist in the ".breadcrumb" "css_element"
And "Privacy and policies" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,19 @@
@tool @tool_filetypes @javascript
Feature: Verify the breadcrumbs in server filetypes site administration pages
Whenever I navigate to file types page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
@tool @tool_filetypes
Scenario: Verify the breadcrumbs in file types page by visiting edit page and delete page of a file type as an admin
Given I navigate to "Server > File types" in site administration
And I click on "Edit 3gp" "link"
And "3gp" "text" should exist in the ".breadcrumb" "css_element"
And "File types" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
When I click on "Delete 3gp" "link"
Then "Delete a file type" "text" should exist in the ".breadcrumb" "css_element"
And "File types" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,29 @@
@tool @tool_monitor @javascript
Feature: Verify the breadcrumbs in different event monitor site administration pages
Whenever I navigate to event monitoring page in site administration
As an admin
The breadcrumbs should be visible
Whenever I land on pages to add a new rule, edit rule or delete rule
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in event monitoring page by visiting add a new rule, edit a rule and delete rule pages as an admin
Given I navigate to "Reports > Event monitoring rules" in site administration
And I click on "Enable" "link"
When I click on "Add a new rule" "link"
Then "Add a new rule" "text" should exist in the ".breadcrumb" "css_element"
And "Event monitoring rules" "link" should exist in the ".breadcrumb" "css_element"
And I set the field "Rule name" to "Testing1"
And I set the field "Area to monitor" to "Core"
And I set the field "Event" to "Allow role override"
And I press "Save changes"
And I click on "Edit rule" "link"
And "Edit rule" "text" should exist in the ".breadcrumb" "css_element"
And "Event monitoring rules" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Delete rule" "link"
And "Delete rule" "text" should exist in the ".breadcrumb" "css_element"
And "Event monitoring rules" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,32 @@
@tool @tool_usertours @javascript
Feature: Verify the breadcrumbs in user tours site administration pages
Whenever I navigate to user tours page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in user tours, expand to explore, next step, create and import pages as admin
Given I navigate to "Appearance > User tours" in site administration
And I click on "Block drawer" "link"
And "Block drawer" "text" should exist in the ".breadcrumb" "css_element"
And "User tours" "link" should exist in the ".breadcrumb" "css_element"
When I click on "Expand to explore" "link"
Then "Expand to explore" "text" should exist in the ".breadcrumb" "css_element"
And "Block drawer" "link" should exist in the ".breadcrumb" "css_element"
And "User tours" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "New step" "link"
And "New step" "text" should exist in the ".breadcrumb" "css_element"
And "Block drawer" "link" should exist in the ".breadcrumb" "css_element"
And "User tours" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I navigate to "Appearance > User tours" in site administration
And I click on "Create a new tour" "link"
And "Create a new tour" "text" should exist in the ".breadcrumb" "css_element"
And "User tours" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Import tour" "link"
And "Import tour" "text" should exist in the ".breadcrumb" "css_element"
And "User tours" "link" should exist in the ".breadcrumb" "css_element"
+27
View File
@@ -0,0 +1,27 @@
@core @core_cache @javascript
Feature: Verify the breadcrumbs in different cache site administration pages
Whenever I navigate to caching configuration page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in caching configuration, add assistance, edit mappings and edit sharings page as an admin
Given I navigate to "Plugins > Caching > Configuration" in site administration
And "Configuration" "text" should exist in the ".breadcrumb" "css_element"
And "Caching" "link" should exist in the ".breadcrumb" "css_element"
When I click on "Add instance" "link"
Then "Add cache store" "text" should exist in the ".breadcrumb" "css_element"
And "Configuration" "link" should exist in the ".breadcrumb" "css_element"
And "Caching" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Edit mappings" "link"
And "Edit definition mapping" "text" should exist in the ".breadcrumb" "css_element"
And "Configuration" "link" should exist in the ".breadcrumb" "css_element"
And "Caching" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Edit sharing" "link"
And "Edit definition sharing" "text" should exist in the ".breadcrumb" "css_element"
And "Configuration" "link" should exist in the ".breadcrumb" "css_element"
And "Caching" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,27 @@
@core @core_grades @javascript
Feature: Verify the breadcrumbs in grade outcomes site administration pages
Whenever I navigate to advanced features page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in grades outcomes by adding a new outcome, visiting editing page and visiting delete page as an admin
Given I navigate to "Advanced features" in site administration
And I click on "Enable outcomes" "checkbox"
And I press "Save changes"
And I navigate to "Grades > Outcomes" in site administration
And I click on "Add a new outcome" "button"
And "Add an outcome" "text" should exist in the ".breadcrumb" "css_element"
And "Outcomes" "link" should exist in the ".breadcrumb" "css_element"
And I set the field "Full name" to "Outcome test"
And I set the field "Short name" to "outcome_test"
And I press "Save changes"
When I click on "Edit" "link"
Then "Edit outcome" "text" should exist in the ".breadcrumb" "css_element"
And "Outcomes" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Delete" "link"
And "Delete outcome" "text" should exist in the ".breadcrumb" "css_element"
And "Outcomes" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,23 @@
@core_grades @javascript
Feature: Verify the breadcrumbs in grade scales site administration pages
Whenever I navigate to grade scales page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
@core_grades
Scenario: Verify the breadcrumbs in scales page as an admin
Given I navigate to "Grades > Scales" in site administration
And I click on "Add a new scale" "button"
And "Add a scale" "text" should exist in the ".breadcrumb" "css_element"
And "Scales" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
When I click on "Edit" "link"
Then "Edit scale" "text" should exist in the ".breadcrumb" "css_element"
And "Scales" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Delete" "link"
And "Delete scale" "text" should exist in the ".breadcrumb" "css_element"
And "Scales" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,40 @@
@mod @mod_lti @javascript
Feature: Verify the breadcrumbs in manage tools site administration pages
Whenever I navigate to manage tools page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in manage tools page as an admin
Given I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And "Manage tools" "text" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
When I click on "configure a tool manually" "link"
Then "External tool configuration" "text" should exist in the ".breadcrumb" "css_element"
And "Manage tools" "link" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I click on "Manage preconfigured tools" "link"
And "Manage preconfigured tools" "text" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Add preconfigured tool" "link"
And "External tool configuration" "text" should exist in the ".breadcrumb" "css_element"
And "Manage tools" "link" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And I click on "Manage external tool registrations" "link"
And "Manage external tool registrations" "text" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Configure a new external tool registration" "link"
And "Edit preconfigured tool" "text" should exist in the ".breadcrumb" "css_element"
And "Manage external tool registrations" "link" should exist in the ".breadcrumb" "css_element"
And "External tool" "link" should exist in the ".breadcrumb" "css_element"
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,19 @@
@core @core_payment @javascript
Feature: Verify the breadcrumbs in payment accounts site administration pages
Whenever I navigate to payment account page in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
Scenario: Verify the breadcrumbs in payment account page as an admin
Given I navigate to "Payments > Payment accounts" in site administration
And I click on "Create payment account" "button"
And "Create payment account" "text" should exist in the ".breadcrumb" "css_element"
And "Payment accounts" "link" should exist in the ".breadcrumb" "css_element"
And "Payments" "link" should exist in the ".breadcrumb" "css_element"
And I press "Cancel"
When I click on "Show archived" "link"
Then "Payment accounts" "text" should exist in the ".breadcrumb" "css_element"
And "Payments" "link" should exist in the ".breadcrumb" "css_element"
@@ -0,0 +1,28 @@
@core @core_user @javascript
Feature: Verify the breadcrumbs in users account and cohort site administration pages
Whenever I navigate to pages under users tab in site administration
As an admin
The breadcrumbs should be visible
Background:
Given I log in as "admin"
@core @core_user
Scenario: Verify the breadcrumbs in users tab as an admin
Given I navigate to "Users > Accounts > Add a new user" in site administration
And "Add a new user" "text" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
And I navigate to "Users > Accounts > Cohorts" in site administration
And "System cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
When I click on "All cohorts" "link"
Then "All cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Add new cohort" "link"
And "Add new cohort" "text" should exist in the ".breadcrumb" "css_element"
And "Cohorts" "link" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"
And I click on "Upload cohorts" "link"
And "Upload cohorts" "text" should exist in the ".breadcrumb" "css_element"
And "Cohorts" "link" should exist in the ".breadcrumb" "css_element"
And "Accounts" "link" should exist in the ".breadcrumb" "css_element"