8
0
Просмотр исходного кода

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

panr 5 лет назад
Родитель
Сommit
1df5fbb814
1 измененных файлов с 6 добавлено и 0 удалено
  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' );