}
debug("jasmine config: " + key + " => " + jasmine_config[key]);
}
+
+ mkws.jasmine_done = false;
}
var get_hit_counter = function () {
waitsFor(function () {
return $("div#mkwsFacetSources").length == 1 ? true : false;
- }, "check for facet sources", 2 * jasmine_config.second);
+ }, "check for facet sources", 4 * jasmine_config.second);
// everything displayed?
it("limit search to first source", function () {
var hits_all_targets = get_hit_counter();
var source_number = 2; // 2=first source
-
// do not click on wikipedia link - no author or subject facets possible
var terms = $("div#mkwsFacetSources div.term a");
for (var i = 0; i < terms.length; i++) {
var urls = $("div#mkwsRecords div.record:nth-child(" + record_number + ") div table tbody tr td a");
debug("number of extracted URL from record: " + urls.length);
for (var i = 0; i < urls.length; i++) {
- debug("URL: " + urls[i].href);
- expect(urls[i].href).not.toBe(null);
- expect(urls[i].href).toMatch(/^https?:\/\/[a-z0-9]+\.[0-9a-z].*\//i);
- expect(urls[i].href).toBe(urls[i].text);
+ var url = $(urls[i]);
+ debug("URL: " + url.attr('href'));
+ expect(url.attr('href')).not.toBe(null);
+ expect(url.attr('href')).toMatch(/^https?:\/\/[a-z0-9]+\.[0-9a-z].*\//i);
+ expect(url.attr('href')).toBe(url.text());
}
});
});
});
-/* dummy EOF */
+/* done */
describe("All tests are done", function () {
- it(">>> hooray <<<", function () {});
+ it(">>> hooray <<<", function () {
+ mkws.jasmine_done = true;
+ });
});
+