Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_licensemanager
2
Feature: Delete custom licenses
3
    In order to manage custom licenses
4
    As an admin
5
    I need to be able to delete custom licenses but not standard Moodle licenses
6
 
7
  @javascript
8
  Scenario: I can delete a custom license
9
    Given I log in as "admin"
10
    And I navigate to "Licence > Licence manager" in site administration
11
    And I click on "Create licence" "link"
12
    And I set the following fields to these values:
13
      | shortname       | MIT                                 |
14
      | fullname        | MIT Licence                         |
15
      | source          | https://opensource.org/licenses/MIT |
16
      | Licence version | ##1 March 2019##                    |
17
    And I press "Save changes"
18
    And I click on "Delete" "icon" in the "MIT" "table_row"
19
    When I click on "Yes" "button" in the "Delete licence" "dialogue"
20
    Then I should not see "MIT Licence" in the "manage-licenses" "table"
21
 
22
  Scenario: I cannot delete a standard license
23
    Given I log in as "admin"
24
    And I navigate to "Licence > Licence manager" in site administration
25
    Then I should see "Licence not specified" in the "unknown" "table_row"
26
    And I should not see "Delete" in the "unknown" "table_row"
27
 
28
  @javascript @_file_upload
29
  Scenario: I cannot delete a custom license in use
30
    Given I log in as "admin"
31
    And I navigate to "Licence > Licence manager" in site administration
32
    And I click on "Create licence" "link"
33
    And I set the following fields to these values:
34
      | shortname       | Test licence                        |
35
      | fullname        | Test licence                        |
36
      | source          | https://opensource.org/licenses/MIT |
37
      | Licence version | ##1 March 2019##                    |
38
    And I press "Save changes"
39
    And I follow "Private files" in the user menu
40
    And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager
41
    And I click on "moodle-logo.png" "link"
42
    And I set the field "Choose licence" to "Test licence"
43
    And I press "Update"
44
    And I press "Save changes"
45
    And I am on site homepage
46
    And I navigate to "Licence > Licence manager" in site administration
47
    And I click on "Delete" "icon" in the "Test licence" "table_row"
48
    When I click on "Yes" "button" in the "Delete licence" "dialogue"
49
    Then I should see "Cannot delete a licence which is currently assigned to one or more files"