Rev 11 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
@editor @editor_tiny @tiny_noautolinkFeature: Tiny noautolinkIn order to prevent auto-linking in TinyMCEAs a UserI need be able to apply the auto-link prevention feature to the selected textBackground:Given I log in as "admin"And I navigate to "Plugins > Text editors > TinyMCE editor > General settings" in site administrationAnd I toggle the "Enable No auto-link" admin switch "on"When I open my profile in edit modeAnd I set the field "Description" to "<p>https://moodle.org</p>"@javascriptScenario: Add and remove auto-link prevention to URLsGiven I open my profile in edit modeAnd I set the field "Description" to "<p>https://moodle.org</p>"# Add auto-link prevention.And I select the "p" element in position "0" of the "Description" TinyMCE editorWhen I click on the "No auto-link" button for the "Description" TinyMCE editorThen the field "Description" matches value "<p><span class='nolink'>https://moodle.org</span></p>"# Remove auto-link prevention.And I select the "span" element in position "0" of the "Description" TinyMCE editorAnd I click on the "No auto-link" button for the "Description" TinyMCE editorAnd the field "Description" matches value "<p>https://moodle.org</p>"@javascriptScenario: Add and remove auto-link prevention to simple textGiven I open my profile in edit modeAnd I set the field "Description" to "Some text"# Add auto-link prevention.And I select the "p" element in position "0" of the "Description" TinyMCE editorWhen I click on the "No auto-link" button for the "Description" TinyMCE editorThen the field "Description" matches value "<p><span class='nolink'>Some text</span></p>"# Remove auto-link prevention.And I select the "span" element in position "0" of the "Description" TinyMCE editorAnd I click on the "No auto-link" button for the "Description" TinyMCE editorAnd the field "Description" matches value "<p>Some text</p>"@javascriptScenario: Permissions can be configured to control access to no auto-linkGiven the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || teacher2 | Teacher | 2 | teacher2@example.com |And the following "courses" exist:| fullname | shortname | format || Course 1 | C1 | topics |And the following "roles" exist:| name | shortname | description | archetype || Custom teacher | custom1 | Limited permissions | editingteacher |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || teacher2 | C1 | custom1 |And the following "activity" exists:| activity | assign || course | C1 || name | Test assignment |And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tiny/noautolink:use | Prohibit | custom1 | Course | C1 |# Check plugin access as a role with prohibited permissions.And I log in as "teacher2"And I am on the "Test assignment" Activity pageAnd I navigate to "Settings" in current page administrationWhen I click on the "Format" menu item for the "Activity instructions" TinyMCE editorThen I should not see "No auto-link"# Check plugin access as a role with allowed permissions.And I log in as "teacher1"And I am on the "Test assignment" Activity pageAnd I navigate to "Settings" in current page administrationAnd I click on the "Format" menu item for the "Activity instructions" TinyMCE editorAnd I should see "No auto-link"