function init_jasmine_config() {
var jasmine_config_default = {
+ // tune parameter for batch testing
+ batch_tuning: true,
+
search_query: "freebsd",
max_time: 17,
// in seconds
debug("jasmine config: " + key + " => " + jasmine_config[key]);
}
+ // 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);
+ }
+ }
+
mkws.jasmine_done = false;
};
}
});
});
+
+ // 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 () {