721ed1bcaf
* wip add realm themes * get switch value from server * add tests * fix admin theme help text * remove requireSsl forlabel * update dropdown options * wip fix for locales * format * save/update locales done * expose all themes in dropdown * remove comments * remove theme types
51 lines
1.8 KiB
TypeScript
51 lines
1.8 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.saveGeneral();
|
|
realmSettingsPage.toggleSwitch(managedAccessSwitch);
|
|
realmSettingsPage.saveGeneral();
|
|
});
|
|
|
|
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);
|
|
});
|
|
|
|
it("Go to themes tab", function () {
|
|
sidebarPage.goToRealmSettings();
|
|
cy.getId("rs-themes-tab").click();
|
|
realmSettingsPage.selectLoginThemeType("keycloak");
|
|
realmSettingsPage.selectAccountThemeType("keycloak");
|
|
realmSettingsPage.selectAdminThemeType("keycloak.v2");
|
|
realmSettingsPage.selectEmailThemeType("base");
|
|
|
|
realmSettingsPage.saveThemes();
|
|
});
|
|
});
|
|
});
|