From: Heikki Levanto Date: Fri, 7 Mar 2014 15:01:32 +0000 (+0100) Subject: Detect the case when no author is good enough to click. MKWS-137 X-Git-Tag: 1.0.0~1318^2~24 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=7ea430e024cd7ea2fa9d04bd9c4ebf3a2f3f4f12;p=mkws-moved-to-github.git Detect the case when no author is good enough to click. MKWS-137 Detects and logs the situation. Unfortunately, when that happens, the next test seems to fail... --- diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 50dfa94..3f3278b 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -256,7 +256,13 @@ describe("Check Termlist", function () { break; } } - + if ($("div.mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").text().length == 0) { + debug("No good authors found. Not clicking on the bad ones"); + return; + } + + debug("Clicking on author (" + author_number +") " + + $("div.mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").text() ); $("div.mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").trigger("click"); waitsFor(function () {