浏览代码

Tests: Add manual tests stub.

Maciej Gołaszewski 8 年之前
父节点
当前提交
c5d27fe858

+ 49 - 0
packages/ckeditor5-highlight/tests/manual/highlight.html

@@ -0,0 +1,49 @@
+<style>
+	.marker {
+		background-color: #ffff66;
+	}
+
+	.marker-green {
+		background-color: #66ff00;
+	}
+
+	.marker-pink {
+		background-color: #ff6fff;
+	}
+
+	.pen-red {
+		background-color: transparent;
+		color: #ff0000;
+	}
+
+	.pen-blue {
+		background-color: transparent;
+		color: #0000ff;
+	}
+
+</style>
+<div id="editor">
+	<p>Lorem
+		<mark class="marker">ipsum dolor sit amet</mark>
+		, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et <mark class="pen-red">dolore magna</mark> aliqua. Ut enim ad minim veniam, quis
+		nostrud exercitation ullamco
+		<mark class="pen-blue">laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
+			velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
+		</mark>
+		cupidatat non proident, sunt in culpa qui officia
+		deserunt mollit anim id est laborum.
+	</p>
+	<p>Lorem ipsum dolor sit amet, consectetur
+		<mark class="marker-green">adipiscing elit</mark>
+		, sed do eiusmod tempor incididunt ut labore et dolore magna
+		<mark>aliqua. Ut enim ad minim veniam</mark>
+		, quis nostrud exercitation ullamco
+		<mark class="marker-pink">laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
+			esse cillum dolore eu
+		</mark>
+		fugiat nulla pariatur.
+		<mark class="pen-red">Excepteur</mark>
+		sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
+		laborum.
+	</p>
+</div>

+ 24 - 0
packages/ckeditor5-highlight/tests/manual/highlight.js

@@ -0,0 +1,24 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals console, window, document */
+
+import ClassicEditor from '../../../ckeditor5-editor-classic/src/classiceditor';
+import ArticlePluginSet from '../../../ckeditor5-core/tests/_utils/articlepluginset';
+import Highlight from '../../src/highlight';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ ArticlePluginSet, Highlight ],
+		toolbar: [
+			'headings', 'bold', 'italic', 'link', 'mark', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo'
+		]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 9 - 0
packages/ckeditor5-highlight/tests/manual/highlight.md

@@ -0,0 +1,9 @@
+### Loading
+
+1. The data should be loaded with:
+
+### Testing
+
+You should be able to:
+
+