1 /* Copyright (c) 2013-2014 Index Data ApS. http://indexdata.com
3 * perform papzpar2 / pz2.js search & retrieve request in the browser
7 // get references from mkws.js, lazy evaluation
8 var debug = function (text) {
9 // use a debug function with time stamps
10 mkws.teams["AUTO"].info("Jasmine: " + text);
12 //mkws.log("Jasmine: " + text)
15 // Define empty jasmine_config for simple applications that don't define it.
16 if (jasmine_config == null || typeof jasmine_config != 'object') {
17 var jasmine_config = {};
20 var jasmine_status = {
24 /* check config for jasmine test
26 * you can override the default values in the config
27 * object: jasmine_config = {};
30 function init_jasmine_config() {
32 var jasmine_config_default = {
33 search_query: "freebsd",
37 // at least expected hit counter
39 // miliseconds to seconds
40 show_record_url: true,
41 // check for valid URL in records
44 // check sort by and per page menu
50 // use default values for undefined values
51 for (var key in jasmine_config_default) {
52 if (!jasmine_config.hasOwnProperty(key)) {
53 jasmine_config[key] = jasmine_config_default[key];
55 debug("jasmine config: " + key + " => " + jasmine_config[key]);
58 mkws.jasmine_done = false;
61 function get_hit_counter() {
64 if ($(".mkws-pager").length == 0) return -1;
66 var found = $(".mkws-pager").text();
67 var re = /\([A-Za-z]+:\s+([0-9]+)\)/;
72 hits = parseInt(RegExp.$1);
74 debug("Oooops in get_hit_counter: " + RegExp.$1 + " '" + found + "'");
78 //debug("Hits: " + hits);
82 /******************************************************************************/
83 describe("Init jasmine config", function () {
84 it("jasmine was successfully initialized", function () {
85 init_jasmine_config();
87 expect(jasmine_config.search_query).toMatch(/\w/);
88 expect(jasmine_config.second).toBeGreaterThan(100);
89 expect(jasmine_config.max_time).toBeGreaterThan(1);
90 expect(jasmine_config.expected_hits).toBeGreaterThan(1);
95 xdescribe("Check MOTD before search", function () {
98 // Check that the MOTD has been moved into its container, and
99 // is visible before the search.
100 // the mkws-motd div was originally inside a testMOTD div, which should
102 // Note that the testMOTD is a regular div, and uses #testMOTD,
103 // since the automagic class-making does not apply to it.
104 it("MOTD is hidden", function () {
105 expect($(".mkws-motd").length).toBe(1);
106 expect($("#testMOTD").length).toBe(1);
107 expect($("#testMOTD").text()).toMatch("^ *$");
110 it("mkws-motd-container has received the text", function () {
111 expect($(".mkws-motd-container").length).toBe(1);
112 expect($(".mkws-motd-container").text()).toMatch(/MOTD/);
116 describe("Check pazpar2 search", function () {
119 it("pazpar2 was successfully initialized", function () {
120 expect(mkws.config.error).toBe(undefined);
123 it("validate HTML id's", function () {
124 expect($("input.mkws-query").length).toBe(1);
125 expect($("input.mkws-button").length).toBe(1);
127 expect($(".mkws-next").length).not.toBe(1);
128 expect($(".mkws-prev").length).not.toBe(1);
131 it("run search query", function () {
132 var search_query = jasmine_config.search_query; // short hit counter with some paging
133 $("input.mkws-query").val(search_query);
134 debug("set search query: " + search_query)
135 expect($("input.mkws-query").val()).toMatch("^" + search_query + "$");
137 if (mkws.config.use_service_proxy) {
138 // wait for service proxy auth
139 waitsFor(function () {
140 return mkws.authenticated;
141 }, "SP auth done", 10 * jasmine_config.second);
143 debug("running raw pp2, don't wait for mkws auth");
147 debug("Click on submit button");
148 $("input.mkws-button").trigger("click");
153 describe("Check MOTD after search", function () {
156 it("MOTD is hidden", function () {
157 if (!jasmine_config.check_motd) {
161 expect($(".mkws-motd").length).toBe(1);
162 expect($(".mkws-motd").is(":hidden")).toBe(true);
163 debug("motd t=" + $(".mkws-motd").text());
164 debug("motd v=" + $(".mkws-motd").is(":visible"));
170 * This part runs in background. It should be rewritten with
171 * async jasmine functions
174 describe("Check pazpar2 navigation", function () {
178 it("check running search next/prev", function () {
179 expect($(".mkws-pager").length).toBe(1);
181 function my_click(id, time) {
182 setTimeout(function () {
183 debug("trigger click on id: " + id);
184 $(id).trigger("click");
185 }, time * jasmine_config.second);
188 waitsFor(function () {
189 return $("div.mkws-pager div:nth-child(2) a").length >= 2 ? true : false;
190 }, "Expect next link 2", 10 * jasmine_config.second);
193 // click next/prev after N seconds
194 my_click(".mkws-next", 0);
197 waitsFor(function () {
198 return $("div.mkws-pager div:nth-child(2) a").length >= 3 ? true : false;
199 }, "Expect next link 3", 5 * jasmine_config.second);
202 // click next/prev after N seconds
203 my_click(".mkws-next", 0);
204 my_click(".mkws-prev", 0.2);
209 describe("Check pazpar2 hit counter", function () {
212 it("check running search hit counter", function () {
213 var max_time = jasmine_config.max_time; // in seconds
214 var expected_hits = jasmine_config.expected_hits; // at least expected hit counter
217 waitsFor(function () {
218 hits = get_hit_counter();
219 return hits > expected_hits;
220 }, "Expect " + expected_hits + " hits", max_time * jasmine_config.second);
223 debug("mkws pager found records: '" + hits + "'");
224 expect($(".mkws-pager").length).toBe(1);
225 expect(hits).toBeGreaterThan(expected_hits);
230 describe("Check Facets", function () {
233 it("found Facets", function () {
234 var facets = $("div.mkws-facets");
235 debug("Facet success: " + facets.length);
236 expect(facets.length).toBe(1);
238 waitsFor(function () {
239 return $("div.mkws-facet[data-mkws-facet='xtargets']").length == 1 ? true : false;
240 }, "check for facet sources", 4 * jasmine_config.second);
242 // everything displayed?
244 var sources = $("div.mkws-facet[data-mkws-facet='xtargets']");
245 debug("Facet sources success: " + sources.length);
246 expect(sources.length).toBe(1);
248 var subjects = $("div.mkws-facet[data-mkws-facet='subject']");
249 expect(subjects.length).toBe(1);
251 var authors = $("div.mkws-facet[data-mkws-facet='author']");
252 expect(authors.length).toBe(1);
255 waitsFor(function () {
256 return $("div.mkws-facet[data-mkws-facet='author'] div.mkws-term").length >= 2 ? true : false;
257 }, "At least two author link displayed", 4 * jasmine_config.second);
260 expect($("div.mkws-facet[data-mkws-facet='author'] div.mkws-term").length).toBeGreaterThan(1);
267 describe("Check Author Facets", function () {
270 it("limit search to first author", function () {
271 if (mkws.config.disable_facet_authors_search) {
272 debug("Facets: ignore limit search for authors");
276 var hits_all_targets = get_hit_counter();
277 var author_number = 2; // 2=first author
278 // do not click on author with numbers, e.g.: "Bower, James M. Beeman, David, 1938-"
279 // do not click on author names without a comma, e.g.: "Joe Barbara"
280 // because searching on such authors won't find anything.
282 var terms = $("div.mkws-facet[data-mkws-facet='author'] div.mkws-term a");
283 for (var i = 0; i < terms.length; i++) {
284 var term = $(terms[i]).text();
285 if (term.match(/[0-9].+[0-9]/i) || !term.match(/,/)) {
286 debug("ignore author facet: " + term);
292 if ($("div.mkws-facet[data-mkws-facet='author'] div.mkws-term:nth-child(" + author_number + ") a").text().length == 0) {
293 debug("No good authors found. Not clicking on the bad ones");
297 debug("Clicking on author (" + author_number + ") " + $("div.mkws-facet[data-mkws-facet='author'] div.mkws-term:nth-child(" + author_number + ") a").text());
298 $("div.mkws-facet[data-mkws-facet='author'] div.mkws-term:nth-child(" + author_number + ") a").trigger("click");
301 waitsFor(function () {
302 var hits_single_target = get_hit_counter();
303 // debug("hits_single_target='" + hits_single_target + "' cf. hits_all_targets='" + hits_all_targets + "'");
304 return hits_single_target > 0 && hits_single_target < hits_all_targets ? true : false;
305 }, "Limited author search for less than " + hits_all_targets + " hits", 4.5 * jasmine_config.second);
308 var hits_single_target = get_hit_counter();
309 debug("get less hits for authors: " + hits_all_targets + " > " + hits_single_target);
314 describe("Check active clients author", function () {
317 it("check for active clients after limited author search", function () {
318 waitsFor(function () {
319 var clients = $("div.mkws-stat span.mkws-client-count");
320 // debug("clients: " + clients.text());
321 return clients.length == 1 && clients.text().match("/[1-9]+[0-9]*$");
322 }, "wait for Active clients: x/y", 5.5 * jasmine_config.second);
325 var clients = $("div.mkws-stat span.mkws-client-count");
326 debug("span.mkws-client-count: " + clients.text());
327 expect(clients.text()).toMatch("/[1-9]+[0-9]*$");
329 // exact match of active clients (e.g. a SP misconfiguration)
330 if (jasmine_config.active_clients) {
331 debug("check for " + jasmine_config.active_clients + " active connections");
332 expect(clients.text()).toMatch(" [0-9]+/" + jasmine_config.active_clients + "$");
338 describe("Check Source Facets", function () {
341 it("limit search to first source", function () {
342 var hits_all_targets = get_hit_counter();
343 var source_number = 2; // 2=first source
344 // wait for a stat response
346 // do not click on wikipedia link - no author or subject facets possible
347 var link = "div.mkws-facet[data-mkws-facet='xtargets'] div.mkws-term a";
349 // wait for a visible source link in facets
350 waitsFor(function () {
352 return terms && terms.length > 0;
353 }, "wait for source facets after author search", 5 * jasmine_config.second);
358 for (var i = 0; i < terms.length; i++) {
359 var term = $(terms[i]).text();
360 debug("check for good source: " + term);
362 if (term.match(/wikipedia/i)) {
363 debug("ignore source facet: " + term);
369 debug("Source counter: " + terms.length + ", select: " + (source_number - 1));
371 if ($("div.mkws-facet[data-mkws-facet='xtargets'] div.mkws-term:nth-child(" + source_number + ") a").text().length == 0) {
372 debug("No good source found. Not clicking on the bad ones");
376 debug("click on source link nth-child(): " + source_number);
377 $("div.mkws-facet[data-mkws-facet='xtargets'] div.mkws-term:nth-child(" + source_number + ") a").trigger("click");
379 $(".mkws-pager").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
381 debug("DOM change mkws-pager, for stat: " + waitcount);
385 waitsFor(function () {
386 if ($("div.mkws-navi").length && $("div.mkws-navi").text().match(/(Source|datenquelle|kilder): /i)) {
391 }, "Search for source in navi bar", 4 * jasmine_config.second);
393 // Note: it may happens that limited source search returns the same number of hits
394 // as before. Thats not really an error, but unfortunate
395 waitsFor(function () {
396 var hits_single_target = get_hit_counter();
398 return waitcount >= 2 && hits_single_target > 0 && hits_single_target <= hits_all_targets ? true : false;
399 }, "Limited source search for less than " + hits_all_targets + " hits", 5 * jasmine_config.second);
402 var hits_single_target = get_hit_counter();
403 debug("get less hits for sources: " + hits_all_targets + " >= " + hits_single_target);
404 expect(hits_all_targets).not.toBeLessThan(hits_single_target);
405 jasmine_status.source_click = 1;
407 $(".mkws-pager").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
413 describe("Check record list", function () {
416 it("check for single active client", function () {
417 if (!jasmine_status.source_click) {
418 debug("skip clients check due missing source click");
422 waitsFor(function () {
423 var clients = $("div.mkws-stat span.mkws-client-count");
424 //debug("clients: " + clients.text());
425 return clients.length == 1 && clients.text().match("/1$");
426 }, "wait for Active clients: x/1", 5 * jasmine_config.second);
429 var clients = $("div.mkws-stat span.mkws-client-count");
430 debug("span.mkws-client-count: " + clients.text());
431 expect(clients.text()).toMatch("/1$");
435 it("got a record", function () {
436 var linkaddr = "div.mkws-records div.mkws-summary:nth-child(1) a";
438 waitsFor(function () {
439 // remove + insert node: must be at least 2
440 return $(linkaddr).length > 0;
441 }, "wait until we see a new record", 2.5 * jasmine_config.second);
444 expect($(linkaddr).length).toBeGreaterThan(0);
449 describe("Show record", function () {
452 var record_number = 1; // the Nth record in hit list
453 it("show record author", function () {
454 var click = $("div.mkws-records div.mkws-summary:nth-child(" + record_number + ") a").trigger("click");
455 debug("show record click is success: " + click.length);
456 expect(click.length).toBe(1);
458 // wait until the record pops up
459 waitsFor(function () {
460 var show = $("div.mkws-records div.mkws-summary:nth-child(" + record_number + ") > div.mkws-details");
461 //debug("poprecord: " + (show ? show.length : -1) + " " + $("div.mkws-records div.mkws-summary").text());
462 return show != null && show.length ? true : false;
463 }, "wait some miliseconds to show up a record", 2 * jasmine_config.second);
466 debug("show record pop up");
467 expect($("div.mkws-records div.mkws-summary:nth-child(" + record_number + ") div")).not.toBe(null);
471 it("extract URL", function () {
472 if (jasmine_config.show_record_url == false) {
473 debug("ignore test for URL in record")
477 var urls = $("div.mkws-records div.mkws-summary:nth-child(" + record_number + ") div table tbody tr td a");
478 debug("number of extracted URL from record: " + urls.length);
479 // expect(urls.length).toBeGreaterThan(0); // LoC has records without links
480 for (var i = 0; i < urls.length; i++) {
481 var url = $(urls[i]);
482 debug("URL: " + url.attr('href') + " text: " + url.text());
484 expect(url.attr('href')).not.toBe(null);
485 expect(url.attr('href')).toMatch(/^https?:\/\/[a-z0-9\-]+\.[0-9a-z].*\//i);
486 expect(url.text()).not.toBe("");
491 describe("Check switch menu Records/Targets", function () {
494 it("check mkws-switch", function () {
495 expect($("div.mkws-switch").length).toBe(1);
497 // expect 2 clickable links
498 expect($("div.mkws-switch > a").length).toBe(2);
501 it("switch to target view", function () {
502 $("div.mkws-switch > a").eq(1).trigger("click");
504 // now the target table must be visible
505 expect($("div.mkws-targets").is(":visible")).toBe(true);
506 expect($("div.mkws-records").is(":visible")).toBe(false);
508 // wait a half second, to show the target view
509 var time = (new Date).getTime();
510 waitsFor(function () {
511 return (new Date).getTime() - time > 700 ? true : false;
512 }, "wait some miliseconds", 1 * jasmine_config.second);
514 // look for table header
516 expect($("div.mkws-targets").html()).toMatch(/Target ID/);
520 it("switch back to record view", function () {
521 $("div.mkws-switch > a").eq(0).trigger("click");
523 // now the target table must be visible
524 expect($("div.mkws-targets").is(":visible")).toBe(false);
525 expect($("div.mkws-records").is(":visible")).toBe(true);
529 describe("Check status client counter", function () {
532 function get_time() {
533 var date = new Date();
534 return date.getTime();
536 var time = get_time();
538 it("check status clients", function () {
539 if (!jasmine_status.source_click) {
540 debug("skip clients check due missing source click");
544 waitsFor(function () {
545 var clients = $("div.mkws-stat span.mkws-client-count");
546 debug("clients: " + clients.text());
547 if (clients.length == 1 && clients.text().match("0/1$")) {
552 }, "wait for Active clients: 0/1", 4 * jasmine_config.second);
555 var clients = $("div.mkws-stat span.mkws-client-count");
556 debug("span.mkws-client-count: " + clients.text());
557 expect(clients.text()).toMatch("0/1$");
562 /* remove the "source" and "author" facet link to get more records again */
563 describe("Check removable facets links", function () {
566 it("remove links for source and author", function () {
568 if (!jasmine_config.check_sortby) {
569 debug("ignore check for removable facets");
575 var click = $("a.mkws-removable").eq(0).trigger("click");
576 debug("Removed first facets link: " + click.length);
577 expect(click.length).toBe(1);
581 $("div.mkws-records").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
583 if (waitcount <= 5 || (waitcount % 5 == 0)) {
584 debug("DOM change mkws-records for removeable: " + waitcount);
589 waitsFor(function () {
590 return waitcount >= 2 && $("a.mkws-removable").length == 1 ? 1 : 0;
591 }, "Records DOM change mkws-records, removable", 2 * jasmine_config.second);
594 debug("unbind removable");
595 $("div.mkws-records").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
598 $("div.mkws-records").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
600 if (waitcount <= 5 || (waitcount % 5 == 0)) {
601 debug("DOM change mkws-records for removeable2: " + waitcount);
605 var click = $("a.mkws-removable").eq(0).trigger("click");
606 debug("Removed second facets link: " + click.length);
607 expect(click.length).toBe(1);
610 waitsFor(function () {
611 return waitcount >= 2 && $("a.mkws-removable").length == 0 ? true : false;
612 }, "DOM change mkws-records, removable2", 2 * jasmine_config.second);
615 debug("unbind removable2");
616 $("div.mkws-records").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
622 describe("Check per page options", function () {
625 it("show per page", function () {
626 if (!jasmine_config.check_sortby) {
627 debug("ignore check for per page select");
631 var per_page_number = 20;
635 var select = $("select.mkws-perpage option[selected='selected']");
636 debug("per page default is: " + select.text() + " and unselect it");
637 select.removeAttr('selected');
639 select = $("select.mkws-perpage option[value='" + per_page_number + "']").attr('selected', true);
640 debug("per page is set to: " + select.text());
641 select.trigger("change");
643 $("div.mkws-records").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
645 if (waitcount <= 5 || (waitcount % 10 == 0)) {
646 debug("DOM change mkws-records, per page: " + waitcount);
651 waitsFor(function () {
652 // debug("per page waitcounter: " + waitcount)
653 return waitcount >= (per_page_number + 10) ? true : false;
654 }, "DOM change mkws-records, by per page", 3 * jasmine_config.second);
657 debug("unbind per page");
658 $("div.mkws-records").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
660 var records = $("div.mkws-records > div.mkws-summary");
661 debug("Per page got now " + records.length + " records");
662 expect(records.length).toBe(per_page_number);
667 describe("Check SortBy options", function () {
670 it("show per page", function () {
671 if (!jasmine_config.check_sortby) {
672 debug("ignore check for sort by");
677 var sort_value = 'title:1';
678 var per_page_number = 20;
680 // keep current title list
681 var title_list_old = title_list("xxx ");
683 function title_list(prefix) {
685 var terms = $("div.mkws-records > div.mkws-summary > div.mkws-field-data span.mkws-field-title");
686 for (var i = 0; i < terms.length; i++) {
687 var term = $(terms[i]).text().trim();
689 // debug(prefix + "title: " + term);
695 $("div.mkws-records").bind("DOMNodeInserted DOMNodeRemoved propertychange", function () {
697 if (waitcount <= 5 || (waitcount % 10 == 0)) {
698 debug("DOM change mkws-records, sort by: " + waitcount);
702 var select = $("select.mkws-sort option[selected='selected']");
703 debug("Sort by default is: " + select.text() + " and unselect it");
704 select.removeAttr('selected');
706 select = $("select.mkws-sort option[value='" + sort_value + "']").attr('selected', true);
707 debug("sort by is set to: " + select.text());
708 select.trigger("change");
711 waitsFor(function () {
712 //debug("wait for2: " + waitcount);
713 return waitcount >= (per_page_number + 10) ? true : false;
714 }, "DOM change mkws-records, by sort page", 3 * jasmine_config.second);
717 $("div.mkws-records").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
718 debug("unbind by sort");
720 var records = $("div.mkws-records > div.mkws-summary");
721 debug("Sort by got now " + records.length + " records");
722 expect(records.length).toBe(per_page_number);
726 var title_list_new = title_list("yyy ");
728 for (var i = 0; i < title_list_old.length; i++) {
729 debug((i + 1) + ". " + title_list_old[i] + " :: " + title_list_new[i]);
731 if (title_list_old[i] != title_list_new[i]) {
735 debug("Title changes: " + diff_flag + " out of " + per_page_number);
736 expect(diff_flag).not.toBe(0);
741 describe("Check translations", function () {
744 // handle html entities, "Zurück" => "Zurück"
745 var M = function (string) {
746 var text = $("<span/>").html(mkws.M(string)).text()
747 debug("translate check for: " + text);
750 var lang = function () {
751 return mkws.config.lang
754 it("check language", function () {
755 var lang = mkws.config.lang;
756 debug("lang: " + lang);
757 expect(lang).toMatch(/^(de|da|)$/);
763 "Authors": "Autoren",
764 "Subjects": "Schlagwörter",
765 "Sources": "Daten und Quellen",
766 "source": "datenquelle",
767 "Facets": "Termlisten",
769 "Prev": "Zurück",
771 "Sort by": "Sortieren nach",
772 "and show": "und zeige",
773 "per page": "pro Seite",
774 "Displaying": "Zeige",
782 "Subject": "Schlagwort",
783 "subject": "schlagwort",
785 "Records": "Datensätze",
786 "Targets": "Datenbanken",
792 it("search button", function () {
793 var list = $(".mkws-switch > a")
795 expect(list.length).toBe(2);
796 expect($(list[0]).text()).toBe(M("Records"));
797 expect($(list[1]).text()).toBe(M("Targets"));
800 it("switch", function () {
801 var list = $(".mkws-pager-desc > span");
802 expect($("form > input[type=submit]").attr("value")).toBe(M("Search"));
806 it("ranking form", function () {
807 var list = $(".mkws-ranking > form > span");
809 expect(list.length).toBe(3);
811 expect($(list[0]).text()).toBe(M("Sort by"));
812 expect($(list[1]).text()).toBe(M("and show"));
813 expect($(list[2]).text()).toBe(M("per page"));
817 expect("Sortieren nach").toBe(M("Sort by"));
818 expect("Sortieren nach").toBe($(list[0]).text());
819 } else if (lang == "da") {
820 expect("Sorter efter").toBe(M("Sort by"));
821 expect("Sorter efter").toBe($(list[0]).text());
825 xit("facets sidebar", function () {
826 var list = $(".mkws-facet-title");
828 expect(list.length).toBe(3);
830 expect($(list[0]).text()).toBe(M("Sources"));
831 expect($(list[1]).text()).toBe(M("Subjects"));
832 expect($(list[2]).text()).toBe(M("Authors"));
835 it("facets navigation/filter", function () {
836 var list = $(".mkws-navi > span");
838 expect(list.length).toBe(2);
840 expect($(list[0]).text()).toBe(M("source"));
841 expect($(list[1]).text()).toBe(M("author"));
844 it("navigation", function () {
845 var list = $(".mkws-pager-desc > span");
847 expect(list.length).toBe(4);
849 expect($(list[0]).text()).toBe(M("Displaying"));
850 expect($(list[1]).text()).toBe(M("to"));
851 expect($(list[2]).text()).toBe(M("of"));
852 expect($(list[3]).text()).toBe(M("found"));
854 expect($(".mkws-next").text()).toBe(M("Next"));
855 expect($(".mkws-prev").text()).toBe(M("Prev"));
861 xdescribe("Check async widget discovery", function () {
863 it("initialises a new widget", function () {
864 $("div.mkws-search").after('<div id="asyncSearch"><div class="mkws-search mkws-team-async"></div></div>');
865 mkws.init("Another search box", "#asyncSearch");
866 waitsFor(function () {
867 return $("#asyncSearch input").length >= 1 ? true : false;
868 }, "Call init() to build an .mkws-search", 750);
870 var numInput = $("div.mkws-search input").length;
871 debug("Input elements present: " + numInput);
872 expect(numInput).toBe(4);
873 var numRec = $("div.mkws-records > div.mkws-summary").length;
874 debug("Records should still be present. There are: " + numRec);
875 expect(numRec).toBeGreaterThan(0);
881 describe("All tests are done", function () {
882 it(">>> hooray <<<", function () {
883 mkws.jasmine_done = true;
884 debug(">>> hooray <<<");