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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2024-02-15 14:40:04 +00:00 committed by Katrin Fischer
parent 285a0fc74d
commit 8a7a37fb35
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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");