From e070c801aa8512267cd14c6ed26e1e5c2e3086ce Mon Sep 17 00:00:00 2001 From: Mateusz Samsel Date: Fri, 9 Aug 2019 12:44:25 +0200 Subject: [PATCH] Set buttons as toggleable and add unit test checking it. --- src/blockquoteui.js | 3 ++- tests/blockquoteui.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blockquoteui.js b/src/blockquoteui.js index d95badc..fa8cb4f 100644 --- a/src/blockquoteui.js +++ b/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. diff --git a/tests/blockquoteui.js b/tests/blockquoteui.js index 270e89d..650306f 100644 --- a/tests/blockquoteui.js +++ b/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', () => {