Skip to content
Snippets Groups Projects
Unverified Commit 9a282557 authored by Alexander Lesnenko's avatar Alexander Lesnenko Committed by GitHub
Browse files

wait for all people page requests (#20370)

parent 9551093d
No related branches found
No related tags found
No related merge requests found
......@@ -223,8 +223,16 @@ describe("scenarios > admin > people", () => {
const NEW_USERS = 18;
const NEW_TOTAL_USERS = TOTAL_USERS + NEW_USERS;
const waitForUserRequests = () => {
cy.wait("@users");
cy.wait("@memberships");
};
beforeEach(() => {
generateUsers(NEW_USERS);
cy.intercept("GET", "/api/user").as("users");
cy.intercept("GET", "/api/permissions/membership").as("memberships");
});
it("should allow paginating people forward and backward", () => {
......@@ -232,6 +240,8 @@ describe("scenarios > admin > people", () => {
cy.visit("/admin/people");
waitForUserRequests();
// Total
cy.findByText(`${NEW_TOTAL_USERS} people found`);
......@@ -242,6 +252,8 @@ describe("scenarios > admin > people", () => {
cy.findByTestId("next-page-btn").click();
waitForUserRequests();
// Page 2
cy.findByText(`${PAGE_SIZE + 1} - ${NEW_TOTAL_USERS}`);
assertTableRowsCount(NEW_TOTAL_USERS % PAGE_SIZE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment