X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=test%2Fspec%2Fmkws-pazpar2.js;h=12677a802bff17b98fc2fd7ec1ee9ee399d34215;hb=4ded4703dd42e64d3e4bd253c1298c35dbb9da7f;hp=41ad086b8b9dbc4db8deddfcab01248576ab7fd5;hpb=03c57643aed47db6b974a3bd35b707c284e584a5;p=mkws-moved-to-github.git diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 41ad086..12677a8 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -75,6 +75,27 @@ describe("Init jasmine config", function () { }); }); +describe("Check MOTD before search", function () { + // Check that the MOTD has been moved into its container, and + // is visible before the search. + // the mkwsMOTD div was originally inside a testMOTD div, which should + // now be emtpy + // Note that the testMOTD is a regular div, and uses #testMOTD, + // since the automagic class-making does not apply to it. + it("MOTD is hidden", function () { + expect($(".mkwsMOTD").length).toBe(1); + expect($("#testMOTD").length).toBe(1); + expect($("#testMOTD").text()).toMatch("^ *$"); + }); + + it("mkwsMOTDContainer has received the text", function () { + expect($(".mkwsMOTDContainer").length).toBe(1); + expect($(".mkwsMOTDContainer").text()).toMatch(/MOTD/); + }); + + +}); + describe("Check pazpar2 search", function () { it("pazpar2 was successfully initialized", function () { expect(mkws_config.error).toBe(undefined); @@ -111,6 +132,18 @@ describe("Check pazpar2 search", function () { }); }); +describe("Check MOTD after search", function () { + it("MOTD is hidden", function () { + expect($(".mkwsMOTD").length).toBe(1); + expect($(".mkwsMOTD").is(":hidden")).toBe(true); + debug("motd " + $(".mkwsMOTD") ); + debug("motd t=" + $(".mkwsMOTD").text() ); + debug("motd v=" + $(".mkwsMOTD").is(":visible") ); + //expect($("div.mkwsBytarget").is(":visible")).toBe(true); + }); +}); + + /* * This part runs in background. It should be rewritten with