From fce9a8f7e3f3e929ef93d2cd1845b7b63a07e02f Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 16 Sep 2013 10:04:58 +0000 Subject: [PATCH] waits longer for facet check, and use runs() function --- test/spec/mkws-pazpar2.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 () { -- 1.7.10.4