8
0
Просмотр исходного кода

Tests: Added Font Family feature manual tests.

Maciej Gołaszewski 8 лет назад
Родитель
Сommit
b0f6922487

+ 41 - 0
packages/ckeditor5-font/tests/manual/font-family.html

@@ -0,0 +1,41 @@
+<div id="editor">
+	<h2>Font <span class="text-big">Size</span> feature sample.</h2>
+
+	<p>
+		Brownie sugar plum jelly beans. Brownie pudding liquorice jelly-o cotton candy sesame snaps powder. Chocolate cake pastry dragée dragée carrot cake. Caramels powder bear claw macaroon tiramisu. Soufflé gummies cheesecake apple pie. Candy jelly-o marzipan cake lollipop candy candy sweet. Pudding marshmallow dragée pastry cotton candy pudding caramels lemon drops. Sugar plum candy toffee donut brownie macaroon soufflé oat cake.
+	</p>
+
+	<p>
+		Icing powder ice cream tootsie roll cake wafer icing sweet roll. Dessert tiramisu tart. Macaroon marzipan dessert cheesecake. Pudding chupa chups liquorice sesame snaps cookie ice cream croissant. Liquorice pie cake pudding. Carrot cake gummi bears chocolate bar. Pie gummies lemon drops tiramisu sugar plum powder sesame snaps halvah lollipop.
+	</p>
+
+	<p>
+		Powder donut sesame snaps jelly cake. Gummi bears sweet icing cotton candy oat cake dragée bonbon cotton candy. Caramels tootsie roll soufflé candy canes. Chocolate bar jelly-o apple pie. Pastry gingerbread chocolate powder pie cupcake sesame snaps. Chocolate cake topping donut chocolate cake dragée. Lemon drops powder jelly-o cake chupa chups lollipop soufflé.
+	</p>
+
+	<p>
+		Halvah wafer ice cream dragée tart topping ice cream gummi bears. Donut donut lollipop donut gummies tiramisu. Cupcake cotton candy donut cake soufflé bear claw oat cake gingerbread. Sweet gummies bonbon jujubes gummies topping. Toffee macaroon caramels. Gummi bears ice cream gummi bears pudding ice cream lemon drops sweet roll icing jelly beans. Muffin cotton candy cheesecake. Chocolate bar fruitcake icing brownie croissant donut jelly chocolate bar jelly-o. Macaroon wafer sweet roll soufflé sweet roll apple pie.
+	</p>
+
+	<p>
+		Chocolate bar pie cake chupa chups topping bear claw icing. Macaroon tootsie roll chocolate chupa chups chocolate bar candy canes bonbon jelly beans. Tootsie roll danish topping chocolate bar. Fruitcake cheesecake jelly-o. Chocolate cake muffin candy canes marzipan. Sesame snaps lollipop sweet bear claw donut dessert apple pie. Chocolate bar cookie cake dessert powder biscuit dragée.
+	</p>
+
+	<p>
+		Gingerbread cupcake candy powder. Chocolate cake chocolate bar marzipan lollipop. Tootsie roll chocolate cake marzipan dragée danish gummi bears gummies jelly beans. Chocolate bar candy toffee tart marshmallow cupcake. Oat cake gingerbread cheesecake toffee. Muffin chupa chups pastry. Muffin lemon drops danish dragée cake pastry pie powder. Lollipop bear claw cake halvah marshmallow liquorice.
+	</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">changed font</span> caption.
+		</figcaption>
+	</figure>
+</div>

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

+ 7 - 0
packages/ckeditor5-font/tests/manual/font-family.md

@@ -0,0 +1,7 @@
+### Loading
+
+The data should be loaded with paragraphs, each with different font.
+
+### Testing
+
+TODO