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()
|
.save()
|
||||||
.clearAdminEvents();
|
.clearAdminEvents();
|
||||||
|
|
||||||
cy.wait(5000);
|
|
||||||
|
|
||||||
sidebarPage.goToEvents();
|
sidebarPage.goToEvents();
|
||||||
eventsPage.goToAdminEventsTab();
|
eventsPage.goToAdminEventsTab();
|
||||||
adminEventsTab.assertNoSearchResultsExist(true);
|
adminEventsTab.assertNoSearchResultsExist(true);
|
||||||
|
|
|
@ -13,7 +13,9 @@ export default class AdminEventsSettingsTab extends PageObject {
|
||||||
clearAdminEvents() {
|
clearAdminEvents() {
|
||||||
cy.get(this.clearAdminEventsBtn).click();
|
cy.get(this.clearAdminEventsBtn).click();
|
||||||
modal.checkModalTitle("Clear events");
|
modal.checkModalTitle("Clear events");
|
||||||
|
cy.intercept("/admin/realms/master/admin-events").as("clearEvents");
|
||||||
modal.confirmModal();
|
modal.confirmModal();
|
||||||
|
cy.wait("@clearEvents");
|
||||||
masthead.checkNotificationMessage("The admin events have been cleared");
|
masthead.checkNotificationMessage("The admin events have been cleared");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +37,9 @@ export default class AdminEventsSettingsTab extends PageObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
|
cy.intercept("/admin/realms/master").as("saveRealm");
|
||||||
cy.get(this.saveBtn).click();
|
cy.get(this.saveBtn).click();
|
||||||
|
cy.wait("@saveRealm");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue