Explorar o código

Tests: Added missing test for full CC.

Aleksander Nowodzinski %!s(int64=8) %!d(string=hai) anos
pai
achega
e793a9e867
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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 );
+	} );
 } );