Update test to look for mkwsTargets rather than mkwsBytarget, which
[mkws-moved-to-github.git] / test / spec / mkws-pazpar2.js
index de82dfe..0affaac 100644 (file)
@@ -36,6 +36,7 @@ function init_jasmine_config() {
         // miliseconds to seconds
         show_record_url: true,
         // check for valid URL in records
+        check_motd: true,
         dummy: false
     };
 
@@ -138,6 +139,10 @@ describe("Check pazpar2 search", function () {
 
 describe("Check MOTD after search", function () {
     it("MOTD is hidden", function () {
+        if (!jasmine_config.check_motd) {
+            return;
+        }
+
         expect($(".mkwsMOTD").length).toBe(1);
         expect($(".mkwsMOTD").is(":hidden")).toBe(true);
         debug("motd t=" + $(".mkwsMOTD").text());
@@ -461,7 +466,7 @@ describe("Check switch menu Records/Targets", function () {
         $("div.mkwsSwitch").children('a').eq(1).trigger("click");
 
         // now the target table must be visible
-        expect($("div.mkwsBytarget").is(":visible")).toBe(true);
+        expect($("div.mkwsTargets").is(":visible")).toBe(true);
         expect($("div.mkwsRecords").is(":visible")).toBe(false);
 
         // wait a half second, to show the target view
@@ -472,7 +477,7 @@ describe("Check switch menu Records/Targets", function () {
 
         // look for table header
         runs(function () {
-            expect($("div.mkwsBytarget").html()).toMatch(/Target ID/);
+            expect($("div.mkwsTargets").html()).toMatch(/Target ID/);
         });
     });
 
@@ -480,7 +485,7 @@ describe("Check switch menu Records/Targets", function () {
         $("div.mkwsSwitch").children('a').eq(0).trigger("click");
 
         // now the target table must be visible
-        expect($("div.mkwsBytarget").is(":visible")).toBe(false);
+        expect($("div.mkwsTargets").is(":visible")).toBe(false);
         expect($("div.mkwsRecords").is(":visible")).toBe(true);
     });
 });