fix waitcount for per page
authorWolfram Schneider <wosch@indexdata.dk>
Wed, 9 Jul 2014 11:46:26 +0000 (11:46 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Wed, 9 Jul 2014 11:46:26 +0000 (11:46 +0000)
test/spec/mkws-pazpar2.js

index 4e92869..4ce2127 100644 (file)
@@ -639,15 +639,16 @@ describe("Check per page options", function () {
         });
 
         waitsFor(function () {
-            return waitcount >= (per_page_number * 2) ? true : false;
+            // debug("per page waitcounter: " + waitcount)
+            return waitcount >= (per_page_number + 10) ? true : false;
         }, "DOM change mkwsRecords, by per page", 3 * jasmine_config.second);
 
         runs(function () {
-            $("div.mkwsRecords").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
             debug("unbind per page");
+            $("div.mkwsRecords").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
 
             var records = $("div.mkwsRecords > div.mkwsSummary");
-            debug("Got now " + records.length + " records");
+            debug("Per page got now " + records.length + " records");
             expect(records.length).toBe(per_page_number);
         });
     });
@@ -703,7 +704,7 @@ describe("Check SortBy options", function () {
             debug("unbind by sort");
 
             var records = $("div.mkwsRecords > div.mkwsSummary a");
-            debug("Got now " + records.length + " records");
+            debug("Sort by got now " + records.length + " records");
             expect(records.length).toBe(per_page_number);
         });