浏览代码

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