Explorar el Código

Tests: Added missing feature tests.

Aleksander Nowodzinski hace 7 años
padre
commit
aeb3a18269

+ 30 - 0
packages/ckeditor5-build-decoupled-document/tests/ckeditor.js

@@ -90,6 +90,8 @@ describe( 'DecoupledDocumentEditor build', () => {
 				'<p>',
 				'<strong>Test:strong</strong>',
 				'<i>Test:i</i>',
+				'<u>Test:u</u>',
+				'<s>Test:s</s>',
 				'</p>'
 			].join( '' );
 
@@ -148,6 +150,34 @@ describe( 'DecoupledDocumentEditor build', () => {
 			editor.setData( data );
 			expect( editor.getData() ).to.equal( data );
 		} );
+
+		it( 'font size works', () => {
+			const data = '<p><span class="text-big">foo</span></p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'font family works', () => {
+			const data = '<p><span style="font-family:Georgia, serif;">foo</span></p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'highlight works', () => {
+			const data = '<p><mark class="marker-green">foo</mark></p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'alignment works', () => {
+			const data = '<p style="text-align:right;">foo</p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
 	} );
 
 	describe( 'config', () => {

+ 1 - 1
packages/ckeditor5-build-decoupled-document/tests/manual/ckeditor.js

@@ -47,7 +47,7 @@ iterations of the project. Stay tuned for some updates soon!</p>`;
 DecoupledDocumentEditor
 	.create( editorData, {
 		toolbarContainer: '.toolbar-container',
-		editableContainer: '.editable-container',
+		editableContainer: '.editable-container'
 	} )
 	.then( editor => {
 		window.editor = editor;