Línea 1... |
Línea 1... |
1 |
@editor @editor_tiny @tiny_noautolink
|
1 |
@editor @editor_tiny @tiny_noautolink
|
2 |
Feature: Tiny noautolink
|
2 |
Feature: Tiny noautolink
|
- |
|
3 |
In order to prevent auto-linking in TinyMCE
|
- |
|
4 |
As a User
|
3 |
To avoid auto-linking, users need to wrap the URL with the 'nolink' class.
|
5 |
I need be able to apply the auto-link prevention feature to the selected text
|
Línea 4... |
Línea 6... |
4 |
|
6 |
|
5 |
@javascript
|
- |
|
6 |
Scenario: Insert a link, add and remove the auto-link prevention
|
7 |
Background:
|
7 |
Given I log in as "admin"
|
8 |
Given I log in as "admin"
|
8 |
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
|
9 |
And I click on "Enable No auto-link" "link"
|
- |
|
10 |
When I open my profile in edit mode
|
- |
|
Línea -... |
Línea 10... |
- |
|
10 |
And I click on "Enable No auto-link" "link"
|
- |
|
11 |
|
- |
|
12 |
@javascript
|
- |
|
13 |
Scenario: Add and remove auto-link prevention to URLs
|
11 |
And I set the field "Description" to "<p>https://moodle.org</p>"
|
14 |
Given I open my profile in edit mode
|
12 |
|
15 |
And I set the field "Description" to "<p>https://moodle.org</p>"
|
13 |
# Add auto-link prevention.
|
16 |
# Add auto-link prevention.
|
14 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
17 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
- |
|
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
|
Línea -... |
Línea 22... |
- |
|
22 |
And I click on the "No auto-link" button for the "Description" TinyMCE editor
|
- |
|
23 |
And the field "Description" matches value "<p>https://moodle.org</p>"
|
- |
|
24 |
|
- |
|
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.
|
15 |
And I click on the "No auto-link" button for the "Description" TinyMCE editor
|
30 |
And I select the "p" element in position "0" of the "Description" TinyMCE editor
|
16 |
Then the field "Description" matches value "<p><span class='nolink'>https://moodle.org</span></p>"
|
31 |
When I click on the "No auto-link" button for the "Description" TinyMCE editor
|
17 |
|
32 |
Then the field "Description" matches value "<p><span class='nolink'>Some text</span></p>"
|
18 |
# Remove auto-link prevention.
|
33 |
# Remove auto-link prevention.
|