X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=test%2Fspec%2Fmkws-pazpar2.js;h=39a846163a8cf2a3e1f41cf5b8bd47e93622b719;hp=a410ca2ddca678b4d8717db5100f7a6c28df9519;hb=3352d2985a0abb5898b44cd6cb8e15f515995ae3;hpb=afc5059946f7230fc3552efd565f695568edea93 diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index a410ca2..39a8461 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -61,6 +61,12 @@ function init_jasmine_config() { // jenkins batch tests if (jasmine_config.batch_tuning) { var sec = mkws.getParameterByName("second", document.location); + + // run on localhost + if (!sec && document.location.href.match(/^http:\/\/localhost:4040/)) { + sec = 2000; + } + if (sec && parseInt(sec) >= 100) { jasmine_config.second = parseInt(sec); debug("longer timeouts for batch testing: " + jasmine_config.second); @@ -345,6 +351,19 @@ describe("Check active clients author", function () { } }); }); + + // avoid race conditions of source facets updates + it("wait a little bit for source facets", function () { + // wait a half second, to show the target view + var waittime = 0.5; + var time = (new Date).getTime(); + + waitsFor(function () { + return (new Date).getTime() - time > waittime * jasmine_config.second ? true : false; + }, "wait some miliseconds", (waittime + 0.5) * jasmine_config.second); + + runs(function () {}); + }); }); describe("Check Source Facets", function () {