-// global state object
-var jasmine_state = {
- time: 0
-};
-
-function my_click(id, time) {
- setTimeout(function () {
- debug("trigger click on id: " + id);
- $(id).trigger("click");
- }, time * 1000);
-}
-
-function found(time, none) {
- setTimeout(function () {
- jasmine_state.time = time;
-
- var found = $("#mkwsPager").html().match(/found: ([0-9]+)/);
-
- describe("pazpar2 hit count", function () {
- if (none) {
- it("no results yet", function () {
- expect(found).toBe(null);
- });
- } else {
- it("got results", function () {
- expect(found[0]).toMatch(/^[0-9]+$/);
- });
- }
- debug("mkws pager found records: " + (found != null ? found[0] : "unknown"));
- debug("time state: " + jasmine_state.time);
- });
-
- }, time * 1000);
-}
-