Jelajahi Sumber

Tests: Adjusted part of font color tests to account for lazy loading.

Marek Lewandowski 6 tahun lalu
induk
melakukan
d3e1dd38db

+ 2 - 0
packages/ckeditor5-font/tests/ui/colortableview.js

@@ -79,6 +79,7 @@ describe( 'ColorTableView', () => {
 			documentColorsLabel: 'Document colors',
 			documentColorsCount: 4
 		} );
+		colorTableView.renderGrids();
 		colorTableView.render();
 	} );
 
@@ -418,6 +419,7 @@ describe( 'ColorTableView', () => {
 					model = editor.model;
 
 					dropdown = editor.ui.componentFactory.create( 'testColor' );
+					dropdown.isOpen = true;
 					dropdown.render();
 
 					staticColorsGrid = dropdown.colorTableView.staticColorsGrid;

+ 2 - 0
packages/ckeditor5-font/tests/ui/colorui.js

@@ -116,6 +116,7 @@ describe( 'ColorUI', () => {
 		beforeEach( () => {
 			command = editor.commands.get( 'testColorCommand' );
 			dropdown = editor.ui.componentFactory.create( 'testColor' );
+			dropdown.isOpen = true;
 
 			dropdown.render();
 		} );
@@ -308,6 +309,7 @@ describe( 'ColorUI', () => {
 
 				colors.forEach( test => {
 					it( `tested color "${ test.color }" translated to "${ test.label }".`, () => {
+						dropdown.isOpen = true;
 						const colorGrid = dropdown.colorTableView.items.get( 1 );
 						const tile = colorGrid.items.find( colorTile => test.color === colorTile.color );