runs(function () {
debug("Click on submit button");
- var click = $("input.mkwsButton").trigger("click");
- expect(click.length).toBe(1);
+ $("input.mkwsButton").trigger("click");
})
});
});
function my_click(id, time) {
setTimeout(function () {
debug("trigger click on id: " + id);
- var click = $(id).trigger("click");
-
- debug("next/prev: " + id + " click is success: " + click.length);
- expect(click.length).toBe(1);
+ $(id).trigger("click");
}, time * jasmine_config.second);
}
}
}
- var click = $("div.mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").trigger("click");
- debug("limit author click is success: " + click.length);
- expect(click.length).toBe(1);
+ $("div.mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").trigger("click");
waitsFor(function () {
return get_hit_counter() < hits_all_targets ? true : false;
}
}
- var click = $("div.mkwsFacetSources div.term:nth-child(" + source_number + ") a").trigger("click");
- debug("limit source click " + (source_number - 1) + " is success: " + click.length);
- expect(click.length).toBe(1);
-
+ $("div.mkwsFacetSources div.term:nth-child(" + source_number + ") a").trigger("click");
+
waitsFor(function () {
if ($("div.mkwsNavi").length && $("div.mkwsNavi").text().match(/(Source|datenquelle|kilder): /i)) {
return true;
describe("Show record", function () {
var record_number = 1; // the Nth record in hit list
it("show record author", function () {
- var click = $("div.mkwsRecords div.record:nth-child(" + record_number + ") a").trigger("click");
+ $("div.mkwsRecords div.record:nth-child(" + record_number + ") a").trigger("click");
+/* debug("### click=" + typeof(click) + " " + click );
+ debug("### len=" + click.length );
debug("show record click is success: " + click.length);
expect(click.length).toBe(1);
-
+*/
// wait until the record pops up
waitsFor(function () {
var show = $("div.mkwsRecords div.record:nth-child(" + record_number + ") div");
});
it("switch to target view", function () {
- var click = $("div.mkwsSwitch").children('a').eq(1).trigger("click");
- debug("target view click is success: " + click.length);
- expect(click.length).toBe(1);
+ $("div.mkwsSwitch").children('a').eq(1).trigger("click");
// now the target table must be visible
expect($("div.mkwsBytarget").is(":visible")).toBe(true);
});
it("switch back to record view", function () {
- var click = $("div.mkwsSwitch").children('a').eq(0).trigger("click");
- debug("record view click is success: " + click.length);
- expect(click.length).toBe(1);
+ $("div.mkwsSwitch").children('a').eq(0).trigger("click");
// now the target table must be visible
expect($("div.mkwsBytarget").is(":visible")).toBe(false);