keycloak-scim/cypress/integration/realm_settings_test.spec.ts
Eugenia ba4e576a2d
Realm settings(login): adds login tab and tests (#531)
* realm settings tabs wip

* realm settings wip

* switches

* updates to login tab watch

* remove controller and call save in onChange

* add cypress tests

* remove log stmt

* fix lint

Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Update src/realm-settings/LoginTab.tsx

Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Remove form

* format

* lint

Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
2021-04-19 13:41:07 +02:00

40 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);
});
});
});