Bug 37273: Fix Cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
31789383aa
commit
bfd5939468
2 changed files with 32 additions and 29 deletions
|
@ -534,13 +534,14 @@ describe("Agreement CRUD operations", () => {
|
|||
"get-agreement"
|
||||
);
|
||||
cy.visit("/cgi-bin/koha/erm/agreements");
|
||||
let name_link = cy.get(
|
||||
"#agreements_list table tbody tr:first td:first a"
|
||||
);
|
||||
name_link.should(
|
||||
"have.text",
|
||||
agreement.name + " (#" + agreement.agreement_id + ")"
|
||||
);
|
||||
let id_cell = cy.get("#agreements_list table tbody tr:first td:first");
|
||||
id_cell.contains(agreement.agreement_id);
|
||||
|
||||
let name_link = cy
|
||||
.get("#agreements_list table tbody tr:first td")
|
||||
.eq(1)
|
||||
.find("a");
|
||||
name_link.should("have.text", agreement.name);
|
||||
name_link.click();
|
||||
cy.wait("@get-agreement");
|
||||
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
||||
|
@ -618,14 +619,14 @@ describe("Agreement CRUD operations", () => {
|
|||
cy.intercept("GET", "/api/v1/erm/agreements/*", agreement).as(
|
||||
"get-agreement"
|
||||
);
|
||||
cy.visit("/cgi-bin/koha/erm/agreements");
|
||||
let name_link = cy.get(
|
||||
"#agreements_list table tbody tr:first td:first a"
|
||||
);
|
||||
name_link.should(
|
||||
"have.text",
|
||||
agreement.name + " (#" + agreement.agreement_id + ")"
|
||||
);
|
||||
let id_cell = cy.get("#agreements_list table tbody tr:first td:first");
|
||||
id_cell.contains(agreement.agreement_id);
|
||||
|
||||
let name_link = cy
|
||||
.get("#agreements_list table tbody tr:first td")
|
||||
.eq(1)
|
||||
.find("a");
|
||||
name_link.should("have.text", agreement.name);
|
||||
name_link.click();
|
||||
cy.wait("@get-agreement");
|
||||
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
||||
|
|
|
@ -246,13 +246,14 @@ describe("License CRUD operations", () => {
|
|||
"get-license"
|
||||
);
|
||||
cy.visit("/cgi-bin/koha/erm/licenses");
|
||||
let name_link = cy.get(
|
||||
"#licenses_list table tbody tr:first td:first a"
|
||||
);
|
||||
name_link.should(
|
||||
"have.text",
|
||||
license.name + " (#" + license.license_id + ")"
|
||||
);
|
||||
let id_cell = cy.get("#licenses_list table tbody tr:first td:first");
|
||||
id_cell.contains(license.license_id);
|
||||
|
||||
let name_link = cy
|
||||
.get("#licenses_list table tbody tr:first td")
|
||||
.eq(1)
|
||||
.find("a");
|
||||
name_link.should("have.text", license.name);
|
||||
name_link.click();
|
||||
cy.wait("@get-license");
|
||||
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
||||
|
@ -323,13 +324,14 @@ describe("License CRUD operations", () => {
|
|||
"get-license"
|
||||
);
|
||||
cy.visit("/cgi-bin/koha/erm/licenses");
|
||||
let name_link = cy.get(
|
||||
"#licenses_list table tbody tr:first td:first a"
|
||||
);
|
||||
name_link.should(
|
||||
"have.text",
|
||||
license.name + " (#" + license.license_id + ")"
|
||||
);
|
||||
let id_cell = cy.get("#licenses_list table tbody tr:first td:first");
|
||||
id_cell.contains(license.license_id);
|
||||
|
||||
let name_link = cy
|
||||
.get("#licenses_list table tbody tr:first td")
|
||||
.eq(1)
|
||||
.find("a");
|
||||
name_link.should("have.text", license.name);
|
||||
name_link.click();
|
||||
cy.wait("@get-license");
|
||||
cy.wait(500); // Cypress is too fast! Vue hasn't populated the form yet!
|
||||
|
|
Loading…
Reference in a new issue