Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Test: Fix "srcset integration" test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Feb 26, 2020
1 parent 913c5ae commit 6688a2e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/imageresize.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ describe( 'ImageResize', () => {
} );

describe( 'srcset integration', () => {
beforeEach( () => createEditor() );

// The image is 96x96 pixels.
const imageBaseUrl = '/assets/sample.png';
let model;
Expand All @@ -330,6 +328,16 @@ describe( 'ImageResize', () => {
preloadImage( imageBaseUrl + '?b' ),
preloadImage( imageBaseUrl + '?c' )
] );
} );

after( () => {
for ( const image of images ) {
image.remove();
}
} );

beforeEach( async () => {
await createEditor();

editor.setData(
`<figure class="image">
Expand All @@ -345,12 +353,6 @@ describe( 'ImageResize', () => {
model = editor.model.document.getRoot().getChild( 0 );
} );

after( () => {
for ( const image of images ) {
image.remove();
}
} );

it( 'works with images containing srcset', () => {
const domParts = getWidgetDomParts( editor, widget, 'bottom-right' );
const initialPosition = getHandleCenterPoint( domParts.widget, 'bottom-right' );
Expand Down

0 comments on commit 6688a2e

Please sign in to comment.