|
|
@@ -300,7 +300,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
it( 'should use read data once it is present', done => {
|
|
|
const file = createNativeFileMock();
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
model.once( '_change', () => {
|
|
|
expect( getViewData( view ) ).to.equal(
|
|
|
@@ -320,7 +320,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
it( 'should replace read data with server response once it is present', done => {
|
|
|
const file = createNativeFileMock();
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
model.document.once( 'change', () => {
|
|
|
model.document.once( 'change', () => {
|
|
|
@@ -351,7 +351,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
}, { priority: 'high' } );
|
|
|
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
nativeReaderMock.mockError( 'Reading error.' );
|
|
|
} );
|
|
|
@@ -367,7 +367,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
}, { priority: 'high' } );
|
|
|
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
nativeReaderMock.abort();
|
|
|
|
|
|
setTimeout( () => {
|
|
|
@@ -391,7 +391,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
} );
|
|
|
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
sinon.assert.calledOnce( loadSpy );
|
|
|
|
|
|
@@ -428,7 +428,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
evt.stop();
|
|
|
}, { priority: 'high' } );
|
|
|
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
model.document.once( 'change', () => {
|
|
|
model.document.once( 'change', () => {
|
|
|
@@ -445,7 +445,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
it( 'should abort upload if image is removed', () => {
|
|
|
const file = createNativeFileMock();
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
const abortSpy = testUtils.sinon.spy( loader, 'abort' );
|
|
|
|
|
|
@@ -464,7 +464,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
it( 'should not abort and not restart upload when image is moved', () => {
|
|
|
const file = createNativeFileMock();
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
const abortSpy = testUtils.sinon.spy( loader, 'abort' );
|
|
|
const loadSpy = testUtils.sinon.spy( loader, 'read' );
|
|
|
@@ -489,7 +489,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
evt.stop();
|
|
|
}, { priority: 'high' } );
|
|
|
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
model.document.once( 'change', () => {
|
|
|
// This is called after "manual" remove.
|
|
|
@@ -525,7 +525,7 @@ describe( 'ImageUploadEditing', () => {
|
|
|
it( 'should create responsive image if server return multiple images', done => {
|
|
|
const file = createNativeFileMock();
|
|
|
setModelData( model, '<paragraph>{}foo bar</paragraph>' );
|
|
|
- editor.execute( 'imageUpload', { file } );
|
|
|
+ editor.execute( 'imageUpload', { files: file } );
|
|
|
|
|
|
model.document.once( 'change', () => {
|
|
|
model.document.once( 'change', () => {
|