8
0
panr 5 лет назад
Родитель
Сommit
5d7799e7ca

+ 0 - 1
packages/ckeditor5-image/src/imageupload/ui/imageuploadpanelview.js

@@ -219,7 +219,6 @@ export default class ImageUploadPanelView extends View {
 	 * Returns a view of the integration.
 	 *
 	 * @param {string} name The name of the integration.
-	 *
 	 * @returns {module:ui/view~View}
 	 */
 	getIntegration( name ) {

+ 5 - 5
packages/ckeditor5-image/tests/imageupload/ui/imageuploadpanelview.js

@@ -178,7 +178,7 @@ describe( 'ImageUploadPanelView', () => {
 			} );
 			view.render();
 
-			sinon.assert.calledWithExactly( spy.getCall( 0 ), view._integrations.get( 0 ).element );
+			sinon.assert.calledWithExactly( spy.getCall( 0 ), view.getIntegration( 'insertImageViaUrl' ).element );
 			sinon.assert.calledWithExactly( spy.getCall( 1 ), view.insertButtonView.element );
 			sinon.assert.calledWithExactly( spy.getCall( 2 ), view.cancelButtonView.element );
 		} );
@@ -224,7 +224,7 @@ describe( 'ImageUploadPanelView', () => {
 
 			event.stopPropagation = spy;
 
-			view._integrations.get( 0 ).element.dispatchEvent( event );
+			view.getIntegration( 'insertImageViaUrl' ).element.dispatchEvent( event );
 			sinon.assert.calledOnce( spy );
 		} );
 
@@ -238,7 +238,7 @@ describe( 'ImageUploadPanelView', () => {
 
 				// Mock the url input is focused.
 				view.focusTracker.isFocused = true;
-				view.focusTracker.focusedElement = view._integrations.get( 0 ).element;
+				view.focusTracker.focusedElement = view.getIntegration( 'insertImageViaUrl' ).element;
 
 				const spy = sinon.spy( view.insertButtonView, 'focus' );
 
@@ -272,7 +272,7 @@ describe( 'ImageUploadPanelView', () => {
 
 	describe( 'focus()', () => {
 		it( 'should focus on the first integration', () => {
-			const spy = sinon.spy( view._integrations.get( 0 ), 'focus' );
+			const spy = sinon.spy( view.getIntegration( 'insertImageViaUrl' ), 'focus' );
 
 			view.focus();
 
@@ -282,7 +282,7 @@ describe( 'ImageUploadPanelView', () => {
 
 	describe( 'Insert image via URL integration input', () => {
 		it( 'should be bound with #imageURLInputValue', () => {
-			const form = view._integrations.get( 0 );
+			const form = view.getIntegration( 'insertImageViaUrl' );
 
 			form.fieldView.element.value = 'abc';
 			form.fieldView.fire( 'input' );