23db74e639
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 10.2.0 to 10.3.0. - [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases) - [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/CHANGELOG.md) - [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/10.2.0...10.3.0) --- updated-dependencies: - dependency-name: eslint-plugin-mocha dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
74 lines
2.4 KiB
TypeScript
74 lines
2.4 KiB
TypeScript
import { keycloakBefore } from "../support/util/keycloak_hooks";
|
|
import Masthead from "../support/pages/admin-ui/Masthead";
|
|
import LoginPage from "../support/pages/LoginPage";
|
|
import SidebarPage from "../support/pages/admin-ui/SidebarPage";
|
|
import OTPPolicies from "../support/pages/admin-ui/manage/authentication/OTPPolicies";
|
|
import WebAuthnPolicies from "../support/pages/admin-ui/manage/authentication/WebAuthnPolicies";
|
|
|
|
describe("Policies", () => {
|
|
const masthead = new Masthead();
|
|
const loginPage = new LoginPage();
|
|
const sidebarPage = new SidebarPage();
|
|
|
|
describe("OTP policies tab", () => {
|
|
const otpPoliciesPage = new OTPPolicies();
|
|
|
|
beforeEach(() => {
|
|
loginPage.logIn();
|
|
keycloakBefore();
|
|
sidebarPage.goToAuthentication();
|
|
otpPoliciesPage.goToTab();
|
|
});
|
|
|
|
it("should change to hotp", () => {
|
|
otpPoliciesPage.checkSupportedApplications(
|
|
"FreeOTP",
|
|
"Google Authenticator",
|
|
"Microsoft Authenticator",
|
|
);
|
|
otpPoliciesPage.setPolicyType("hotp").increaseInitialCounter().save();
|
|
masthead.checkNotificationMessage("OTP policy successfully updated");
|
|
otpPoliciesPage.checkSupportedApplications("FreeOTP");
|
|
});
|
|
});
|
|
|
|
describe("Webauthn policies tabs", () => {
|
|
const webauthnPage = new WebAuthnPolicies();
|
|
|
|
beforeEach(() => {
|
|
loginPage.logIn();
|
|
keycloakBefore();
|
|
sidebarPage.goToAuthentication();
|
|
});
|
|
|
|
it("should fill webauthn settings", () => {
|
|
webauthnPage.goToTab();
|
|
webauthnPage.fillSelects({
|
|
webAuthnPolicyAttestationConveyancePreference: "Indirect",
|
|
webAuthnPolicyRequireResidentKey: "Yes",
|
|
webAuthnPolicyUserVerificationRequirement: "Preferred",
|
|
});
|
|
webauthnPage.webAuthnPolicyCreateTimeout(30).save();
|
|
masthead.checkNotificationMessage(
|
|
"Updated webauthn policies successfully",
|
|
);
|
|
});
|
|
|
|
it("should fill webauthn passwordless settings", () => {
|
|
webauthnPage.goToPasswordlessTab();
|
|
webauthnPage
|
|
.fillSelects(
|
|
{
|
|
webAuthnPolicyAttestationConveyancePreference: "Indirect",
|
|
webAuthnPolicyRequireResidentKey: "Yes",
|
|
webAuthnPolicyUserVerificationRequirement: "Preferred",
|
|
},
|
|
true,
|
|
)
|
|
.save();
|
|
masthead.checkNotificationMessage(
|
|
"Updated webauthn policies successfully",
|
|
);
|
|
});
|
|
});
|
|
});
|