X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=test%2Fspec%2Fmkws-pazpar2.js;h=10f33363de37be3906c99f506401dbd358a16d28;hp=eb25086c5ad6f6d9a5e1ef0c71a77e55d357ad38;hb=8111bf5133e4335ae1b14a79470d44b4c7003ce0;hpb=99f12f4cbd8c7a89b5b976fe2c1a7d40e4c5441e diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index eb25086..10f3336 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014 IndexData ApS. http://indexdata.com +/* Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com * * perform papzpar2 / pz2.js search & retrieve request in the browser * @@ -728,6 +728,17 @@ describe("Check SortBy options", function () { }); }); +describe("Check async widget discovery", function () { + var $ = mkws.$; + it("initialises a new widget", function() { + $("div.mkwsSearch").after('
'); + mkws.init("Another search box"); + // mkws.init("Another search box", "#asyncSearch"); + waitsFor(function () { + return $("#asyncSearch input").length >= 1 ? true : false; + }, "Call init() to build an .mkwsSearch", 750); + }); +}); /* done */ describe("All tests are done", function () {