Bug 32474: (follow-up): Tell the tests to wait for the intercepted request responses

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2024-02-02 10:29:06 +00:00 committed by Katrin Fischer
parent d7669ae2a9
commit 3584cd7edb
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 6 additions and 3 deletions

View File

@ -84,9 +84,10 @@ describe("Infinite scroll", () => {
"X-Base-Total-Count": "20",
"X-Total-Count": "20",
},
});
}).as("getPageTwo");
// Scroll the dropdown
cy.get(".vs__dropdown-menu").scrollTo("bottom");
cy.wait("@getPageTwo");
cy.get("@options").should("have.length", 40);
cy.intercept("GET", "/api/v1/erm/licenses*", {
@ -96,9 +97,10 @@ describe("Infinite scroll", () => {
"X-Base-Total-Count": "20",
"X-Total-Count": "20",
},
});
}).as("getPageThree");
// Scroll the dropdown again
cy.get(".vs__dropdown-menu").scrollTo("bottom");
cy.wait("@getPageThree");
cy.get("@options").should("have.length", 60);
});
@ -208,9 +210,10 @@ describe("Infinite scroll", () => {
"X-Base-Total-Count": "20",
"X-Total-Count": "20",
},
});
}).as("getPageTwo");
// Scroll the dropdown
cy.get(".vs__dropdown-menu").scrollTo("bottom");
cy.wait("@getPageTwo");
cy.intercept("GET", "/api/v1/erm/licenses*", {
statusCode: 200,