8
0
Quellcode durchsuchen

Added CSS class to the LabeledInputView.

Aleksander Nowodzinski vor 8 Jahren
Ursprung
Commit
63377a3f44

+ 1 - 0
packages/ckeditor5-ui/src/labeledinput/labeledinputview.js

@@ -73,6 +73,7 @@ export default class LabeledInputView extends View {
 			tag: 'div',
 			attributes: {
 				class: [
+					'ck-labeled-input',
 					bind.if( 'isReadOnly', 'ck-disabled' )
 				]
 			},

+ 4 - 0
packages/ckeditor5-ui/tests/labeledinput/labeledinputview.js

@@ -37,6 +37,10 @@ describe( 'LabeledInputView', () => {
 	} );
 
 	describe( 'template', () => {
+		it( 'should have the CSS class', () => {
+			expect( view.element.classList.contains( 'ck-labeled-input' ) ).to.be.true;
+		} );
+
 		it( 'should have label view', () => {
 			expect( view.template.children[ 0 ] ).to.equal( view.labelView );
 		} );