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

Commit

Permalink
Fixed test checking if balloon is positioned in correct moment.
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkups committed Feb 20, 2018
1 parent d49e417 commit b8bdf36
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/imagetextalternative.js
Expand Up @@ -14,7 +14,6 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
import global from '@ckeditor/ckeditor5-utils/src/dom/global';
import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
import priorities from '@ckeditor/ckeditor5-utils/src/priorities';

describe( 'ImageTextAlternative', () => {
let editor, model, view, doc, plugin, command, form, balloon, editorElement, button;
Expand Down Expand Up @@ -175,15 +174,12 @@ describe( 'ImageTextAlternative', () => {
setData( model, '[<image src=""></image>]' );
button.fire( 'execute' );

const spyBefore = sinon.spy();
const renderSpy = sinon.spy( view, '_render' );
const spy = sinon.spy( balloon, 'updatePosition' );
const spyAfter = sinon.spy();

view.on( 'render', spyBefore, { priority: priorities.get( 'low' ) + 1 } );
view.on( 'render', spyAfter, { priority: 'low' } );
view.fire( 'render' );

sinon.assert.callOrder( spyBefore, spy, spyAfter );
sinon.assert.callOrder( renderSpy, spy );
} );

it( 'should hide the form and focus editable when image widget has been removed by external change', () => {
Expand Down

0 comments on commit b8bdf36

Please sign in to comment.