it could take some milliseconds until the source facets appeared in termlist
[mkws-moved-to-github.git] / test / spec / mkws-pazpar2.js
index 96df2ab..765980a 100644 (file)
@@ -120,7 +120,12 @@ describe("Check Termlist", function () {
         debug("Termlist success: " + termlist.length);
         expect(termlist.length).toBe(1);
 
+        waitsFor(function () {
+            return $("div#mkwsFacetSources").length == 1 ? true : false;
+        }, "check for facet sourcs", 1 * 1000);
+
         var sources = $("div#mkwsFacetSources");
+        debug("Termlist sources success: " + sources.length);
         expect(sources.length).toBe(1);
 
         var subjects = $("div#mkwsFacetSubjects");