From 1dcb57521b86dcf6c4067426df71db86d90657cc Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 20 Mar 2023 17:21:06 -0100 Subject: [PATCH] Bug 33282: Feed an array of titles so that no dialog message appears, including but not limited to the one we're testing for Signed-off-by: Jonathan Druart --- t/cypress/integration/Dialog_spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/cypress/integration/Dialog_spec.ts b/t/cypress/integration/Dialog_spec.ts index 46702188f8d..9f39eaa2125 100644 --- a/t/cypress/integration/Dialog_spec.ts +++ b/t/cypress/integration/Dialog_spec.ts @@ -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"); }); -- 2.25.1