Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach( () => {
element = document.createElement( 'div' );
document.body.appendChild( element );
clock = testUtils.sinon.useFakeTimers();
return BalloonEditor.create( element, {
plugins: [ Paragraph, MediaEmbed, MediaEmbedToolbar, FakeButton, Bold ],
balloonToolbar: [ 'bold' ],
media: {
toolbar: [ 'fake_button' ]
}
} ).then( _editor => {
editor = _editor;
model = editor.model;
widgetToolbarRepository = editor.plugins.get( 'WidgetToolbarRepository' );
toolbar = widgetToolbarRepository._toolbarDefinitions.get( 'mediaEmbed' ).view;
balloon = editor.plugins.get( 'ContextualBalloon' );
balloonToolbar = editor.plugins.get( 'BalloonToolbar' );
} );
} );