+ jasmine_status.source_click = 1;
+
+ $(".mkwsPager").unbind("DOMNodeInserted DOMNodeRemoved propertychange");
+ });
+ });
+});
+
+
+describe("Check record list", function () {
+ it("check for single active client", function () {
+ if (!jasmine_status.source_click) {
+ debug("skip clients check due missing source click");
+ return;
+ }
+
+ waitsFor(function () {
+ var clients = $("div.mkwsStat span.clients");
+ //debug("clients: " + clients.text());
+ return clients.length == 1 && clients.text().match("/1$");
+ }, "wait for Active clients: x/1", 5 * jasmine_config.second);
+
+ runs(function () {
+ var clients = $("div.mkwsStat span.clients");
+ debug("span.clients: " + clients.text());
+ expect(clients.text()).toMatch("/1$");
+ });
+ });
+
+ it("got a record", function () {
+ var linkaddr = "div.mkwsRecords div.record:nth-child(1) a";
+
+ waitsFor(function () {
+ // remove + insert node: must be at least 2
+ return $(linkaddr).length > 0;
+ }, "wait until we see a new record", 2.5 * jasmine_config.second);
+
+ runs(function () {
+ expect($(linkaddr).length).toBeGreaterThan(0);