Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Improved the link decorator manual test description. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jun 25, 2019
1 parent 27a7179 commit 27298c2
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/manual/linkdecorator.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
## Link decorators

### Manual decorators (window.editors.manualDecorators):

1. Should be available for every link.
2. Should apply changes after accepting changes.
3. There should be available 3 manual decorators:
* Open in new window
2. Should be applied to the content only when "Save" was clicked.
3. There should be 3 manual decorators available:
* Open in new a new tab
* Downloadable
* Gallery link
4. State of buttons should reflect state of currently selected link.
5. Switch buttons should be focused (with tab key) after input. Save and cancel buttons should be focused at the end
4. State of the decorator switches should reflect the model of the currently selected link.
5. Switch buttons should be focusable (with the tab key), after the URL input. The "save" and "cancel" buttons should be focused last.

### Automatic decorators (window.editors.automaticDecorators).
1. There should be turned on default automatic decorator, which adds `target="_blank"` and `rel="noopener noreferrer"` attributes to all external links (links started with `http://`, `https://` or `//`);
2. There should not be any changes in model or view of the editors.
3. Additional data should be added during downcast ( you need to run `window.editors.automaticDecorators.getData()` to see how it works ).
4. There are 2 additional decorators:
* phone, which detects all links started with `tel:` and adds `phone` class to such link
* internal, which adds `internal` class to all links started with `#`

1. There should be a default automatic decorator turned on, which adds `target="_blank"` and `rel="noopener noreferrer"` attributes to all external links (links starting with `http://`, `https://` or `//`).
2. There should be no changes to the model or the view of the editors.
3. Decorator data should be added during downcast (run `window.editors.automaticDecorators.getData()` to see how it works).
4. There are 2 additional decorators in this editor:
* phone, which detects all links starting with `tel:` and adds the `phone` CSS class to such link,
* internal, which adds the `internal` CSS class to all links starting with `#`.

0 comments on commit 27298c2

Please sign in to comment.