8
0
Просмотр исходного кода

Tests: Moved manual test from ticket directory to global directory and changed description.

Szymon Cofalik 9 лет назад
Родитель
Сommit
2087e9a8b1

+ 0 - 15
packages/ckeditor5-typing/tests/manual/49/1.md

@@ -1,15 +0,0 @@
-### Issue [#49](https://github.com/ckeditor/ckeditor5-typing/issues/49) manual test
-
-Non-breakable spaces created by browser after using <kbd>space</kbd> should be changed to normal space characters when
-inserted to model and view. Still, `&nbsp;` have to be correctly rendered in DOM.
-
-Multiple consecutive spaces should be allowed, as well as spaces at the beginning or end of element.
-
-Open console and start using <kbd>space</kbd>. After each change, console is refreshed with output:
-* There should be no `&nbsp;` inserted in view and model after using <kbd>space</kbd>.
-* There should be `&nbsp;` in DOM and `getData` output, where needed.
-
-Use `editor.setData()` to test whether whitespaces in input HTML are correctly removed and `&nbsp;` are correctly
-saved in model and view. `&nbsp;` inserted through `editor.setData()` should be kept, not changed to normal spaces.
-
-Use the button to test whether `&nbsp;`s are correctly preserved in model, view and DOM.

+ 0 - 0
packages/ckeditor5-typing/tests/manual/49/1.html → packages/ckeditor5-typing/tests/manual/nbsp.html


+ 1 - 1
packages/ckeditor5-typing/tests/manual/49/1.js → packages/ckeditor5-typing/tests/manual/nbsp.js

@@ -7,7 +7,7 @@
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic';
 import Enter from '@ckeditor/ckeditor5-enter/src/enter';
-import Typing from '../../../src/typing';
+import Typing from '../../src/typing';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import { getData as getModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';

+ 21 - 0
packages/ckeditor5-typing/tests/manual/nbsp.md

@@ -0,0 +1,21 @@
+### `&nbsp;` handling test
+
+Typing plugin should correctly handle spaces and &nbsp; characters.
+
+**Requirements:**
+
+1. Non-breakable spaces created by browser when using <kbd>space</kbd> should be changed to normal space characters when
+inserted to model (and then, to view).
+2. In DOM we still need to render them as `&nbsp;`s.
+3. Multiple consecutive spaces should be allowed, as well as spaces at the beginning or end of element.
+4. `&nbsp;` characters inserted intentionally should be kept as `&nbsp;` in model (and view).
+5. Whitespaces should be removed when editor data is set.
+
+**Test steps:**
+
+1. Open console and start using <kbd>space</kbd>. After each change, console is refreshed with output:
+    - There should be no `&nbsp;` inserted in view and model after using <kbd>space</kbd>.
+    - There should be `&nbsp;` in DOM and `getData` output, where needed.
+2. Use `editor.setData()` to test whether whitespaces in input HTML are correctly removed and `&nbsp;` are correctly
+saved in model and view. `&nbsp;` inserted through `editor.setData()` should be kept, not changed to normal spaces.
+3. Use the button to test whether `&nbsp;`s are correctly preserved in model, view and DOM.