浏览代码

Tests: Added missing test for full CC.

Aleksander Nowodzinski 8 年之前
父节点
当前提交
e793a9e867
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      packages/ckeditor5-ui/tests/bindings/clickoutsidehandler.js

+ 10 - 0
packages/ckeditor5-ui/tests/bindings/clickoutsidehandler.js

@@ -129,4 +129,14 @@ describe( 'clickOutsideHandler', () => {
 		// Called one more time.
 		sinon.assert.calledTwice( actionSpy );
 	} );
+
+	it( 'should not execute the callback if one of #contextElements contains the DOM event target', () => {
+		const target = document.createElement( 'div' );
+		activator.returns( true );
+
+		contextElement2.appendChild( target );
+		target.dispatchEvent( new Event( 'mousedown', { bubbles: true } ) );
+
+		sinon.assert.notCalled( actionSpy );
+	} );
 } );