blob: 62aa3c7dec21618b619b244029d31851bed89971 [file] [log] [blame]
define(['plugin/server','plugin/widget'], function (pluginServerClass, widgetClass) {
describe('KorAP.Plugin.Server', function () {
it('should be initializable', function () {
var manager = pluginServerClass.create();
expect(manager).toBeTruthy();
manager.destroy();
});
it('should add a widget', function () {
var manager = pluginServerClass.create();
var div = document.createElement("div");
var id = manager.addWidget(div, 'about:blank');
expect(id).toMatch(/^id-/);
expect(div.firstChild.classList.contains('widget')).toBeTruthy();
expect(div.firstChild.firstChild.tagName).toEqual("IFRAME");
manager.destroy();
});
});
describe('KorAP.Plugin.Widget', function () {
it('should be initializable', function () {
var widget = widgetClass.create();
expect(widget).toBeTruthy();
});
});
});