浏览代码

Added listener for hight priority to integration test of ContectualToolbar.

Oskar Wróbel 8 年之前
父节点
当前提交
3692c54452
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/ckeditor5-image/tests/image.js

+ 3 - 0
packages/ckeditor5-image/tests/image.js

@@ -103,17 +103,20 @@ describe( 'Image', () => {
 
 		it( 'should listen to ContextualToolbar#show event with high priority', () => {
 			const highestPrioritySpy = sinon.spy();
+			const highPrioritySpy = sinon.spy();
 			const normalPrioritySpy = sinon.spy();
 
 			// Select an image
 			setModelData( newEditor.document, '<paragraph>foo</paragraph>[<image alt="alt text" src="foo.png"></image>]' );
 
 			newEditor.listenTo( contextualToolbar, 'show', highestPrioritySpy, { priority: 'highest' } );
+			newEditor.listenTo( contextualToolbar, 'show', highPrioritySpy, { priority: 'high' } );
 			newEditor.listenTo( contextualToolbar, 'show', normalPrioritySpy, { priority: 'normal' } );
 
 			contextualToolbar.show();
 
 			sinon.assert.calledOnce( highestPrioritySpy );
+			sinon.assert.notCalled( highPrioritySpy );
 			sinon.assert.notCalled( normalPrioritySpy );
 		} );
 	} );