if there are no "good" sources, ignore the source facet check. MKWS-137
[mkws-moved-to-github.git] / 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");