we test now with 17 targets, MKWS-163
[mkws-moved-to-github.git] / test / spec / mkws-pazpar2.js
index 11b7e59..de82dfe 100644 (file)
@@ -28,7 +28,7 @@ function init_jasmine_config() {
 
     var jasmine_config_default = {
         search_query: "freebsd",
-        max_time: 16,
+        max_time: 17,
         // in seconds
         expected_hits: 80,
         // at least expected hit counter
@@ -62,9 +62,8 @@ var get_hit_counter = function () {
         if (RegExp.$1) {
             hits = parseInt(RegExp.$1);
             if (hits <= 0) {
-                debug("Oooops in get_hit_counter: " + RegExp.$1);
+                debug("Oooops in get_hit_counter: " + RegExp.$1 + " '" + found + "'");
             }
-            expect(hits).toBeGreaterThan(0);
         }
 
         //debug("Hits: " + hits);
@@ -285,14 +284,14 @@ describe("Check active clients author", function () {
     it("check for active clients after limited author search", function () {
         waitsFor(function () {
             var clients = $("div.mkwsStat span.clients");
-            //debug("clients: " + clients.text());
-            return clients.length == 1 && clients.text().match("/[1-9]+[0-9]+$");
-        }, "wait for Active clients: x/y", 5 * jasmine_config.second);
+            // debug("clients: " + clients.text());
+            return clients.length == 1 && clients.text().match("/[1-9]+[0-9]*$");
+        }, "wait for Active clients: x/y", 5.5 * jasmine_config.second);
 
         runs(function () {
             var clients = $("div.mkwsStat span.clients");
             debug("span.clients: " + clients.text());
-            expect(clients.text()).toMatch("/[1-9]+[0-9]+$");
+            expect(clients.text()).toMatch("/[1-9]+[0-9]*$");
 
             // exact match of active clients (e.g. a SP misconfiguration)
             if (jasmine_config.active_clients) {
@@ -366,7 +365,7 @@ describe("Check Source Facets", function () {
 
         runs(function () {
             var hits_single_target = get_hit_counter();
-            debug("get less hits for sources: " + hits_all_targets + " > " + hits_single_target);
+            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;