Bug 33282: Feed an array of titles so that no dialog message appears
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Mon, 20 Mar 2023 18:21:06 +0000 (17:21 -0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 24 Mar 2023 08:12:56 +0000 (09:12 +0100)
Including but not limited to the one we're testing for

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/cypress/integration/Dialog_spec.ts

index 4670218..9f39eaa 100644 (file)
@@ -88,7 +88,15 @@ describe("Dialog operations", () => {
         cy.get("main div[class='dialog message']").contains("Package created");
         cy.get("main div[class='dialog message']").should("have.length", 1);
 
-        cy.get("#navmenulist").contains("Agreements").click();
+        cy.intercept("GET", "/api/v1/erm/eholdings/local/titles*", {
+            statusCode: 200,
+            body: [cy.get_title()],
+            headers: {
+                "X-Base-Total-Count": "1",
+                "X-Total-Count": "1",
+            },
+        });
+        cy.get("#navmenulist").contains("Titles").click();
         // Info messages should be cleared when view is changed
         cy.get("main div[class='dialog message']").should("not.exist");
     });