Wait for network requests to finish in events test (#3767)
This commit is contained in:
parent
ba3f1accd0
commit
f1828b0b45
2 changed files with 4 additions and 2 deletions
|
@ -277,8 +277,6 @@ describe("Events tests", () => {
|
|||
.save()
|
||||
.clearAdminEvents();
|
||||
|
||||
cy.wait(5000);
|
||||
|
||||
sidebarPage.goToEvents();
|
||||
eventsPage.goToAdminEventsTab();
|
||||
adminEventsTab.assertNoSearchResultsExist(true);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue