if there are no "good" sources, ignore the source facet check. MKWS-137
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 7 Mar 2014 16:51:12 +0000 (16:51 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 7 Mar 2014 16:51:12 +0000 (16:51 +0000)
test/spec/mkws-pazpar2.js

index d042366..5074c4e 100644 (file)
@@ -289,6 +289,10 @@ describe("Check Termlist", function () {
                 break;
             }
         }
+        if ($("div.mkwsFacetSources div.term:nth-child(" + source_number + ") a").text().length == 0) {
+            debug("No good source found. Not clicking on the bad ones");
+            return;
+        }
 
         $("div.mkwsFacetSources div.term:nth-child(" + source_number + ") a").trigger("click");