1 |
efrain |
1 |
@editor @editor_tiny @tiny_noautolink
|
|
|
2 |
Feature: Tiny noautolink
|
11 |
efrain |
3 |
In order to prevent auto-linking in TinyMCE
|
|
|
4 |
As a User
|
|
|
5 |
I need be able to apply the auto-link prevention feature to the selected text
|
1 |
efrain |
6 |
|
11 |
efrain |
7 |
Background:
|
1 |
efrain |
8 |
Given I log in as "admin"
|
|
|
9 |
And I navigate to "Plugins > Text editors > TinyMCE editor > General settings" in site administration
|
|
|
10 |
And I click on "Enable No auto-link" "link"
|
11 |
efrain |
11 |
|
|
|
12 |
@javascript
|
|
|
13 |
Scenario: Add and remove auto-link prevention to URLs
|
|
|
14 |
Given I open my profile in edit mode
|
1 |
efrain |
15 |
And I set the field "Description" to "<p>https://moodle.org</p>"
|
|
|
16 |
# Add auto-link prevention.
|
|
|
17 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
11 |
efrain |
18 |
When I click on the "No auto-link" button for the "Description" TinyMCE editor
|
|
|
19 |
Then the field "Description" matches value "<p><span class='nolink'>https://moodle.org</span></p>"
|
|
|
20 |
# Remove auto-link prevention.
|
|
|
21 |
And I select the "span" element in position "0" of the "Description" TinyMCE editor
|
1 |
efrain |
22 |
And I click on the "No auto-link" button for the "Description" TinyMCE editor
|
11 |
efrain |
23 |
And the field "Description" matches value "<p>https://moodle.org</p>"
|
1 |
efrain |
24 |
|
11 |
efrain |
25 |
@javascript
|
|
|
26 |
Scenario: Add and remove auto-link prevention to simple text
|
|
|
27 |
Given I open my profile in edit mode
|
|
|
28 |
And I set the field "Description" to "Some text"
|
|
|
29 |
# Add auto-link prevention.
|
|
|
30 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
|
|
31 |
When I click on the "No auto-link" button for the "Description" TinyMCE editor
|
|
|
32 |
Then the field "Description" matches value "<p><span class='nolink'>Some text</span></p>"
|
1 |
efrain |
33 |
# Remove auto-link prevention.
|
|
|
34 |
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
|
11 |
efrain |
36 |
And the field "Description" matches value "<p>Some text</p>"
|