Bladeren bron

Set buttons as toggleable and add unit test checking it.

Mateusz Samsel 6 jaren geleden
bovenliggende
commit
53842f9364

+ 2 - 1
packages/ckeditor5-block-quote/src/blockquoteui.js

@@ -35,7 +35,8 @@ export default class BlockQuoteUI extends Plugin {
 			buttonView.set( {
 				label: t( 'Block quote' ),
 				icon: quoteIcon,
-				tooltip: true
+				tooltip: true,
+				isToggleable: true
 			} );
 
 			// Bind button model to command.

+ 1 - 0
packages/ckeditor5-block-quote/tests/blockquoteui.js

@@ -40,6 +40,7 @@ describe( 'BlockQuoteUI', () => {
 			expect( button ).to.have.property( 'label', 'Block quote' );
 			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', () => {