From 201aef532e48d5389f89cfc33f6059278f57177c Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 28 Jan 2015 13:38:09 +0000 Subject: [PATCH] check translations, part navigation, MKWS-365 --- src/templates/pager.handlebars | 6 +++--- test/spec/mkws-pazpar2.js | 21 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/templates/pager.handlebars b/src/templates/pager.handlebars index 61768ed..0b3f953 100644 --- a/src/templates/pager.handlebars +++ b/src/templates/pager.handlebars @@ -14,9 +14,9 @@ pages: click - script to go to this page unless it is the current one }}
- {{mkws-translate "Displaying"}}: - {{first}} {{mkws-translate "to"}} {{last}} - {{mkws-translate "of"}} {{count}} ({{{mkws-translate "found"}}}: {{found}}) + {{mkws-translate "Displaying"}}: + {{first}} {{mkws-translate "to"}} {{last}} + {{mkws-translate "of"}} {{count}} ({{{mkws-translate "found"}}}: {{found}})
diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index e2ac07b..cb7e426 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -740,7 +740,10 @@ describe("Check SortBy options", function () { describe("Check translations", function () { var $ = mkws.$; - var M = mkws.M; + // handle html entities, "Zurück" => "Zurück" + var M = function (string) { + return $("").html(mkws.M(string)).text() + }; var lang = function () { return mkws.config.lang }; @@ -802,7 +805,7 @@ describe("Check translations", function () { } }); - it("facets", function () { + xit("facets", function () { var list = $(".mkws-facet-title"); expect(list.length).toBe(3); @@ -811,6 +814,20 @@ describe("Check translations", function () { expect($(list[1]).text()).toBe(M("Subjects")); expect($(list[2]).text()).toBe(M("Authors")); }); + + it("navigation", function () { + var list = $(".mkws-pager-desc > span"); + + expect(list.length).toBe(4); + + expect($(list[0]).text()).toBe(M("Displaying")); + expect($(list[1]).text()).toBe(M("to")); + expect($(list[2]).text()).toBe(M("of")); + expect($(list[3]).text()).toBe(M("found")); + + expect($(".mkws-next").text()).toBe(M("Next")); + expect($(".mkws-prev").text()).toBe(M("Prev")); + }); }); xdescribe("Check async widget discovery", function () { -- 1.7.10.4