浏览代码

Tests: added integration test.

Szymon Cofalik 9 年之前
父节点
当前提交
c200112294

+ 7 - 0
packages/ckeditor5-typing/tests/manual/selection.html

@@ -0,0 +1,7 @@
+<head>
+	<link rel="stylesheet" href="%APPS_DIR%ckeditor/build/modules/amd/theme/ckeditor.css">
+</head>
+
+<div id="editor">
+	<p>This is an editr xxxxx instance.</p>
+</div>

+ 19 - 0
packages/ckeditor5-typing/tests/manual/selection.js

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

+ 22 - 0
packages/ckeditor5-typing/tests/manual/selection.md

@@ -0,0 +1,22 @@
+@bender-ui: collapsed
+
+### Selection after typing
+
+#### Spellchecker
+
+1. Focus selection in "This" word.
+2. Right-click on "editr".
+3. Change to "editor".
+4. Selection should be placed after "editor" word.
+
+#### Multiple same characters
+
+1. Focus selection at "x^xxxx".
+2. Press <kbd>x</kbd> on keyboard.
+3. Character "x" should be added and selection should be moved by one.
+
+#### Autocorrect (Safari only)
+
+1. Focus somewhere in the middle of text.
+2. Write "emd" and press <kbd>space</kbd>.
+3. Safari autocorrect should change "emd" to "end" and selection should be placed after space character.