Преглед на файлове

Tests: Add font size manual test stub.

Maciej Gołaszewski преди 8 години
родител
ревизия
73dc02e656

+ 43 - 0
packages/ckeditor5-font/tests/manual/font-size.html

@@ -0,0 +1,43 @@
+<style>
+	.text-tiny {
+		font-size: 0.7em;
+	}
+
+	.text-small {
+		font-size: 0.85em;
+	}
+
+	.text-big {
+		font-size: 1.4em;
+	}
+
+	.text-huge {
+		font-size: 1.8em;
+	}
+</style>
+
+<div id="editor">
+	<h2>Font <span class="text-big">Size</span> feature sample.</h2>
+
+	<p>
+		This is a mixed text with different sizes of text:
+		<span class="text-tiny">tiny</span>,
+		<span class="text-small">small</span>,
+		<span class="text-big">big</span> and
+		<span class="text-huge">huge</span>.
+	</p>
+
+	<ul>
+		<li>It's a list item with <span class="text-tiny">tiny</span> text</li>
+		<li>It's a list item with <span class="text-small">small</span> text</li>
+		<li>It's a list item with <span class="text-big">big</span> text</li>
+		<li>It's a list item with <span class="text-huge">huge</span> text</li>
+	</ul>
+
+	<figure class="image">
+		<img src="sample.jpg" alt="CKEditor logo"/>
+		<figcaption>
+			Sample image with <span class="text-big">c</span><span class="text-tiny">r</span><span class="text-huge">a</span>z<span class="text-small">y</span> caption.
+		</figcaption>
+	</figure>
+</div>

+ 24 - 0
packages/ckeditor5-font/tests/manual/font-size.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 '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
+import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
+import FontSize from '../../src/fontsize';
+
+ClassicEditor
+	.create( document.querySelector( '#editor' ), {
+		plugins: [ ArticlePluginSet, FontSize ],
+		toolbar: [
+			'headings', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo'
+		]
+	} )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 11 - 0
packages/ckeditor5-font/tests/manual/font-size.md

@@ -0,0 +1,11 @@
+### Loading
+
+The data should be loaded with:
+- heading with big fragment,
+- paragraph with fragments with all font sizes (tiny, small, big, huge),
+- list with 4 items - each with different font size fragment,
+- image with caption with styled word.
+
+### Testing
+
+TODO

BIN
packages/ckeditor5-font/tests/manual/sample.jpg