From: Wolfram Schneider Date: Mon, 16 Sep 2013 10:04:58 +0000 (+0000) Subject: waits longer for facet check, and use runs() function X-Git-Tag: 0.9.1~202^2~10 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=fce9a8f7e3f3e929ef93d2cd1845b7b63a07e02f;p=mkws-moved-to-github.git waits longer for facet check, and use runs() function --- diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 765980a..0d1b201 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -122,17 +122,20 @@ describe("Check Termlist", function () { waitsFor(function () { return $("div#mkwsFacetSources").length == 1 ? true : false; - }, "check for facet sourcs", 1 * 1000); + }, "check for facet sources", 2 * 1000); - var sources = $("div#mkwsFacetSources"); - debug("Termlist sources success: " + sources.length); - expect(sources.length).toBe(1); + runs(function () { + var sources = $("div#mkwsFacetSources"); + debug("Termlist sources success: " + sources.length); + expect(sources.length).toBe(1); + + var subjects = $("div#mkwsFacetSubjects"); + expect(subjects.length).toBe(1); - var subjects = $("div#mkwsFacetSubjects"); - expect(subjects.length).toBe(1); + var authors = $("div#mkwsFacetAuthors"); + expect(authors.length).toBe(1); + }); - var authors = $("div#mkwsFacetAuthors"); - expect(authors.length).toBe(1); }); it("limit search to first author", function () {