X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=test%2Fspec%2Fmkws-pazpar2.js;h=9503683081ad0359a8d1f95fcf0acdaddc24cde2;hb=8d2e36a0a3df10e829a647d7488c609837049876;hp=7e180c31cd8060983cef76bcc9e0b5facbcde367;hpb=629f916bd15890ad6ac22d79fe45dbbd0286620c;p=mkws-moved-to-github.git diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index 7e180c3..9503683 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -321,6 +321,7 @@ describe("Check Termlist", function () { describe("Check record list", function () { it("got a record", function () { + var linkaddr = "div.mkwsRecords div.record:nth-child(1) a"; var waitcount = 0; // wait for new records @@ -330,14 +331,13 @@ describe("Check record list", function () { }); waitsFor(function () { - return waitcount; - }, "wait until we see a record", 1.5 * jasmine_config.second); + return waitcount > 0 && $(linkaddr).length > 0; + }, "wait until we see a new record", 2.2 * jasmine_config.second); runs(function () { expect(waitcount).toBeGreaterThan(0); $("div.mkwsRecords").unbind("DOMSubtreeModified"); }); - }); });