Ver código fonte

Make split button toggleable and update test to check it.

Mateusz Samsel 6 anos atrás
pai
commit
81ded553e6

+ 2 - 1
packages/ckeditor5-highlight/src/highlightui.js

@@ -188,7 +188,8 @@ export default class HighlightUI extends Plugin {
 				// Holds last executed highlighter.
 				lastExecuted: startingHighlighter.model,
 				// Holds current highlighter to execute (might be different then last used).
-				commandValue: startingHighlighter.model
+				commandValue: startingHighlighter.model,
+				isToggleable: true
 			} );
 
 			// Dropdown button changes to selection (command.value):

+ 1 - 0
packages/ckeditor5-highlight/tests/highlightui.js

@@ -80,6 +80,7 @@ describe( 'HighlightUI', () => {
 
 			expect( button ).to.have.property( 'tooltip', 'Highlight' );
 			expect( button ).to.have.property( 'icon', markerIcon );
+			expect( button ).to.have.property( 'isToggleable', true );
 		} );
 
 		it( 'should have proper icons in dropdown', () => {