8d72f8a705
* upgrade cypress * fixed delete now has dialog * also check "unAssign" * client type no longer required * providers and group changes * grp creation working * moved create realm button ouside the dropdown * sped up test and added cleanup * Revert "moved create realm button ouside the dropdown" This reverts commit e2076a5305808417de910ba8fada8e528e5c356a. * make test re-runnable * removed un needed navigation * Fix misformed Cypress config for GitHub Action * cleanup after test * fixed cleanup * temporary removed this test * also remove user "new" * try adding a wait for CI * get different modal id * add {force: true} to modal functions * mv grp search last and ignore 401 * try using cy.get and disable video for testing * add back video artifacts Co-authored-by: mfrances <mfrances@redhat.com> Co-authored-by: Jon Koops <jonkoops@gmail.com> Co-authored-by: jenny-s51 <jshandel@redhat.com>
71 lines
2.5 KiB
TypeScript
71 lines
2.5 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";
|
|
import AdminClient from "../support/util/AdminClient";
|
|
|
|
describe("Realm settings test", () => {
|
|
const loginPage = new LoginPage();
|
|
const sidebarPage = new SidebarPage();
|
|
const realmSettingsPage = new RealmSettingsPage();
|
|
|
|
describe("Realm settings", () => {
|
|
const realmName = "Realm_" + (Math.random() + 1).toString(36).substring(7);
|
|
|
|
beforeEach(() => {
|
|
keycloakBefore();
|
|
loginPage.logIn();
|
|
sidebarPage.goToRealm(realmName);
|
|
});
|
|
|
|
before(async () => {
|
|
await new AdminClient().createRealm(realmName);
|
|
});
|
|
|
|
after(async () => {
|
|
await new AdminClient().deleteRealm(realmName);
|
|
});
|
|
|
|
it("Go to general tab", function () {
|
|
sidebarPage.goToRealmSettings();
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.managedAccessSwitch);
|
|
realmSettingsPage.save(realmSettingsPage.generalSaveBtn);
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.managedAccessSwitch);
|
|
realmSettingsPage.save(realmSettingsPage.generalSaveBtn);
|
|
});
|
|
|
|
it("Go to login tab", function () {
|
|
sidebarPage.goToRealmSettings();
|
|
cy.getId("rs-login-tab").click();
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.userRegSwitch);
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.forgotPwdSwitch);
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.rememberMeSwitch);
|
|
realmSettingsPage.toggleSwitch(realmSettingsPage.verifyEmailSwitch);
|
|
});
|
|
|
|
it("Go to email tab", function () {
|
|
sidebarPage.goToRealmSettings();
|
|
cy.getId("rs-email-tab").click();
|
|
|
|
realmSettingsPage.addSenderEmail("example@example.com");
|
|
|
|
cy.wait(100);
|
|
|
|
realmSettingsPage.toggleCheck(realmSettingsPage.enableSslCheck);
|
|
realmSettingsPage.toggleCheck(realmSettingsPage.enableStartTlsCheck);
|
|
|
|
realmSettingsPage.save(realmSettingsPage.emailSaveBtn);
|
|
});
|
|
|
|
it("Go to themes tab", function () {
|
|
sidebarPage.goToRealmSettings();
|
|
cy.getId("rs-themes-tab").click();
|
|
realmSettingsPage.selectLoginThemeType("keycloak");
|
|
realmSettingsPage.selectAccountThemeType("keycloak");
|
|
realmSettingsPage.selectAdminThemeType("base");
|
|
realmSettingsPage.selectEmailThemeType("base");
|
|
|
|
realmSettingsPage.saveThemes();
|
|
});
|
|
});
|
|
});
|