From 8d2e36a0a3df10e829a647d7488c609837049876 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 10 Mar 2014 14:23:13 +0000 Subject: [PATCH] Check for DOMSubtreeModified and a first link some browser sents 2 DOMSubtreeModified events, other only one. Make sure it will works for both, and check for the first link too. --- test/spec/mkws-pazpar2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); }); - }); }); -- 1.7.10.4