From 19094ab0bc531785f465868a403877c3842ce31e Mon Sep 17 00:00:00 2001 From: Mateusz Samsel Date: Fri, 9 Aug 2019 16:37:48 +0200 Subject: [PATCH] Set buttons as toggleable and update test to check it. --- src/alignmentui.js | 3 ++- tests/alignmentui.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alignmentui.js b/src/alignmentui.js index 90ee695..8e7c94b 100644 --- a/src/alignmentui.js +++ b/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. diff --git a/tests/alignmentui.js b/tests/alignmentui.js index 10f61e2..d87705b 100644 --- a/tests/alignmentui.js +++ b/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', () => {