From 2727ad6eee0eba75cbd1b42045beb39722a22ada Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 7 Apr 2014 18:03:27 +0000 Subject: [PATCH] if the source click fails, skip all tests which test for a single active connection --- test/spec/mkws-pazpar2.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 2dab391..89176ef 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -14,6 +14,10 @@ if (jasmine_config == null || typeof jasmine_config != 'object') { var jasmine_config = {}; } +var jasmine_status = { + source_click: 0 +}; + /* check config for jasmine test * * you can override the default values in the config @@ -314,6 +318,7 @@ describe("Check Termlist", function () { var hits_single_target = get_hit_counter(); debug("get less hits for sources: " + hits_all_targets + " > " + hits_single_target); expect(hits_all_targets).not.toBeLessThan(hits_single_target); + jasmine_status.source_click = 1; $(".mkwsPager").unbind("DOMNodeInserted DOMNodeRemoved propertychange"); }); @@ -323,6 +328,11 @@ describe("Check Termlist", function () { describe("Check record list", function () { it("check for single active client", function () { + if (!jasmine_status.source_click) { + debug("skip clients check due missing source click"); + return; + } + waitsFor(function () { var clients = $("div#mkwsStat span.clients"); //debug("clients: " + clients.text()); @@ -436,6 +446,11 @@ describe("Check status client counter", function () { var time = get_time(); it("check status clients", function () { + if (!jasmine_status.source_click) { + debug("skip clients check due missing source click"); + return; + } + waitsFor(function () { var clients = $("div#mkwsStat span.clients"); debug("clients: " + clients.text()); -- 1.7.10.4