1 |
efrain |
1 |
@editor @editor_tiny @tiny_noautolink
|
|
|
2 |
Feature: Tiny noautolink
|
|
|
3 |
To avoid auto-linking, users need to wrap the URL with the 'nolink' class.
|
|
|
4 |
|
|
|
5 |
@javascript
|
|
|
6 |
Scenario: Insert a link, add and remove the auto-link prevention
|
|
|
7 |
Given I log in as "admin"
|
|
|
8 |
And I navigate to "Plugins > Text editors > TinyMCE editor > General settings" in site administration
|
|
|
9 |
And I click on "Enable No auto-link" "link"
|
|
|
10 |
When I open my profile in edit mode
|
|
|
11 |
And I set the field "Description" to "<p>https://moodle.org</p>"
|
|
|
12 |
|
|
|
13 |
# Add auto-link prevention.
|
|
|
14 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
|
|
15 |
And I click on the "No auto-link" button for the "Description" TinyMCE editor
|
|
|
16 |
Then the field "Description" matches value "<p><span class='nolink'>https://moodle.org</span></p>"
|
|
|
17 |
|
|
|
18 |
# Remove auto-link prevention.
|
|
|
19 |
And I select the "span" element in position "0" of the "Description" TinyMCE editor
|
|
|
20 |
And I click on the "No auto-link" button for the "Description" TinyMCE editor
|
|
|
21 |
Then the field "Description" matches value "<p>https://moodle.org</p>"
|