X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=test%2Fspec%2Fmkws-pazpar2.js;h=2e49726215d7e0a28e5de5fab380521137bc7783;hb=2dc4cb569b76707f3ac0b23bf53d64ee5c98130b;hp=eb25086c5ad6f6d9a5e1ef0c71a77e55d357ad38;hpb=19777b46905bc25b666eba4e37bacd76ffac91eb;p=mkws-moved-to-github.git diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index eb25086..2e49726 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -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 () {