From: Wolfram Schneider Date: Mon, 16 Sep 2013 09:37:57 +0000 (+0000) Subject: do not click on wikipedia source link - no author or subject facets possible X-Git-Tag: 0.9.1~202^2~12 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=18933bf2aff859ce769e5a53a33ab700c20bc8f9 do not click on wikipedia source link - no author or subject facets possible --- diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 3296144..96df2ab 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -150,9 +150,15 @@ describe("Check Termlist", function () { it("limit search to first source", function () { var hits_all_targets = get_hit_counter(); + var source_number = 2; // 2=first source + var source_name = $("div#mkwsFacetSources div.term:nth-child(" + source_number + ") a").text(); + // do not click on wikipedia link - no author or subject facets possible + if (source_name.match(/wikipedia/i)) { + source_number++; + } - var click = $("div#mkwsFacetSources div.term:nth-child(2) a").trigger("click"); - debug("limit source click is success: " + click.length); + var click = $("div#mkwsFacetSources div.term:nth-child(" + source_number + ") a").trigger("click"); + debug("limit source click " + (source_number - 1) + " is success: " + click.length); expect(click.length).toBe(1); waitsFor(function () {