浏览代码

Merge pull request #57 from ckeditor/t/41

Tests: provided manual test for unicode characters.
Piotrek Koszuliński 9 年之前
父节点
当前提交
57ef83f53b

+ 8 - 0
packages/ckeditor5-typing/tests/manual/unicode.html

@@ -0,0 +1,8 @@
+<head>
+	<link rel="stylesheet" href="%APPS_DIR%ckeditor/build/modules/amd/theme/ckeditor.css">
+</head>
+
+<div id="editor">
+	<p>Some surrogate pair characters: 💩💩 and 𨭎𨭎</p>
+	<p>Some base characters with combining marks: a̻̐ and z͙ͤͣ</p>
+</div>

+ 22 - 0
packages/ckeditor5-typing/tests/manual/unicode.js

@@ -0,0 +1,22 @@
+/**
+ * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals console, window, document */
+
+import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
+import Enter from '/ckeditor5/enter/enter.js';
+import Typing from '/ckeditor5/typing/typing.js';
+import Paragraph from '/ckeditor5/paragraph/paragraph.js';
+
+ClassicEditor.create( document.querySelector( '#editor' ), {
+	features: [ Enter, Typing, Paragraph ],
+	toolbar: []
+} )
+.then( editor => {
+	window.editor = editor;
+} )
+.catch( err => {
+	console.error( err.stack );
+} );

+ 29 - 0
packages/ckeditor5-typing/tests/manual/unicode.md

@@ -0,0 +1,29 @@
+@bender-ui: collapsed
+
+## Unicode support
+
+### Selection
+
+1. Put caret somewhere before surrogate pair characters.
+2. Using right arrow key move caret to the end of paragraph.
+3. Caret should be placed after each character.
+4. No errors in console.
+5. Do the same but make selection using mouse.
+6. Do the same for combined marks. Note that some browsers (i.e. Chrome) forbid putting selection between லை and க்கு.
+
+### Removing
+
+1. Put caret at the end of first paragraph.
+2. Start removing surrogate pair characters using backspace.
+3. Characters should be removed one by one.
+
+
+1. Put caret at the end of second paragraph.
+2. Start removing combined characters using backspace.
+3. Combining mark and base characters should be removed separately (not at once).
+
+
+1. You may need to refresh test if you removed too many combined characters.
+2. Put caret before combined character.
+3. Start removing combined characters using delete key.
+4. Combining marks should be removed together with base characters.