more waits to stabilize test (#28092)

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-03-20 14:29:11 +01:00 committed by GitHub
parent d5bf79b932
commit 6ede747871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View file

@ -45,16 +45,14 @@ describe("Realm settings general tab tests", () => {
// Enable realm
realmSettingsPage.toggleSwitch(`${realmName}-switch`);
masthead.checkNotificationMessage("Realm successfully updated", true);
masthead.checkNotificationMessage("Realm successfully updated");
sidebarPage.waitForPageLoad();
// Disable realm
realmSettingsPage.toggleSwitch(`${realmName}-switch`);
realmSettingsPage.disableRealm();
masthead.checkNotificationMessage("Realm successfully updated", true);
// Sometimes it takes the Keycloak server a while to disable the realm, even though the notification message has been displayed.
// To prevent flaky tests, we wait a second before continuing.
cy.wait(1000);
sidebarPage.waitForPageLoad();
// Re-enable realm
realmSettingsPage.toggleSwitch(`${realmName}-switch`);