41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
|
import SidebarPage from "../support/pages/admin_console/SidebarPage";
|
||
|
import LoginPage from "../support/pages/LoginPage";
|
||
|
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
|
||
|
import { keycloakBefore } from "../support/util/keycloak_before";
|
||
|
|
||
|
describe("Realm settings test", () => {
|
||
|
const loginPage = new LoginPage();
|
||
|
const sidebarPage = new SidebarPage();
|
||
|
const realmSettingsPage = new RealmSettingsPage();
|
||
|
|
||
|
const managedAccessSwitch = "user-managed-access-switch";
|
||
|
const userRegSwitch = "user-reg-switch";
|
||
|
const forgotPwdSwitch = "forgot-pw-switch";
|
||
|
const rememberMeSwitch = "remember-me-switch";
|
||
|
const verifyEmailSwitch = "verify-email-switch";
|
||
|
|
||
|
describe("Realm settings", function () {
|
||
|
beforeEach(function () {
|
||
|
keycloakBefore();
|
||
|
loginPage.logIn();
|
||
|
});
|
||
|
|
||
|
it("Go to general tab", function () {
|
||
|
sidebarPage.goToRealmSettings();
|
||
|
realmSettingsPage.toggleSwitch(managedAccessSwitch);
|
||
|
realmSettingsPage.save();
|
||
|
realmSettingsPage.toggleSwitch(managedAccessSwitch);
|
||
|
realmSettingsPage.save();
|
||
|
});
|
||
|
|
||
|
it("Go to login tab", function () {
|
||
|
sidebarPage.goToRealmSettings();
|
||
|
cy.getId("rs-login-tab").click();
|
||
|
realmSettingsPage.toggleSwitch(userRegSwitch);
|
||
|
realmSettingsPage.toggleSwitch(forgotPwdSwitch);
|
||
|
realmSettingsPage.toggleSwitch(rememberMeSwitch);
|
||
|
realmSettingsPage.toggleSwitch(verifyEmailSwitch);
|
||
|
});
|
||
|
});
|
||
|
});
|