Răsfoiți Sursa

Tests: Fix stubbing for Edge test.

Krzysztof Krztoń 7 ani în urmă
părinte
comite
77842d1b68

+ 3 - 1
packages/ckeditor5-image/tests/imageupload/imageuploadediting.js

@@ -777,8 +777,10 @@ describe( 'ImageUploadEditing', () => {
 
 	it( 'should not upload and remove image when `File` constructor is not supported', done => {
 		if ( isEdgeEnv ) {
-			// Since on Edge `File` is already stubbed, restore it so that excpetion will be thrown.
+			// Since on Edge `File` is already stubbed, restore it to it native form so that exception will be thrown.
 			testUtils.sinon.restore();
+			// Since all stubs were restored, re-stub `scrollToTheSelection`.
+			testUtils.sinon.stub( editor.editing.view, 'scrollToTheSelection' ).callsFake( () => {} );
 		} else {
 			testUtils.sinon.stub( window, 'File' ).throws( 'Function expected.' );
 		}