Skip to content

Commit

Permalink
Fix image resize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Feb 9, 2024
1 parent 3608e7b commit 5396cc0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -87,7 +87,7 @@ describe( 'ImageResizeHandles', () => {
resizerMouseSimulator.dragTo( editor, domParts.resizeHandle, finalPointerPosition );

expect( spy.calledOnce ).to.be.true;
expect( spy.args[ 0 ][ 0 ] ).to.deep.equal( { width: '80px' } );
expect( spy.args[ 0 ][ 0 ] ).to.deep.equal( { width: '90px' } );
} );

it( 'disables the resizer if the command is disabled', async () => {
Expand Down Expand Up @@ -146,7 +146,7 @@ describe( 'ImageResizeHandles', () => {
resizerMouseSimulator.dragTo( editor, domParts.resizeHandle, finalPointerPosition );

expect( stub.calledOnce ).to.be.true;
expect( stub.args[ 0 ][ 0 ] ).to.deep.equal( { width: '80px' } );
expect( stub.args[ 0 ][ 0 ] ).to.deep.equal( { width: '90px' } );

expect( widget.hasClass( 'image_resized' ), 'CSS class' ).to.be.false;
expect( widget.hasStyle( 'width' ), 'width style' ).to.be.false;
Expand Down Expand Up @@ -564,7 +564,7 @@ describe( 'ImageResizeHandles', () => {
resizerMouseSimulator.dragTo( editor, domParts.resizeHandle, finalPointerPosition );

expect( spy.calledOnce ).to.be.true;
expect( spy.args[ 0 ][ 0 ] ).to.deep.equal( { width: '80px' } );
expect( spy.args[ 0 ][ 0 ] ).to.deep.equal( { width: '90px' } );
} );

it( 'disables the resizer if the command is disabled', async () => {
Expand Down Expand Up @@ -807,7 +807,7 @@ describe( 'ImageResizeHandles', () => {

resizerMouseSimulator.dragTo( editor, domParts.resizeHandle, finalPointerPosition );

sinon.assert.calledWithExactly( spy.firstCall, { width: '80px' } );
sinon.assert.calledWithExactly( spy.firstCall, { width: '90px' } );

await editor.destroy();
} );
Expand Down

0 comments on commit 5396cc0

Please sign in to comment.