From 2c6645a5f933ac6543613994cccd771f60c12eb0 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 15 Feb 2024 14:40:04 +0000 Subject: [PATCH] Bug 36012: Add 'waits' to cypress test This patch adds cy.wait() in two places where builds have been failing due to timeouts Test plan: 1) cypress run --spec t/cypress/integration/InfiniteScrollSelect_spec.ts --- t/cypress/integration/InfiniteScrollSelect_spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/cypress/integration/InfiniteScrollSelect_spec.ts b/t/cypress/integration/InfiniteScrollSelect_spec.ts index 526f692b87..b2c6fa3d36 100644 --- a/t/cypress/integration/InfiniteScrollSelect_spec.ts +++ b/t/cypress/integration/InfiniteScrollSelect_spec.ts @@ -157,9 +157,10 @@ describe("Infinite scroll", () => { cy.intercept("POST", "/api/v1/erm/agreements", { statusCode: 201, body: agreement, - }); + }).as("submitForm"); // Submit the form, no error should be thrown as the select has correctly set the license id cy.get("#agreements_add").contains("Submit").click(); + cy.wait("@submitForm"); cy.get("main div[class='dialog message']").contains( "Agreement created" ); @@ -242,8 +243,9 @@ describe("Infinite scroll", () => { "X-Base-Total-Count": "20", "X-Total-Count": "20", }, - }); + }).as("resetDropdown"); cy.get("#license_id_0 .vs__open-indicator").click(); + cy.wait("@resetDropdown"); cy.get("#agreement_licenses").click(); cy.get("#agreement_license_0").contains("License 50"); -- 2.37.1 (Apple Git-137.1)