Преглед на файлове

Make split button toggleable and update test to check it.

Mateusz Samsel преди 6 години
родител
ревизия
81ded553e6
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 2 1
      packages/ckeditor5-highlight/src/highlightui.js
  2. 1 0
      packages/ckeditor5-highlight/tests/highlightui.js

+ 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', () => {