check if we see at least one author link in facets
authorWolfram Schneider <wosch@indexdata.dk>
Tue, 24 Sep 2013 10:25:13 +0000 (10:25 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Tue, 24 Sep 2013 10:25:13 +0000 (10:25 +0000)
test/spec/mkws-pazpar2.js

index dd61707..7d8a563 100644 (file)
@@ -124,6 +124,8 @@ describe("Check Termlist", function () {
             return $("div#mkwsFacetSources").length == 1 ? true : false;
         }, "check for facet sources", 2 * 1000);
 
+
+        // everything displayed?
         runs(function () {
             var sources = $("div#mkwsFacetSources");
             debug("Termlist sources success: " + sources.length);
@@ -136,6 +138,13 @@ describe("Check Termlist", function () {
             expect(authors.length).toBe(1);
         });
 
+        waitsFor(function () {
+            return $("div#mkwsFacetAuthors div.term").length >= 2 ? true : false;
+        }, "At least one author link displayed", 2 * 1000);
+
+        runs(function () {
+            expect($("div#mkwsFacetAuthors div.term").length).toBeGreaterThan(1);
+        });
     });
 
     it("limit search to first author", function () {