Преглед изворни кода

Added missing manual test (see https://github.com/ckeditor/ckeditor5-engine/issues/575#issuecomment-244097959).

Piotrek Koszuliński пре 9 година
родитељ
комит
a01d275387

+ 10 - 0
packages/ckeditor5-enter/tests/manual/enter.html

@@ -0,0 +1,10 @@
+<head>
+	<link rel="stylesheet" href="%APPS_DIR%ckeditor/build/modules/amd/theme/ckeditor.css">
+</head>
+
+<div id="editor">
+	<h2>Heading 1</h2>
+	<h3>Heading 2</h3>
+	<h4>Heading 3</h4>
+	<p>Paragraph</p>
+</div>

+ 19 - 0
packages/ckeditor5-enter/tests/manual/enter.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', 'headings' ],
+	toolbar: [ 'headings' ]
+} )
+.then( editor => {
+	window.editor = editor;
+} )
+.catch( err => {
+	console.error( err.stack );
+} );

+ 13 - 0
packages/ckeditor5-enter/tests/manual/enter.md

@@ -0,0 +1,13 @@
+@bender-ui: collapsed
+
+## Enter key
+
+Test the <kbd>Enter</kbd>kbd> key support.
+
+### Notes:
+
+* Enter at the end of a heading should create a new paragraph.
+* In the middle of a heading should split it.
+* <kbd>Shift+Enter</kbd> should have <kbd>Enter</kbd> behavior.
+* The selection should always be moved to the newly created block.
+* Select all + <kbd>Enter</kbd> should leave an empty paragraph.