From: Wolfram Schneider Date: Tue, 24 Sep 2013 11:26:22 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws X-Git-Tag: 0.9.1~202^2 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=ebf56de9280402768922e39ac1580a9c1ac132f8;hp=d36482659c8c5320dbac98bd89825027c888d777 Merge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws --- diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index dd61707..643b415 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -57,6 +57,11 @@ describe("Check pazpar2 search", function () { }); +/* + * This part runs in background. It should be rewritten with + * async jasmine functions + * + */ describe("Check pazpar2 navigation", function () { // Asynchronous part it("check running search next/prev", function () { @@ -67,7 +72,7 @@ describe("Check pazpar2 navigation", function () { debug("trigger click on id: " + id); var click = $(id).trigger("click"); - debug("next click is success: " + click.length); + debug("next/prev: " + id + " click is success: " + click.length); expect(click.length).toBe(1); }, time * 1000); } @@ -124,6 +129,8 @@ describe("Check Termlist", function () { return $("div#mkwsFacetSources").length == 1 ? true : false; }, "check for facet sources", 2 * 1000); + + // everything displayed? runs(function () { var sources = $("div#mkwsFacetSources"); debug("Termlist sources success: " + sources.length); @@ -136,6 +143,13 @@ describe("Check Termlist", function () { expect(authors.length).toBe(1); }); + waitsFor(function () { + return $("div#mkwsFacetAuthors div.term").length >= 2 ? true : false; + }, "At least one author link displayed", 2 * 1000); + + runs(function () { + expect($("div#mkwsFacetAuthors div.term").length).toBeGreaterThan(1); + }); }); it("limit search to first author", function () { diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 0414414..51de2f9 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -391,7 +391,7 @@ function drawPager (pagerDiv) var prev = '<< ' + M('Prev') + ' | '; if (curPage > 1) - prev = '' + prev = '' +'<< ' + M('Prev') + ' | '; var middle = ''; @@ -436,7 +436,7 @@ mkws.pagerNext = function () { } } -function pagerPrev() { +mkws.pagerPrev = function () { if ( my_paz.showPrev() != false ) curPage--; }