diff --git a/apps/admin-ui/cypress/e2e/events_test.spec.ts b/apps/admin-ui/cypress/e2e/events_test.spec.ts index 96ef429ecd..31cdfe9ec4 100644 --- a/apps/admin-ui/cypress/e2e/events_test.spec.ts +++ b/apps/admin-ui/cypress/e2e/events_test.spec.ts @@ -277,8 +277,6 @@ describe("Events tests", () => { .save() .clearAdminEvents(); - cy.wait(5000); - sidebarPage.goToEvents(); eventsPage.goToAdminEventsTab(); adminEventsTab.assertNoSearchResultsExist(true); diff --git a/apps/admin-ui/cypress/support/pages/admin_console/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts b/apps/admin-ui/cypress/support/pages/admin_console/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts index e1173b2b3d..5833a6a289 100644 --- a/apps/admin-ui/cypress/support/pages/admin_console/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts +++ b/apps/admin-ui/cypress/support/pages/admin_console/manage/realm_settings/tabs/realmsettings_events_subtabs/AdminEventsSettingsTab.ts @@ -13,7 +13,9 @@ export default class AdminEventsSettingsTab extends PageObject { clearAdminEvents() { cy.get(this.clearAdminEventsBtn).click(); modal.checkModalTitle("Clear events"); + cy.intercept("/admin/realms/master/admin-events").as("clearEvents"); modal.confirmModal(); + cy.wait("@clearEvents"); masthead.checkNotificationMessage("The admin events have been cleared"); return this; } @@ -35,7 +37,9 @@ export default class AdminEventsSettingsTab extends PageObject { } save() { + cy.intercept("/admin/realms/master").as("saveRealm"); cy.get(this.saveBtn).click(); + cy.wait("@saveRealm"); return this; } }