add config option to disable "Check MOTD after search" test
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 25 Apr 2014 15:03:00 +0000 (15:03 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 25 Apr 2014 15:03:00 +0000 (15:03 +0000)
examples/htdocs/jasmine-local-popup.html
test/spec/mkws-pazpar2.js

index 9e9345e..739b373 100644 (file)
@@ -51,6 +51,7 @@
       search_query: "netbsd",
       expected_hits: 10,
       // active_clients: 17,
       search_query: "netbsd",
       expected_hits: 10,
       // active_clients: 17,
+      check_motd: false,
       show_record_url: true
     };
 
       show_record_url: true
     };
 
@@ -70,6 +71,5 @@ initially on "jsdemo" though now far removed from those beginnnings.
 [...]
     </pre>
 
 [...]
     </pre>
 
-    <div id="testMOTD"><div class="mkwsMOTD">This is the mkwsMOTD div</div></div>
   </body>
 </html>
   </body>
 </html>
index de82dfe..3433115 100644 (file)
@@ -36,6 +36,7 @@ function init_jasmine_config() {
         // miliseconds to seconds
         show_record_url: true,
         // check for valid URL in records
         // miliseconds to seconds
         show_record_url: true,
         // check for valid URL in records
+        check_motd: true,
         dummy: false
     };
 
         dummy: false
     };
 
@@ -138,6 +139,10 @@ describe("Check pazpar2 search", function () {
 
 describe("Check MOTD after search", function () {
     it("MOTD is hidden", 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());
         expect($(".mkwsMOTD").length).toBe(1);
         expect($(".mkwsMOTD").is(":hidden")).toBe(true);
         debug("motd t=" + $(".mkwsMOTD").text());