forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-83826 core_admin: Behat coverage for plugins overview for admins
- Loading branch information
1 parent
f4f1666
commit 8bd60b0
Showing
1 changed file
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
@core @core_admin | ||
Feature: An administrator has a plugins overview page | ||
In order to change plugin settings | ||
As an admin | ||
I can access a plugins overview page | ||
|
||
Background: | ||
Given I am logged in as "admin" | ||
And I navigate to "Plugins > Plugins overview" in site administration | ||
|
||
Scenario: An administrator can access list of activities when activity modules cog icon is pressed | ||
When I click on "Settings" "link" in the "Activity modules" "table_row" | ||
Then "Activities" "text" should exist | ||
And "Manage activities" "text" should exist in the ".breadcrumb" "css_element" | ||
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element" | ||
|
||
Scenario: An administrator can access plugin settings | ||
When I click on "Settings" "link" in the "Assignment" "table_row" | ||
Then "Assignment settings" "text" should exist | ||
And "Assignment settings" "text" should exist in the ".breadcrumb" "css_element" | ||
And "Assignment" "link" should exist in the ".breadcrumb" "css_element" | ||
And "Activity modules" "link" should exist in the ".breadcrumb" "css_element" | ||
|
||
Scenario: Plugins with dependencies cannot be uninstalled | ||
When I navigate to "Plugins > Plugins overview" in site administration | ||
Then "Uninstall" "link" should not exist in the "Database" "table_row" | ||
And "Required by: filter_data" "text" should exist in the "Database" "table_row" | ||
|
||
Scenario: Cancelling plugin uninstall does not uninstall the selected plugin | ||
When I click on "Uninstall" "link" in the "Assignment" "table_row" | ||
Then "Uninstalling Assignment" "text" should exist | ||
And "You are about to uninstall the plugin Assignment. This will completely delete everything in the database associated with this plugin, including its configuration, log records, user files managed by the plugin etc. There is no way back and Moodle itself does not create any recovery backup. Are you SURE you want to continue?" "text" should exist | ||
And I click on "Cancel" "button" | ||
And "Uninstall" "link" should exist in the "Assignment" "table_row" | ||
|
||
Scenario: An administrator can uninstall a plugin | ||
When I click on "Uninstall" "link" in the "Shibboleth" "table_row" | ||
|
||
# Delete confirmation. | ||
And I should see "Confirm" in the ".modal-header" "css_element" | ||
And I should see "You are about to uninstall the plugin Shibboleth." in the ".modal-body" "css_element" | ||
And I press "Continue" | ||
|
||
# Shibboleth auth plugin has been uninstalled. | ||
Then "Uninstalling auth_shibboleth" "text" should exist | ||
And "Success" "text" should exist | ||
And I press "Continue" | ||
|
||
# Current release information confirmation. | ||
# Since the plugin code still present in the codebase, it will be reinstalled. | ||
And I should see "Current release information" | ||
And I should see "Server checks" | ||
And I press "Continue" | ||
|
||
# Plugins check page. | ||
And I should see "Plugins check" | ||
And I should see "Plugins requiring attention" | ||
And the following should exist in the "generaltable" table: | ||
| -1- | -5- | | ||
| Shibboleth | To be installed | | ||
And I press "Upgrade Moodle database now" | ||
|
||
# Upgrading to new version confirmation. | ||
And I should see "Upgrading to new version" | ||
And I should see "auth_shibboleth" | ||
And I should see "upgrade_noncore()" | ||
And I should see "Success" | ||
And I press "Continue" | ||
|
||
# Plugin settings configuration page. | ||
And I should see "New settings - Shibboleth" | ||
And I press "Save changes" | ||
|
||
# Since the plugin was reinstalled automatically, Shibboleth is present on the plugins list again. | ||
And "Uninstall" "link" should exist in the "Shibboleth" "table_row" | ||
|
||
Scenario: An administrator can view plugins overview page | ||
When I navigate to "Plugins > Plugins overview" in site administration | ||
Then "Plugins overview" "text" should exist | ||
And "Check for available updates" "button" should exist | ||
And "All plugins" "link" should exist | ||
And "Additional plugins" "link" should exist | ||
And the following should exist in the "generaltable" table: | ||
| Plugin name | | ||
| Assignment | | ||
| BigBlueButton | | ||
| Book | | ||
| Choice | | ||
| Database | | ||
| Feedback | | ||
| Folder | | ||
| Forum | | ||
| Glossary | | ||
| H5P | | ||
| IMS content package | | ||
| Text and media area | | ||
| Lesson | | ||
| External tool | | ||
| Page | | ||
| Question bank | | ||
| Quiz | | ||
| File | | ||
| SCORM package | | ||
| Subsection | | ||
| URL | | ||
| Wiki | | ||
| Workshop | |