describe("Check MOTD after search", function () {
it("MOTD is hidden", function () {
describe("Check MOTD after search", function () {
it("MOTD is hidden", function () {
expect($(".mkwsMOTD").length).toBe(1);
expect($(".mkwsMOTD").is(":hidden")).toBe(true);
debug("motd t=" + $(".mkwsMOTD").text());
expect($(".mkwsMOTD").length).toBe(1);
expect($(".mkwsMOTD").is(":hidden")).toBe(true);
debug("motd t=" + $(".mkwsMOTD").text());
describe("Check active clients author", function () {
it("check for active clients after limited author search", function () {
waitsFor(function () {
describe("Check active clients author", function () {
it("check for active clients after limited author search", function () {
waitsFor(function () {
// debug("clients: " + clients.text());
return clients.length == 1 && clients.text().match("/[1-9]+[0-9]*$");
}, "wait for Active clients: x/y", 5.5 * jasmine_config.second);
runs(function () {
// debug("clients: " + clients.text());
return clients.length == 1 && clients.text().match("/[1-9]+[0-9]*$");
}, "wait for Active clients: x/y", 5.5 * jasmine_config.second);
runs(function () {
expect(clients.text()).toMatch("/[1-9]+[0-9]*$");
// exact match of active clients (e.g. a SP misconfiguration)
expect(clients.text()).toMatch("/[1-9]+[0-9]*$");
// exact match of active clients (e.g. a SP misconfiguration)
//debug("clients: " + clients.text());
return clients.length == 1 && clients.text().match("/1$");
}, "wait for Active clients: x/1", 5 * jasmine_config.second);
runs(function () {
//debug("clients: " + clients.text());
return clients.length == 1 && clients.text().match("/1$");
}, "wait for Active clients: x/1", 5 * jasmine_config.second);
runs(function () {
expect(clients.text()).toMatch("/1$");
});
});
it("got a record", function () {
expect(clients.text()).toMatch("/1$");
});
});
it("got a record", function () {
describe("Show record", function () {
var record_number = 1; // the Nth record in hit list
it("show record author", function () {
describe("Show record", function () {
var record_number = 1; // the Nth record in hit list
it("show record author", function () {
debug("show record click is success: " + click.length);
expect(click.length).toBe(1);
// wait until the record pops up
waitsFor(function () {
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.details");
- //debug("poprecord: " + (show ? show.length : -1) + " " + $("div.mkwsRecords div.record").text());
+ var show = $("div.mkwsRecords div.mkwsSummary:nth-child(" + record_number + ") > div.mkwsDetails");
+ //debug("poprecord: " + (show ? show.length : -1) + " " + $("div.mkwsRecords div.mkwsSummary").text());
return show != null && show.length ? true : false;
}, "wait some miliseconds to show up a record", 2 * jasmine_config.second);
runs(function () {
debug("show record pop up");
return show != null && show.length ? true : false;
}, "wait some miliseconds to show up a record", 2 * jasmine_config.second);
runs(function () {
debug("show record pop up");
debug("number of extracted URL from record: " + urls.length);
// expect(urls.length).toBeGreaterThan(0); // LoC has records without links
for (var i = 0; i < urls.length; i++) {
debug("number of extracted URL from record: " + urls.length);
// expect(urls.length).toBeGreaterThan(0); // LoC has records without links
for (var i = 0; i < urls.length; i++) {
expect($("div.mkwsRecords").is(":visible")).toBe(false);
// wait a half second, to show the target view
expect($("div.mkwsRecords").is(":visible")).toBe(false);
// wait a half second, to show the target view