keep status of jasmine test in mkws.jasmine_done
[mkws-moved-to-github.git] / test / spec / mkws-pazpar2.js
index e8cb7c5..dd7a2ab 100644 (file)
@@ -42,6 +42,8 @@ function init_jasmine_config() {
         }
         debug("jasmine config: " + key + " => " + jasmine_config[key]);
     }
+
+    mkws.jasmine_done = false;
 }
 
 var get_hit_counter = function () {
@@ -180,7 +182,7 @@ describe("Check Termlist", function () {
 
         waitsFor(function () {
             return $("div#mkwsFacetSources").length == 1 ? true : false;
-        }, "check for facet sources", 2 * jasmine_config.second);
+        }, "check for facet sources", 4 * jasmine_config.second);
 
 
         // everything displayed?
@@ -306,10 +308,10 @@ describe("Show record", function () {
         debug("number of extracted URL from record: " + urls.length);
         for (var i = 0; i < urls.length; i++) {
             var url = $(urls[i]);
-            debug("URL: " + url.href);
-            expect(url.href).not.toBe(null);
-            expect(url.href).toMatch(/^https?:\/\/[a-z0-9]+\.[0-9a-z].*\//i);
-            expect(url.href).toBe(url.text());
+            debug("URL: " + url.attr('href'));
+            expect(url.attr('href')).not.toBe(null);
+            expect(url.attr('href')).toMatch(/^https?:\/\/[a-z0-9]+\.[0-9a-z].*\//i);
+            expect(url.attr('href')).toBe(url.text());
         }
     });
 });
@@ -384,7 +386,10 @@ describe("Check status client counter", function () {
 
 });
 
-/* dummy EOF */
+/* done */
 describe("All tests are done", function () {
-    it(">>> hooray <<<", function () {});
+    it(">>> hooray <<<", function () {
+        mkws.jasmine_done = true;
+    });
 });
+