__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@tool @tool_licensemanager
Feature: Delete custom licenses
In order to manage custom licenses
As an admin
I need to be able to delete custom licenses but not standard Moodle licenses
@javascript
Scenario: I can delete a custom license
Given I log in as "admin"
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
And I press "Save changes"
And I click on "Delete" "icon" in the "MIT" "table_row"
When I click on "Yes" "button" in the "Delete licence" "dialogue"
Then I should not see "MIT Licence" in the "manage-licenses" "table"
Scenario: I cannot delete a standard license
Given I log in as "admin"
And I navigate to "Licence > Licence manager" in site administration
Then I should see "Licence not specified" in the "unknown" "table_row"
And I should not see "Delete" in the "unknown" "table_row"
@javascript @_file_upload
Scenario: I cannot delete a custom license in use
Given I log in as "admin"
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | Test licence |
| fullname | Test licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
And I press "Save changes"
And I follow "Private files" in the user menu
And I upload "lib/tests/fixtures/gd-logo.png" file to "Files" filemanager
And I click on "gd-logo.png" "link"
And I set the field "Choose licence" to "Test licence"
And I press "Update"
And I press "Save changes"
And I am on site homepage
And I navigate to "Licence > Licence manager" in site administration
And I click on "Delete" "icon" in the "Test licence" "table_row"
When I click on "Yes" "button" in the "Delete licence" "dialogue"
Then I should see "Cannot delete a licence which is currently assigned to one or more files"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| delete_license.feature | File | 2.36 KB | 0777 |
|
| edit_license.feature | File | 3.37 KB | 0777 |
|
| license_manager.feature | File | 3.38 KB | 0777 |
|