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

Tests: Added TableCellPropertiesUI presence assertion to TableCellProperties tests.

Aleksander Nowodzinski 5 лет назад
Родитель
Сommit
4d2ea335fb

+ 16 - 4
packages/ckeditor5-table/tests/tablecellproperties.js

@@ -3,21 +3,28 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
+/* global document */
+
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
-import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
+import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 
 import TableEditing from '../src/tableediting';
 import TableCellProperties from '../src/tablecellproperties';
+import TableCellPropertiesUI from '../src/tablecellpropertiesui';
 import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 import { assertEqualMarkup } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 import { assertTableCellStyle, assertTRBLAttribute } from './_utils/utils';
 
 describe( 'TableCellProperties', () => {
-	let editor, model;
+	let element, editor, model;
 
 	beforeEach( () => {
-		return VirtualTestEditor
-			.create( {
+		element = document.createElement( 'div' );
+
+		document.body.appendChild( element );
+
+		return ClassicTestEditor
+			.create( element, {
 				plugins: [ TableCellProperties, Paragraph, TableEditing ]
 			} )
 			.then( newEditor => {
@@ -29,12 +36,17 @@ describe( 'TableCellProperties', () => {
 
 	afterEach( () => {
 		editor.destroy();
+		element.remove();
 	} );
 
 	it( 'should have pluginName', () => {
 		expect( TableCellProperties.pluginName ).to.equal( 'TableCellProperties' );
 	} );
 
+	it( 'should require TableCellPropertiesUI', () => {
+		expect( TableCellProperties.requires ).to.deep.equal( [ TableCellPropertiesUI ] );
+	} );
+
 	describe( 'border', () => {
 		it( 'should set proper schema rules', () => {
 			expect( model.schema.checkAttribute( [ '$root', 'tableCell' ], 'borderColor' ) ).to.be.true;

+ 1 - 1
packages/ckeditor5-table/tests/ui/formrowview.js

@@ -7,7 +7,7 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
 import FormRowView from '../../src/ui/formrowview';
 import ViewCollection from '@ckeditor/ckeditor5-ui/src/viewcollection';
 
-describe.only( 'FormRowView', () => {
+describe( 'FormRowView', () => {
 	let view, locale;
 
 	beforeEach( () => {