Skip to content

Instantly share code, notes, and snippets.

@ipeychev
Last active December 22, 2015 01:08
Show Gist options
  • Save ipeychev/6393994 to your computer and use it in GitHub Desktop.
Save ipeychev/6393994 to your computer and use it in GitHub Desktop.
Test USE after instantiation in ContentEditable (YUI Editor)
'test use after instantiation': function () {
editor.destroy();
var ce = new Y.Plugin.ContentEditable({
container: '#editor',
designMode: true,
content: 'This is a test.'
});
ce.render();
this.wait(function() {
ce.use('paginator');
this.wait(function () {
var inst = ce.getInstance();
Y.Assert.isInstanceOf(YUI, inst, 'Internal instance not created');
Y.Assert.isObject(inst.Paginator, 'Paginator Not loaded inside the frame');
}, 1500);
},
1500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment