Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/mkws
authorMike Taylor <mike@indexdata.com>
Fri, 5 Jun 2015 08:36:49 +0000 (09:36 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 5 Jun 2015 08:36:49 +0000 (09:36 +0100)
src/mkws-widget-categories.js
test/bin/bomb
test/spec/mkws-pazpar2.js

index 8b2b00f..b9004c9 100644 (file)
@@ -7,6 +7,7 @@ mkws.registerWidgetType('categories', function() {
     });
 
     req.get(null, function(data) {
+      var $ = mkws.$;
       if (!$.isXMLDoc(data)) {
         alert("categories response document is not XML");
         return;
index c511b36..b706edf 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Copyright (c) 2014 Index Data ApS. http://indexdata.com
 #
 # bomb - wrapper to stop a process after N seconds
index 0f19add..f486ae1 100644 (file)
@@ -575,7 +575,7 @@ describe("Check translations", function () {
         expect(list.length).toBe(text.length);
 
         for (var i = 0; i < text.length; i++) {
-            expect($(list[i]).text()).toBe(M(text[i]));
+            expect($(list[i]).text().match(M(text[i]))).not.toBeNull();
         }
     }
 
@@ -673,8 +673,9 @@ describe("Check translations", function () {
 
         check_translation(list, text);
 
-        expect($(".mkws-next").text()).toBe(M("Next"));
-        expect($(".mkws-prev").text()).toBe(M("Prev"));
+        expect($(".mkws-next").text().match(M("Next"))).not.toBeNull();
+        expect($(".mkws-next").text().match(M("NextXXX"))).toBeNull();
+        expect($(".mkws-prev").text().match(M("Prev"))).not.toBeNull();
     });
 
     it("record details", function () {