diff --git a/cypress/integration/group_test.spec.ts b/cypress/integration/group_test.spec.ts index a268a2ba2a..b5453b840c 100644 --- a/cypress/integration/group_test.spec.ts +++ b/cypress/integration/group_test.spec.ts @@ -23,8 +23,8 @@ describe("Group test", () => { let groupName = "group"; const clickGroup = (itemName: string) => { - const membersUrl = `/auth/admin/realms/master/groups/*/members`; - cy.intercept(membersUrl).as("groupFetch"); + const groupUrl = "/auth/admin/realms/master/groups/*/members*"; + cy.intercept(groupUrl).as("groupFetch"); cy.get("table").contains(itemName).click(); cy.wait(["@groupFetch"]); @@ -88,8 +88,10 @@ describe("Group test", () => { moveGroupModal.clickMove(); masthead.checkNotificationMessage("Group moved"); + cy.get(".pf-c-spinner__tail-ball").should("not.exist"); listingPage.itemExist(groupName, false); clickGroup(targetGroupName); + cy.get(".pf-c-spinner__tail-ball").should("not.exist"); listingPage.itemExist(groupName); sidebarPage.goToGroups(); listingPage.deleteItem(targetGroupName); diff --git a/cypress/support/pages/admin_console/manage/groups/GroupModal.ts b/cypress/support/pages/admin_console/manage/groups/GroupModal.ts index 202fdaf67a..a397e3e651 100644 --- a/cypress/support/pages/admin_console/manage/groups/GroupModal.ts +++ b/cypress/support/pages/admin_console/manage/groups/GroupModal.ts @@ -15,7 +15,12 @@ export default class GroupModal { } clickCreate() { + cy.intercept("/auth/admin/realms/master/groups/*/members").as( + "groupCreate" + ); cy.getId(this.createButton).click(); + cy.wait(["@groupCreate"]); + return this; } diff --git a/cypress/support/pages/admin_console/manage/groups/MoveGroupModal.ts b/cypress/support/pages/admin_console/manage/groups/MoveGroupModal.ts index f917810d76..e7dc685900 100644 --- a/cypress/support/pages/admin_console/manage/groups/MoveGroupModal.ts +++ b/cypress/support/pages/admin_console/manage/groups/MoveGroupModal.ts @@ -18,7 +18,9 @@ export default class MoveGroupModal { } clickMove() { + cy.intercept("/auth/admin/realms/master/groups/*/members").as("groupMove"); cy.getId(this.moveButton).click(); + cy.wait(["@groupMove"]); return this; } }