Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 5... Línea 5...
5
    I need be able to apply the auto-link prevention feature to the selected text
5
    I need be able to apply the auto-link prevention feature to the selected text
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given I log in as "admin"
8
    Given I log in as "admin"
9
    And I navigate to "Plugins > Text editors > TinyMCE editor > General settings" in site administration
9
    And I navigate to "Plugins > Text editors > TinyMCE editor > General settings" in site administration
-
 
10
    And I toggle the "Enable No auto-link" admin switch "on"
-
 
11
    When I open my profile in edit mode
Línea 10... Línea 12...
10
    And I click on "Enable No auto-link" "link"
12
    And I set the field "Description" to "<p>https://moodle.org</p>"
11
 
13
 
12
  @javascript
14
  @javascript
13
  Scenario: Add and remove auto-link prevention to URLs
15
  Scenario: Add and remove auto-link prevention to URLs
Línea 32... Línea 34...
32
    Then the field "Description" matches value "<p><span class='nolink'>Some text</span></p>"
34
    Then the field "Description" matches value "<p><span class='nolink'>Some text</span></p>"
33
    # Remove auto-link prevention.
35
    # Remove auto-link prevention.
34
    And I select the "span" element in position "0" of the "Description" TinyMCE editor
36
    And I select the "span" element in position "0" of the "Description" TinyMCE editor
35
    And I click on the "No auto-link" button for the "Description" TinyMCE editor
37
    And I click on the "No auto-link" button for the "Description" TinyMCE editor
36
    And the field "Description" matches value "<p>Some text</p>"
38
    And the field "Description" matches value "<p>Some text</p>"
-
 
39
 
-
 
40
  @javascript
-
 
41
  Scenario: Permissions can be configured to control access to no auto-link
-
 
42
    Given the following "users" exist:
-
 
43
      | username | firstname | lastname | email                |
-
 
44
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
45
      | teacher2 | Teacher   | 2        | teacher2@example.com |
-
 
46
    And the following "courses" exist:
-
 
47
      | fullname | shortname | format |
-
 
48
      | Course 1 | C1        | topics |
-
 
49
    And the following "roles" exist:
-
 
50
      | name           | shortname | description         | archetype      |
-
 
51
      | Custom teacher | custom1   | Limited permissions | editingteacher |
-
 
52
    And the following "course enrolments" exist:
-
 
53
      | user     | course | role           |
-
 
54
      | teacher1 | C1     | editingteacher |
-
 
55
      | teacher2 | C1     | custom1        |
-
 
56
    And the following "activity" exists:
-
 
57
      | activity | assign          |
-
 
58
      | course   | C1              |
-
 
59
      | name     | Test assignment |
-
 
60
    And the following "permission overrides" exist:
-
 
61
      | capability          | permission | role    | contextlevel | reference |
-
 
62
      | tiny/noautolink:use | Prohibit   | custom1 | Course       | C1        |
-
 
63
    # Check plugin access as a role with prohibited permissions.
-
 
64
    And I log in as "teacher2"
-
 
65
    And I am on the "Test assignment" Activity page
-
 
66
    And I navigate to "Settings" in current page administration
-
 
67
    When I click on the "Format" menu item for the "Activity instructions" TinyMCE editor
-
 
68
    Then I should not see "No auto-link"
-
 
69
    # Check plugin access as a role with allowed permissions.
-
 
70
    And I log in as "teacher1"
-
 
71
    And I am on the "Test assignment" Activity page
-
 
72
    And I navigate to "Settings" in current page administration
-
 
73
    And I click on the "Format" menu item for the "Activity instructions" TinyMCE editor
-
 
74
    And I should see "No auto-link"