Akron | b43c8c6 | 2018-07-04 18:27:28 +0200 | [diff] [blame^] | 1 | define(['plugin/server','plugin/widget'], function (pluginServerClass, widgetClass) { |
| 2 | |
| 3 | describe('KorAP.Plugin.Server', function () { |
| 4 | |
| 5 | it('should be initializable', function () { |
| 6 | var manager = pluginServerClass.create(); |
| 7 | expect(manager).toBeTruthy(); |
| 8 | manager.destroy(); |
| 9 | }); |
| 10 | |
| 11 | it('should add a widget', function () { |
| 12 | var manager = pluginServerClass.create(); |
| 13 | var div = document.createElement("div"); |
| 14 | var id = manager.addWidget(div, 'about:blank'); |
| 15 | expect(id).toMatch(/^id-/); |
| 16 | expect(div.firstChild.tagName).toEqual("IFRAME"); |
| 17 | manager.destroy(); |
| 18 | }); |
| 19 | }); |
| 20 | |
| 21 | describe('KorAP.Plugin.Widget', function () { |
| 22 | it('should be initializable', function () { |
| 23 | var widget = widgetClass.create(); |
| 24 | expect(widget).toBeTruthy(); |
| 25 | }); |
| 26 | }); |
| 27 | |
| 28 | }); |