Explorar el Código

Added test for default limiter.

Oskar Wróbel hace 8 años
padre
commit
ba12c0e849
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      packages/ckeditor5-ui/tests/panel/balloon/balloonpanelview.js

+ 10 - 0
packages/ckeditor5-ui/tests/panel/balloon/balloonpanelview.js

@@ -486,6 +486,16 @@ describe( 'BalloonPanelView', () => {
 			// Still once.
 			expect( attachToSpy.calledOnce ).to.true;
 		} );
+
+		it( 'should set default limiter as document.body', () => {
+			view.keepAttachedTo( { target } );
+
+			expect( attachToSpy.calledOnce ).to.true;
+
+			document.body.dispatchEvent( new Event( 'scroll' ) );
+
+			expect( attachToSpy.calledTwice ).to.true;
+		} );
 	} );
 } );