Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 111... Línea 111...
111
    And I click on "Save" "button" in the "Image details" "dialogue"
111
    And I click on "Save" "button" in the "Image details" "dialogue"
112
    And I select the "img" element in position "0" of the "Description" TinyMCE editor
112
    And I select the "img" element in position "0" of the "Description" TinyMCE editor
113
    And I click on the "Link" button for the "Description" TinyMCE editor
113
    And I click on the "Link" button for the "Description" TinyMCE editor
114
    And I set the field "Enter a URL" to "https://moodle.org/"
114
    And I set the field "Enter a URL" to "https://moodle.org/"
115
    And I set the field "Text to display" to "Moodle - Open-source learning platform"
115
    And I set the field "Text to display" to "Moodle - Open-source learning platform"
116
    And I click on "Update link" "button" in the "Create link" "dialogue"
116
    And I click on "Create link" "button" in the "Create link" "dialogue"
117
    # TODO: Verify the HTML by the improved code plugin in MDL-75265
117
    # TODO: Verify the HTML by the improved code plugin in MDL-75265
118
    And I click on "Update profile" "button"
118
    And I click on "Update profile" "button"
119
    And I follow "Preferences" in the user menu
119
    And I follow "Preferences" in the user menu
120
    And I follow "Editor preferences"
120
    And I follow "Editor preferences"
121
    And I set the field "Text editor" to "Plain text area"
121
    And I set the field "Text editor" to "Plain text area"
Línea 151... Línea 151...
151
    And I press "Save changes"
151
    And I press "Save changes"
152
    And I click on "Edit profile" "link" in the "region-main" "region"
152
    And I click on "Edit profile" "link" in the "region-main" "region"
153
    And I select the "a" element in position "0" of the "Description" TinyMCE editor
153
    And I select the "a" element in position "0" of the "Description" TinyMCE editor
154
    When I click on the "Unlink" button for the "Description" TinyMCE editor
154
    When I click on the "Unlink" button for the "Description" TinyMCE editor
155
    Then the field "Description" matches value "<p>Moodle - Open-source learning platform</p>"
155
    Then the field "Description" matches value "<p>Moodle - Open-source learning platform</p>"
-
 
156
 
-
 
157
  @javascript
-
 
158
  Scenario: Permissions can be configured to control access to link
-
 
159
    Given the following "users" exist:
-
 
160
      | username | firstname | lastname | email                |
-
 
161
      | teacher1 | Teacher   | 1        | teacher1@example.com |
-
 
162
      | teacher2 | Teacher   | 2        | teacher2@example.com |
-
 
163
    And the following "courses" exist:
-
 
164
      | fullname | shortname | format |
-
 
165
      | Course 1 | C1        | topics |
-
 
166
    And the following "roles" exist:
-
 
167
      | name           | shortname | description         | archetype      |
-
 
168
      | Custom teacher | custom1   | Limited permissions | editingteacher |
-
 
169
    And the following "course enrolments" exist:
-
 
170
      | user     | course | role           |
-
 
171
      | teacher1 | C1     | editingteacher |
-
 
172
      | teacher2 | C1     | custom1        |
-
 
173
    And the following "activity" exists:
-
 
174
      | activity | assign          |
-
 
175
      | course   | C1              |
-
 
176
      | name     | Test assignment |
-
 
177
    And the following "permission overrides" exist:
-
 
178
      | capability    | permission | role    | contextlevel | reference |
-
 
179
      | tiny/link:use | Prohibit   | custom1 | Course       | C1        |
-
 
180
    # Check plugin access as a role with prohibited permissions.
-
 
181
    And I log in as "teacher2"
-
 
182
    And I am on the "Test assignment" Activity page
-
 
183
    And I navigate to "Settings" in current page administration
-
 
184
    When I click on the "Insert" menu item for the "Activity instructions" TinyMCE editor
-
 
185
    Then I should not see "Link"
-
 
186
    # Check plugin access as a role with allowed permissions.
-
 
187
    And I log in as "teacher1"
-
 
188
    And I am on the "Test assignment" Activity page
-
 
189
    And I navigate to "Settings" in current page administration
-
 
190
    And I click on the "Insert" menu item for the "Activity instructions" TinyMCE editor
-
 
191
    And I should see "Link"