Przeglądaj źródła

Set buttons as toggleable and update test to check it.

Mateusz Samsel 6 lat temu
rodzic
commit
a5158e1fdb

+ 2 - 1
packages/ckeditor5-alignment/src/alignmentui.js

@@ -140,7 +140,8 @@ export default class AlignmentUI extends Plugin {
 			buttonView.set( {
 				label: this.localizedOptionTitles[ option ],
 				icon: icons.get( option ),
-				tooltip: true
+				tooltip: true,
+				isToggleable: true
 			} );
 
 			// Bind button model to command.

+ 1 - 0
packages/ckeditor5-alignment/tests/alignmentui.js

@@ -59,6 +59,7 @@ describe( 'Alignment UI', () => {
 			expect( button ).to.have.property( 'label', 'Align left' );
 			expect( button ).to.have.property( 'icon' );
 			expect( button ).to.have.property( 'tooltip', true );
+			expect( button ).to.have.property( 'isToggleable', true );
 		} );
 
 		it( 'has isOn bound to command\'s value', () => {