2023-06-20 12:21:49 +00:00
|
|
|
import { v4 as uuid } from "uuid";
|
2022-12-07 15:28:28 +00:00
|
|
|
import SidebarPage from "../support/pages/admin-ui/SidebarPage";
|
2021-12-06 10:50:29 +00:00
|
|
|
import LoginPage from "../support/pages/LoginPage";
|
2022-12-07 15:28:28 +00:00
|
|
|
import RealmSettingsPage from "../support/pages/admin-ui/manage/realm_settings/RealmSettingsPage";
|
|
|
|
import Masthead from "../support/pages/admin-ui/Masthead";
|
2021-12-06 10:50:29 +00:00
|
|
|
import ModalUtils from "../support/util/ModalUtils";
|
2022-01-07 07:27:58 +00:00
|
|
|
import { keycloakBefore } from "../support/util/keycloak_hooks";
|
2022-12-07 15:28:28 +00:00
|
|
|
import ListingPage from "../support/pages/admin-ui/ListingPage";
|
2022-02-24 10:31:46 +00:00
|
|
|
import adminClient from "../support/util/AdminClient";
|
2023-03-30 08:44:36 +00:00
|
|
|
import KeysTab from "../support/pages/admin-ui/manage/realm_settings/KeysTab";
|
2021-12-06 10:50:29 +00:00
|
|
|
|
|
|
|
const loginPage = new LoginPage();
|
|
|
|
const sidebarPage = new SidebarPage();
|
|
|
|
const masthead = new Masthead();
|
|
|
|
const modalUtils = new ModalUtils();
|
|
|
|
const realmSettingsPage = new RealmSettingsPage();
|
2023-03-30 08:44:36 +00:00
|
|
|
const keysTab = new KeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
|
|
|
|
describe("Realm settings events tab tests", () => {
|
2023-06-20 12:21:49 +00:00
|
|
|
const realmName = "Realm_" + uuid();
|
2021-12-06 10:50:29 +00:00
|
|
|
const listingPage = new ListingPage();
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2021-12-06 10:50:29 +00:00
|
|
|
sidebarPage.goToRealm(realmName);
|
|
|
|
});
|
|
|
|
|
|
|
|
before(async () => {
|
2022-02-24 10:31:46 +00:00
|
|
|
await adminClient.createRealm(realmName);
|
2021-12-06 10:50:29 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
after(async () => {
|
2022-02-24 10:31:46 +00:00
|
|
|
await adminClient.deleteRealm(realmName);
|
2021-12-06 10:50:29 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const goToDetails = () => {
|
2022-03-06 15:25:37 +00:00
|
|
|
const keysUrl = `/admin/realms/${realmName}/keys`;
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.intercept(keysUrl).as("keysFetch");
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
cy.findAllByTestId("provider-name-link")
|
|
|
|
.contains("test_aes-generated")
|
|
|
|
.click();
|
|
|
|
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
cy.findAllByTestId("provider-name-link")
|
|
|
|
.contains("test_hmac-generated")
|
|
|
|
.click();
|
|
|
|
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
cy.findAllByTestId("provider-name-link").contains("test_rsa").click();
|
|
|
|
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
cy.findAllByTestId("provider-name-link")
|
|
|
|
.contains("test_rsa-generated")
|
|
|
|
.click();
|
|
|
|
|
2022-02-21 12:19:41 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2022-02-21 12:19:41 +00:00
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
cy.findAllByTestId("provider-name-link")
|
|
|
|
.contains("test_rsa-enc-generated")
|
|
|
|
.click();
|
|
|
|
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.wait(["@keysFetch"]);
|
|
|
|
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
|
|
|
const goToKeys = () => {
|
2022-03-06 15:25:37 +00:00
|
|
|
const keysUrl = `/admin/realms/${realmName}/keys`;
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.intercept(keysUrl).as("keysFetch");
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId("rs-keys-list-tab").click();
|
|
|
|
cy.wait(["@keysFetch"]);
|
|
|
|
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
|
|
|
it("Enable user events", () => {
|
2022-03-06 15:25:37 +00:00
|
|
|
cy.intercept("GET", `/admin/realms/${realmName}/events/config`).as("load");
|
2021-12-06 10:50:29 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
cy.findByTestId("rs-realm-events-tab").click();
|
|
|
|
cy.findByTestId("rs-events-tab").click();
|
2022-01-03 15:00:03 +00:00
|
|
|
cy.wait("@load");
|
2021-12-06 10:50:29 +00:00
|
|
|
realmSettingsPage
|
2022-06-22 11:35:10 +00:00
|
|
|
.toggleSwitch(realmSettingsPage.enableEvents, false)
|
2021-12-06 10:50:29 +00:00
|
|
|
.save(realmSettingsPage.eventsUserSave);
|
|
|
|
masthead.checkNotificationMessage("Successfully saved configuration");
|
|
|
|
realmSettingsPage.clearEvents("user");
|
|
|
|
modalUtils
|
|
|
|
.checkModalMessage(
|
2023-07-11 14:03:21 +00:00
|
|
|
"If you clear all events of this realm, all records will be permanently cleared in the database",
|
2021-12-06 10:50:29 +00:00
|
|
|
)
|
|
|
|
.confirmModal();
|
|
|
|
masthead.checkNotificationMessage("The user events have been cleared");
|
|
|
|
const events = ["Client info", "Client info error"];
|
2022-03-06 15:25:37 +00:00
|
|
|
cy.intercept("GET", `/admin/realms/${realmName}/events/config`).as(
|
2023-07-11 14:03:21 +00:00
|
|
|
"fetchConfig",
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
realmSettingsPage.addUserEvents(events).clickAdd();
|
|
|
|
masthead.checkNotificationMessage("Successfully saved configuration");
|
|
|
|
cy.wait(["@fetchConfig"]);
|
|
|
|
sidebarPage.waitForPageLoad();
|
2022-12-06 11:42:34 +00:00
|
|
|
cy.wait(1000);
|
2021-12-06 10:50:29 +00:00
|
|
|
for (const event of events) {
|
|
|
|
listingPage.searchItem(event, false).itemExist(event);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Go to keys tab", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("add Providers", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2021-12-06 10:50:29 +00:00
|
|
|
|
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
|
|
|
|
realmSettingsPage.toggleAddProviderDropdown();
|
|
|
|
|
|
|
|
cy.findByTestId("option-aes-generated").click();
|
2022-12-07 15:28:28 +00:00
|
|
|
realmSettingsPage.enterUIDisplayName("test_aes-generated");
|
2021-12-06 10:50:29 +00:00
|
|
|
realmSettingsPage.addProvider();
|
|
|
|
|
|
|
|
realmSettingsPage.toggleAddProviderDropdown();
|
|
|
|
|
|
|
|
cy.findByTestId("option-ecdsa-generated").click();
|
2022-12-07 15:28:28 +00:00
|
|
|
realmSettingsPage.enterUIDisplayName("test_ecdsa-generated");
|
2023-05-17 08:05:44 +00:00
|
|
|
realmSettingsPage.toggleSwitch("active", false);
|
2021-12-06 10:50:29 +00:00
|
|
|
realmSettingsPage.addProvider();
|
|
|
|
|
|
|
|
realmSettingsPage.toggleAddProviderDropdown();
|
|
|
|
|
|
|
|
cy.findByTestId("option-hmac-generated").click();
|
2022-12-07 15:28:28 +00:00
|
|
|
realmSettingsPage.enterUIDisplayName("test_hmac-generated");
|
2023-05-17 08:05:44 +00:00
|
|
|
realmSettingsPage.toggleSwitch("enabled", false);
|
2021-12-06 10:50:29 +00:00
|
|
|
realmSettingsPage.addProvider();
|
|
|
|
|
|
|
|
realmSettingsPage.toggleAddProviderDropdown();
|
|
|
|
|
|
|
|
cy.findByTestId("option-rsa-generated").click();
|
2022-12-07 15:28:28 +00:00
|
|
|
realmSettingsPage.enterUIDisplayName("test_rsa-generated");
|
2021-12-06 10:50:29 +00:00
|
|
|
realmSettingsPage.addProvider();
|
2022-02-21 12:19:41 +00:00
|
|
|
|
|
|
|
realmSettingsPage.toggleAddProviderDropdown();
|
|
|
|
|
|
|
|
cy.findByTestId("option-rsa-enc-generated").click();
|
2022-12-07 15:28:28 +00:00
|
|
|
realmSettingsPage.enterUIDisplayName("test_rsa-enc-generated");
|
2022-02-21 12:19:41 +00:00
|
|
|
realmSettingsPage.addProvider();
|
2021-12-06 10:50:29 +00:00
|
|
|
});
|
|
|
|
|
2022-04-20 18:20:33 +00:00
|
|
|
it("search providers", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2022-04-20 18:20:33 +00:00
|
|
|
|
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
|
|
|
|
// search providers
|
|
|
|
cy.findByTestId("provider-search-input").type("rsa{enter}");
|
|
|
|
listingPage.checkTableLength(4, "kc-draggable-table");
|
|
|
|
cy.findByTestId("provider-search-input").clear().type("{enter}");
|
|
|
|
});
|
|
|
|
|
2021-12-06 10:50:29 +00:00
|
|
|
it("go to details", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
goToDetails();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Test keys", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
goToKeys();
|
|
|
|
|
|
|
|
realmSettingsPage.testSelectFilter();
|
|
|
|
});
|
|
|
|
|
2022-04-20 18:20:33 +00:00
|
|
|
it.skip("Should search active keys", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
goToKeys();
|
|
|
|
|
|
|
|
realmSettingsPage.switchToActiveFilter();
|
|
|
|
listingPage.searchItem("rs", false);
|
|
|
|
listingPage.checkTableLength(3, "kc-keys-list");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should search passive keys", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
goToKeys();
|
|
|
|
|
|
|
|
realmSettingsPage.switchToPassiveFilter();
|
|
|
|
listingPage.searchItem("ec", false);
|
|
|
|
listingPage.checkTableLength(1, "kc-keys-list");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should search disabled keys", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
goToKeys();
|
|
|
|
|
|
|
|
realmSettingsPage.switchToDisabledFilter();
|
|
|
|
listingPage.searchItem("hs", false);
|
|
|
|
listingPage.checkTableLength(1, "kc-keys-list");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("delete provider", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2022-04-20 18:20:33 +00:00
|
|
|
|
|
|
|
cy.findByTestId("rs-providers-tab").click();
|
|
|
|
|
|
|
|
realmSettingsPage.deleteProvider("test_aes-generated");
|
|
|
|
});
|
|
|
|
|
2022-10-17 10:08:49 +00:00
|
|
|
it("list keys", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
2023-03-30 08:44:36 +00:00
|
|
|
keysTab.goToKeysTab();
|
2022-10-17 10:08:49 +00:00
|
|
|
realmSettingsPage.checkKeyPublic();
|
|
|
|
});
|
|
|
|
|
2024-01-08 14:03:26 +00:00
|
|
|
it("Realm header settings", () => {
|
2021-12-06 10:50:29 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
2024-01-08 14:03:26 +00:00
|
|
|
cy.findByTestId("rs-security-defenses-tab").click();
|
2024-03-22 13:07:25 +00:00
|
|
|
cy.findByTestId("browserSecurityHeaders.xFrameOptions").clear();
|
|
|
|
cy.findByTestId("browserSecurityHeaders.xFrameOptions").type("DENY");
|
2024-01-08 14:03:26 +00:00
|
|
|
cy.findByTestId("headers-form-tab-save").should("be.enabled").click();
|
2021-12-06 10:50:29 +00:00
|
|
|
|
2024-01-08 14:03:26 +00:00
|
|
|
masthead.checkNotificationMessage("Realm successfully updated");
|
|
|
|
});
|
2021-12-21 06:34:44 +00:00
|
|
|
|
2024-01-08 14:03:26 +00:00
|
|
|
it("Brute force detection", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
cy.findAllByTestId("rs-security-defenses-tab").click();
|
|
|
|
cy.get("#pf-tab-20-bruteForce").click();
|
2022-06-15 12:57:39 +00:00
|
|
|
|
2024-01-15 06:40:20 +00:00
|
|
|
cy.get("#kc-brute-force-mode").click();
|
|
|
|
cy.findByTestId("select-brute-force-mode")
|
|
|
|
.contains("Lockout temporarily")
|
|
|
|
.click();
|
2024-01-08 14:03:26 +00:00
|
|
|
cy.findByTestId("waitIncrementSeconds").type("1");
|
|
|
|
cy.findByTestId("maxFailureWaitSeconds").type("1");
|
|
|
|
cy.findByTestId("maxDeltaTimeSeconds").type("1");
|
|
|
|
cy.findByTestId("minimumQuickLoginWaitSeconds").type("1");
|
2021-12-06 10:50:29 +00:00
|
|
|
|
2024-01-08 14:03:26 +00:00
|
|
|
cy.findByTestId("brute-force-tab-save").should("be.enabled").click();
|
|
|
|
masthead.checkNotificationMessage("Realm successfully updated");
|
2021-12-06 10:50:29 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("add session data", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
|
|
|
cy.findByTestId("rs-sessions-tab").click();
|
|
|
|
|
|
|
|
realmSettingsPage.populateSessionsPage();
|
|
|
|
realmSettingsPage.save("sessions-tab-save");
|
|
|
|
|
|
|
|
masthead.checkNotificationMessage("Realm successfully updated");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("check that sessions data was saved", () => {
|
|
|
|
sidebarPage.goToAuthentication();
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
|
|
|
cy.findByTestId("rs-sessions-tab").click();
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.ssoSessionIdleInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
1,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.ssoSessionMaxInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
2,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.ssoSessionIdleRememberMeInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
3,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.ssoSessionMaxRememberMeInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
4,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.clientSessionIdleInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
5,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.clientSessionMaxInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
6,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.offlineSessionIdleInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
7,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.offlineSessionMaxSwitch).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
"on",
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.loginTimeoutInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
9,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.loginActionTimeoutInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
10,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("add token data", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
|
|
|
cy.findByTestId("rs-tokens-tab").click();
|
|
|
|
|
|
|
|
realmSettingsPage.populateTokensPage();
|
|
|
|
realmSettingsPage.save("tokens-tab-save");
|
|
|
|
|
|
|
|
masthead.checkNotificationMessage("Realm successfully updated");
|
|
|
|
});
|
|
|
|
|
|
|
|
it("check that token data was saved", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
|
|
|
|
cy.findByTestId("rs-tokens-tab").click();
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.accessTokenLifespanInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
1,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
2024-03-25 12:33:39 +00:00
|
|
|
cy.findByTestId(realmSettingsPage.parRequestUriLifespanInput).should(
|
|
|
|
"have.value",
|
|
|
|
2,
|
|
|
|
);
|
2021-12-06 10:50:29 +00:00
|
|
|
cy.findByTestId(realmSettingsPage.accessTokenLifespanImplicitInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
2,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.clientLoginTimeoutInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
3,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.userInitiatedActionLifespanInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
4,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.defaultAdminInitatedInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
5,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.emailVerificationInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
6,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.idpEmailVerificationInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
7,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
cy.findByTestId(realmSettingsPage.forgotPasswordInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
8,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
cy.findByTestId(realmSettingsPage.executeActionsInput).should(
|
|
|
|
"have.value",
|
2023-07-11 14:03:21 +00:00
|
|
|
9,
|
2021-12-06 10:50:29 +00:00
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Realm settings events tab tests", () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2021-12-06 10:50:29 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
cy.findByTestId("rs-realm-events-tab").click();
|
|
|
|
cy.findByTestId("rs-event-listeners-tab").click();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should display event listeners form", () => {
|
|
|
|
realmSettingsPage.shouldDisplayEventListenersForm();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should revert saving event listener", () => {
|
|
|
|
realmSettingsPage.shouldRevertSavingEventListener();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should save event listener", () => {
|
|
|
|
realmSettingsPage.shouldSaveEventListener();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should remove event from event listener", () => {
|
|
|
|
realmSettingsPage.shouldRemoveEventFromEventListener();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Should remove all events from event listener and re-save original", () => {
|
|
|
|
realmSettingsPage.shouldRemoveAllEventListeners();
|
|
|
|
realmSettingsPage.shouldReSaveEventListener();
|
|
|
|
});
|
|
|
|
});
|