Skip to content

Instantly share code, notes, and snippets.

@mlewand
Last active September 19, 2017 08:21
Show Gist options
  • Save mlewand/4b61bbd8540de0b1ecc00e0c99e12404 to your computer and use it in GitHub Desktop.
Save mlewand/4b61bbd8540de0b1ecc00e0c99e12404 to your computer and use it in GitHub Desktop.
CKEditor issue #895 unit test
/* bender-tags: editor */
/* bender-ckeditor-plugins: link,toolbar */
( function() {
'use strict';
bender.editor = {
config: {
autoParagraph: false,
extraAllowedContent: 'span[style];img[*]'
}
};
bender.test( {
// #859
'test create link (without editor focus)': function() {
var bot = this.editorBot;
bot.setData( '<p><a class="linkClass" href="linkUrl"><img src="someUrl"/>some button text</a>some text</p>', function() {
var editable = bot.editor.editable();
bot.editor.getSelection().selectElement( editable.findOne( 'a' ) );
bot.dialog( 'link', function( dialog ) {
assert.areSame( dialog.getValueOf( 'info', 'url' ), 'linkUrl' );
} );
} );
}
} );
} )();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment