Explorar o código

Tests: Added unit test coverage.

Marek Lewandowski %!s(int64=6) %!d(string=hai) anos
pai
achega
e843abddca

+ 7 - 0
packages/ckeditor5-special-characters/tests/specialcharacters.js

@@ -64,6 +64,7 @@ describe( 'SpecialCharacters', () => {
 
 			beforeEach( () => {
 				dropdown = editor.ui.componentFactory.create( 'specialCharacters' );
+				dropdown.isOpen = true; // Dropdown is lazy loaded, so needs to be open to be verified (#6175).
 			} );
 
 			afterEach( () => {
@@ -177,6 +178,12 @@ describe( 'SpecialCharacters', () => {
 					expect( characterInfo.code ).to.equal( 'U+003c' );
 				} );
 			} );
+
+			it( 'is fully initialized when not open', () => {
+				// (#6175)
+				const uninitializedDropdown = editor.ui.componentFactory.create( 'specialCharacters' );
+				expect( uninitializedDropdown.panelView.children.length ).to.be.equal( 0 );
+			} );
 		} );
 	} );