Browse Source

Add unit test for the tooltip of the dropdown button view.

panr 5 years ago
parent
commit
1df5fbb814
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/ckeditor5-image/tests/imageresize/ui/imageresizeui.js

+ 6 - 0
packages/ckeditor5-image/tests/imageresize/ui/imageresizeui.js

@@ -176,6 +176,12 @@ describe( 'ImageResizeUI', () => {
 			expect( dropdownView.listView.items.last.element.textContent ).to.equal( '75%' );
 		} );
 
+		it( 'should be created with a proper tooltip', () => {
+			const dropdownView = editor.ui.componentFactory.create( 'imageResize' );
+
+			expect( dropdownView.buttonView.tooltip ).to.equal( 'Resize image' );
+		} );
+
 		it( 'should execute resize command with a proper value', () => {
 			const dropdownView = editor.ui.componentFactory.create( 'imageResize' );
 			const commandSpy = sinon.spy( command, 'execute' );