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

Tests: Added missing test for full CC.

Aleksander Nowodzinski 8 лет назад
Родитель
Сommit
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 );
+	} );
 } );