Bug 40067: Improve waits and intercepts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 688b5961c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-06-05 16:29:15 +02:00 committed by Paul Derscheid
parent e692023eb0
commit 893bd2af71
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 5 additions and 2 deletions

View File

@ -15,18 +15,21 @@ describe("Sticky toolbar", () => {
"X-Base-Total-Count": "1",
"X-Total-Count": "1",
},
});
cy.visit("/cgi-bin/koha/acquisition/vendors");
}).as("get-vendors");
cy.intercept(
"GET",
new RegExp("/api/v1/acquisitions/vendors/(?!config$).+"),
vendor
).as("get-vendor");
cy.visit("/cgi-bin/koha/acquisition/vendors");
cy.wait("@get-vendors");
const name_link = cy.get(
"#vendors_list table tbody tr:first td:first a"
);
name_link.click();
cy.wait("@get-vendor");
cy.get("#toolbar a").contains("Receive shipments").click();
cy.get("h1").contains("Receive shipment from vendor " + vendor.name);
});