X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fspec%2Fmkws-pazpar2.js;h=002a7056693ff822d46af74511b1cb8b78be9fea;hb=53dc53783dfabd95a00a1a06472fe0982fa4ebf0;hp=77d9ba38a6a0628b11e3968aff3e032ff69ec179;hpb=ef657ef1632080dabd3bbe0b3d3fd372bc0ec6f7;p=mkws-moved-to-github.git diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 77d9ba3..002a705 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -4,8 +4,10 @@ * */ -var debug_level = mkws.debug_level; -var debug = mkws.debug_function; +// get references from mkws.js, lazy evaluation +var debug = function (text) { + mkws.debug_function(text) + } var get_hit_counter = function () { // not yet here @@ -44,10 +46,14 @@ describe("Check pazpar2 search", function () { debug("set search query: " + search_query) expect($("input#mkwsQuery").val()).toMatch("^" + search_query + "$"); - // wait for service proxy auth - waitsFor(function () { - return mkws.authenticated; - }, "SP auth done", 10 * 1000); + if (mkws_config.use_service_proxy) { + // wait for service proxy auth + waitsFor(function () { + return mkws.authenticated; + }, "SP auth done", 10 * 1000); + } else { + debug("running raw pp2, don't wait for mkws auth"); + } runs(function () { debug("Click on submit button"); @@ -224,6 +230,11 @@ describe("Show record", function () { }); it("extract URL", function () { + if (mkws_config.jasmine && mkws_config.jasmine.show_record_url == false) { + debug("ignore test for URL in record") + return; + } + var url = $("div#mkwsRecords div.record:nth-child(" + record_number + ") div table tbody tr td a").text(); debug("extracted URL from record: " + url); @@ -290,7 +301,7 @@ describe("Check status client counter", function () { }, "wait for Active clients: 0/1", 4 * 1000); - /* +/* runs(function () { var clients = $("div#mkwsStat span.clients"); debug("span.clients: " + clients.text());