|
@@ -1,34 +1,27 @@
|
|
|
@bender-ui: collapsed
|
|
@bender-ui: collapsed
|
|
|
-@bender-tags: ticket, 462, 0.4.0, iteration4
|
|
|
|
|
|
|
+@bender-tags: ticket, 462, iteration4
|
|
|
|
|
|
|
|
### Selection attributes conversion test [#462](https://github.com/ckeditor/ckeditor5-engine/issues/462)
|
|
### Selection attributes conversion test [#462](https://github.com/ckeditor/ckeditor5-engine/issues/462)
|
|
|
|
|
|
|
|
-Open console and inspect a paragraph in editable. Remember to not blur editor after setting selection.
|
|
|
|
|
-
|
|
|
|
|
#### Test 1
|
|
#### Test 1
|
|
|
|
|
|
|
|
1. Put caret inside unstyled word.
|
|
1. Put caret inside unstyled word.
|
|
|
-2. Press italic key in toolbar.
|
|
|
|
|
|
|
+2. Press <kbd>Ctrl+I</kbd>.
|
|
|
|
|
|
|
|
Expected results:
|
|
Expected results:
|
|
|
|
|
|
|
|
-`<em></em>` was inserted into editable (along with filler characters).
|
|
|
|
|
-
|
|
|
|
|
-`editor.document.selection.hasAttribute( 'italic' )` returns `true`.
|
|
|
|
|
-
|
|
|
|
|
-`document.getSelection().anchorNode.parentNode` returns `<em>` element.
|
|
|
|
|
|
|
+* `<em>@@@@@@@</em>` was inserted into editable.
|
|
|
|
|
+* selection has the `'italic'` attribute.
|
|
|
|
|
+* selection anchor's parent node is `<em>`.
|
|
|
|
|
|
|
|
#### Test 2
|
|
#### Test 2
|
|
|
|
|
|
|
|
1. Put caret inside bold word.
|
|
1. Put caret inside bold word.
|
|
|
-2. Press bold key in toolbar.
|
|
|
|
|
|
|
+2. Press <kbd>Ctrl+B</kbd>.
|
|
|
|
|
|
|
|
Expected results:
|
|
Expected results:
|
|
|
|
|
|
|
|
-`<strong>` element from previous test got removed.
|
|
|
|
|
-
|
|
|
|
|
-`<strong>` element got broken.
|
|
|
|
|
-
|
|
|
|
|
-`editor.document.selection.hasAttribute( 'bold' )` returns `false`.
|
|
|
|
|
-
|
|
|
|
|
-`document.getSelection().anchorNode` returns `<p>` element.
|
|
|
|
|
|
|
+* `<em>` element from previous test got removed.
|
|
|
|
|
+* `<strong>` element got broken.
|
|
|
|
|
+* selection doesn't have the `'bold'` attribute.
|
|
|
|
|
+* selection anchor's parent node is `<p>`.
|