Upgrade Prettier to the latest version (#21601)
This commit is contained in:
parent
982bac9db6
commit
153d1a9841
408 changed files with 1583 additions and 1528 deletions
|
@ -69,7 +69,7 @@ const DeviceActivity = () => {
|
|||
|
||||
const signOutSession = async (
|
||||
session: SessionRepresentation,
|
||||
device: DeviceRepresentation
|
||||
device: DeviceRepresentation,
|
||||
) => {
|
||||
try {
|
||||
await deleteSession(session.id);
|
||||
|
@ -233,7 +233,7 @@ const DeviceActivity = () => {
|
|||
</Grid>
|
||||
</DataListContent>
|
||||
</DataListItemRow>
|
||||
))
|
||||
)),
|
||||
)}
|
||||
</DataListItem>
|
||||
</DataList>
|
||||
|
|
|
@ -19,12 +19,12 @@ const LinkedAccounts = () => {
|
|||
|
||||
const linkedAccounts = useMemo(
|
||||
() => accounts.filter((account) => account.connected),
|
||||
[accounts]
|
||||
[accounts],
|
||||
);
|
||||
|
||||
const unLinkedAccounts = useMemo(
|
||||
() => accounts.filter((account) => !account.connected),
|
||||
[accounts]
|
||||
[accounts],
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
@ -76,7 +76,7 @@ const SigningIn = () => {
|
|||
usePromise((signal) => getCredentials({ signal }), setCredentials, [key]);
|
||||
|
||||
const credentialRowCells = (
|
||||
credMetadata: CredentialMetadataRepresentation
|
||||
credMetadata: CredentialMetadataRepresentation,
|
||||
) => {
|
||||
const credential = credMetadata.credential;
|
||||
const maxWidth = { "--pf-u-max-width--MaxWidth": "300px" } as CSSProperties;
|
||||
|
@ -98,7 +98,7 @@ const SigningIn = () => {
|
|||
<strong className="pf-u-mr-md"></strong>
|
||||
{{ date: formatDate(new Date(credential.createdDate)) }}
|
||||
</Trans>
|
||||
</DataListCell>
|
||||
</DataListCell>,
|
||||
);
|
||||
}
|
||||
return items;
|
||||
|
@ -188,7 +188,7 @@ const SigningIn = () => {
|
|||
addAlert(
|
||||
t("successRemovedMessage", {
|
||||
userLabel: label(meta.credential),
|
||||
})
|
||||
}),
|
||||
);
|
||||
refresh();
|
||||
} catch (error) {
|
||||
|
@ -196,7 +196,7 @@ const SigningIn = () => {
|
|||
t("errorRemovedMessage", {
|
||||
userLabel: label(meta.credential),
|
||||
error,
|
||||
}).toString()
|
||||
}).toString(),
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -7,13 +7,13 @@ import { joinPath } from "./utils/joinPath";
|
|||
export const fetchResources = async (
|
||||
params: RequestInit,
|
||||
requestParams: Record<string, string>,
|
||||
shared: boolean | undefined = false
|
||||
shared: boolean | undefined = false,
|
||||
): Promise<{ data: Resource[]; links: Links }> => {
|
||||
const response = await get(
|
||||
`/resources${shared ? "/shared-with-me?" : "?"}${new URLSearchParams(
|
||||
requestParams
|
||||
requestParams,
|
||||
)}`,
|
||||
params
|
||||
params,
|
||||
);
|
||||
|
||||
let links: Links;
|
||||
|
@ -32,11 +32,11 @@ export const fetchResources = async (
|
|||
|
||||
export const fetchPermission = async (
|
||||
params: RequestInit,
|
||||
resourceId: string
|
||||
resourceId: string,
|
||||
): Promise<Permission[]> => {
|
||||
const response = await request<Permission[]>(
|
||||
`/resources/${resourceId}/permissions`,
|
||||
params
|
||||
params,
|
||||
);
|
||||
return checkResponse(response);
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ export const fetchPermission = async (
|
|||
export const updateRequest = (
|
||||
resourceId: string,
|
||||
username: string,
|
||||
scopes: Scope[] | string[]
|
||||
scopes: Scope[] | string[],
|
||||
) =>
|
||||
request(`/resources/${resourceId}/permissions`, {
|
||||
method: "put",
|
||||
|
@ -53,7 +53,7 @@ export const updateRequest = (
|
|||
|
||||
export const updatePermissions = (
|
||||
resourceId: string,
|
||||
permissions: Permission[]
|
||||
permissions: Permission[],
|
||||
) =>
|
||||
request(`/resources/${resourceId}/permissions`, {
|
||||
method: "put",
|
||||
|
@ -71,7 +71,7 @@ async function get(path: string, params: RequestInit): Promise<Response> {
|
|||
"realms",
|
||||
environment.realm,
|
||||
"account",
|
||||
path
|
||||
path,
|
||||
);
|
||||
|
||||
const response = await fetch(url, {
|
||||
|
@ -90,7 +90,7 @@ async function get(path: string, params: RequestInit): Promise<Response> {
|
|||
|
||||
async function request<T>(
|
||||
path: string,
|
||||
params: RequestInit
|
||||
params: RequestInit,
|
||||
): Promise<T | undefined> {
|
||||
const response = await get(path, params);
|
||||
if (response.status !== 204) return response.json();
|
||||
|
|
|
@ -37,7 +37,7 @@ export async function getSupportedLocales({
|
|||
}
|
||||
|
||||
export async function savePersonalInfo(
|
||||
info: UserRepresentation
|
||||
info: UserRepresentation,
|
||||
): Promise<void> {
|
||||
const response = await request("/", { body: info, method: "POST" });
|
||||
if (!response.ok) {
|
||||
|
@ -49,11 +49,11 @@ export async function savePersonalInfo(
|
|||
|
||||
export async function getPermissionRequests(
|
||||
resourceId: string,
|
||||
{ signal }: CallOptions = {}
|
||||
{ signal }: CallOptions = {},
|
||||
): Promise<Permission[]> {
|
||||
const response = await request(
|
||||
`/resources/${resourceId}/permissions/requests`,
|
||||
{ signal }
|
||||
{ signal },
|
||||
);
|
||||
|
||||
return parseResponse<Permission[]>(response);
|
||||
|
@ -110,7 +110,7 @@ export async function unLinkAccount(account: LinkedAccountRepresentation) {
|
|||
|
||||
export async function linkAccount(account: LinkedAccountRepresentation) {
|
||||
const redirectUri = encodeURIComponent(
|
||||
joinPath(environment.authUrl, "realms", environment.realm, "account")
|
||||
joinPath(environment.authUrl, "realms", environment.realm, "account"),
|
||||
);
|
||||
const response = await request("/linked-accounts/" + account.providerName, {
|
||||
searchParams: { providerId: account.providerName, redirectUri },
|
||||
|
|
|
@ -9,7 +9,7 @@ export async function parseResponse<T>(response: Response): Promise<T> {
|
|||
|
||||
if (!isJSON) {
|
||||
throw new Error(
|
||||
`Expected response to have a JSON content type, got '${contentType}' instead.`
|
||||
`Expected response to have a JSON content type, got '${contentType}' instead.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,6 @@ function getErrorMessage(data: unknown): string {
|
|||
}
|
||||
|
||||
throw new Error(
|
||||
"Unable to retrieve error message from response, no matching key found."
|
||||
"Unable to retrieve error message from response, no matching key found.",
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,15 +12,15 @@ export type RequestOptions = {
|
|||
|
||||
export async function request(
|
||||
path: string,
|
||||
{ signal, method, searchParams, body }: RequestOptions = {}
|
||||
{ signal, method, searchParams, body }: RequestOptions = {},
|
||||
): Promise<Response> {
|
||||
const url = new URL(
|
||||
joinPath(environment.authUrl, "realms", environment.realm, "account", path)
|
||||
joinPath(environment.authUrl, "realms", environment.realm, "account", path),
|
||||
);
|
||||
|
||||
if (searchParams) {
|
||||
Object.entries(searchParams).forEach(([key, value]) =>
|
||||
url.searchParams.set(key, value)
|
||||
url.searchParams.set(key, value),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ const Applications = () => {
|
|||
usePromise(
|
||||
(signal) => getApplications({ signal }),
|
||||
(clients) => setApplications(clients.map((c) => ({ ...c, open: false }))),
|
||||
[key]
|
||||
[key],
|
||||
);
|
||||
|
||||
const toggleOpen = (clientId: string) => {
|
||||
setApplications([
|
||||
...applications!.map((a) =>
|
||||
a.clientId === clientId ? { ...a, open: !a.open } : a
|
||||
a.clientId === clientId ? { ...a, open: !a.open } : a,
|
||||
),
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -16,13 +16,13 @@ export default function useFormatter() {
|
|||
return {
|
||||
formatDate: function (
|
||||
date: Date,
|
||||
options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT
|
||||
options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT,
|
||||
) {
|
||||
return date.toLocaleString("en", options);
|
||||
},
|
||||
formatTime: function (
|
||||
time: number,
|
||||
options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT
|
||||
options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT,
|
||||
) {
|
||||
return new Intl.DateTimeFormat("en", options).format(time);
|
||||
},
|
||||
|
|
|
@ -15,13 +15,13 @@ export default function useFormatter() {
|
|||
return {
|
||||
formatDate: function (
|
||||
date: Date,
|
||||
options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT
|
||||
options: Intl.DateTimeFormatOptions | undefined = DATE_AND_TIME_FORMAT,
|
||||
) {
|
||||
return date.toLocaleString("en", options);
|
||||
},
|
||||
formatTime: function (
|
||||
time: number,
|
||||
options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT
|
||||
options: Intl.DateTimeFormatOptions | undefined = TIME_FORMAT,
|
||||
) {
|
||||
return new Intl.DateTimeFormat("en", options).format(time);
|
||||
},
|
||||
|
|
|
@ -27,13 +27,13 @@ const Groups = () => {
|
|||
getParents(
|
||||
el,
|
||||
groups,
|
||||
groups.map(({ path }) => path)
|
||||
)
|
||||
groups.map(({ path }) => path),
|
||||
),
|
||||
);
|
||||
}
|
||||
setGroups(groups);
|
||||
},
|
||||
[directMembership]
|
||||
[directMembership],
|
||||
);
|
||||
|
||||
const getParents = (el: Group, groups: Group[], groupsPaths: string[]) => {
|
||||
|
|
|
@ -25,5 +25,5 @@ const root = createRoot(container!);
|
|||
root.render(
|
||||
<StrictMode>
|
||||
<RouterProvider router={router} />
|
||||
</StrictMode>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
|
|
@ -24,8 +24,8 @@ export const LocaleSelector = () => {
|
|||
locales.map<SelectControlOption>((locale) => ({
|
||||
key: locale,
|
||||
value: localeToDisplayName(locale) || "",
|
||||
}))
|
||||
)
|
||||
})),
|
||||
),
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
@ -48,7 +48,7 @@ const PersonalInfo = () => {
|
|||
(personalInfo) => {
|
||||
setUserProfileMetadata(personalInfo.userProfileMetadata);
|
||||
reset(personalInfo);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const onSubmit = async (user: UserRepresentation) => {
|
||||
|
@ -61,7 +61,7 @@ const PersonalInfo = () => {
|
|||
(error as FieldError[]).forEach((e) => {
|
||||
const params = Object.assign(
|
||||
{},
|
||||
e.params.map((p) => (isBundleKey(p) ? unWrap(p) : p))
|
||||
e.params.map((p) => (isBundleKey(p) ? unWrap(p) : p)),
|
||||
);
|
||||
setError(fieldName(e.field) as keyof UserRepresentation, {
|
||||
message: t(e.errorMessage as TFuncKey, {
|
||||
|
|
|
@ -39,8 +39,8 @@ export const EditTheResource = ({
|
|||
try {
|
||||
await Promise.all(
|
||||
permissions.map((permission) =>
|
||||
updatePermissions(resource._id, [permission])
|
||||
)
|
||||
updatePermissions(resource._id, [permission]),
|
||||
),
|
||||
);
|
||||
addAlert(t("updateSuccess"));
|
||||
onClose();
|
||||
|
|
|
@ -40,12 +40,12 @@ export const PermissionRequest = ({
|
|||
|
||||
const approveDeny = async (
|
||||
shareRequest: Permission,
|
||||
approve: boolean = false
|
||||
approve: boolean = false,
|
||||
) => {
|
||||
try {
|
||||
const permissions = await fetchPermission({}, resource._id);
|
||||
const { scopes, username } = permissions.find(
|
||||
(p) => p.username === shareRequest.username
|
||||
(p) => p.username === shareRequest.username,
|
||||
)!;
|
||||
|
||||
await updateRequest(
|
||||
|
@ -53,7 +53,7 @@ export const PermissionRequest = ({
|
|||
username,
|
||||
approve
|
||||
? [...(scopes as string[]), ...(shareRequest.scopes as string[])]
|
||||
: scopes
|
||||
: scopes,
|
||||
);
|
||||
addAlert(t("shareSuccess"));
|
||||
toggle();
|
||||
|
|
|
@ -71,8 +71,8 @@ export const ResourcesTab = () => {
|
|||
await Promise.all(
|
||||
result.data.map(
|
||||
async (r) =>
|
||||
(r.shareRequests = await getPermissionRequests(r._id, { signal }))
|
||||
)
|
||||
(r.shareRequests = await getPermissionRequests(r._id, { signal })),
|
||||
),
|
||||
);
|
||||
return result;
|
||||
},
|
||||
|
@ -80,7 +80,7 @@ export const ResourcesTab = () => {
|
|||
setResources(data);
|
||||
setLinks(links);
|
||||
},
|
||||
[params, key]
|
||||
[params, key],
|
||||
);
|
||||
|
||||
if (!resources) {
|
||||
|
@ -102,7 +102,7 @@ export const ResourcesTab = () => {
|
|||
({
|
||||
username,
|
||||
scopes: [],
|
||||
} as Permission)
|
||||
}) as Permission,
|
||||
)!;
|
||||
await updatePermissions(resource._id, permissions);
|
||||
setDetails({});
|
||||
|
@ -115,7 +115,7 @@ export const ResourcesTab = () => {
|
|||
const toggleOpen = async (
|
||||
id: string,
|
||||
field: keyof PermissionDetail,
|
||||
open: boolean
|
||||
open: boolean,
|
||||
) => {
|
||||
const permissions = await fetchPermissions(id);
|
||||
|
||||
|
@ -162,7 +162,7 @@ export const ResourcesTab = () => {
|
|||
toggleOpen(
|
||||
resource._id,
|
||||
"rowOpen",
|
||||
!details[resource._id]?.rowOpen
|
||||
!details[resource._id]?.rowOpen,
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -70,7 +70,7 @@ export const ShareTheResource = ({
|
|||
});
|
||||
|
||||
const isDisabled = watchFields.every(
|
||||
({ value }) => value.trim().length === 0
|
||||
({ value }) => value.trim().length === 0,
|
||||
);
|
||||
|
||||
const addShare = async ({ usernames, permissions }: FormValues) => {
|
||||
|
@ -79,8 +79,8 @@ export const ShareTheResource = ({
|
|||
usernames
|
||||
.filter(({ value }) => value !== "")
|
||||
.map(({ value: username }) =>
|
||||
updateRequest(resource._id, username, permissions)
|
||||
)
|
||||
updateRequest(resource._id, username, permissions),
|
||||
),
|
||||
);
|
||||
addAlert(t("shareSuccess"));
|
||||
onClose();
|
||||
|
@ -175,7 +175,7 @@ export const ShareTheResource = ({
|
|||
<Chip key={field.id} onClick={() => remove(index)}>
|
||||
{field.value}
|
||||
</Chip>
|
||||
)
|
||||
),
|
||||
)}
|
||||
</ChipGroup>
|
||||
)}
|
||||
|
|
|
@ -99,7 +99,7 @@ function NavMenuItem({ menuItem }: NavMenuItemProps) {
|
|||
const { pathname } = useLocation();
|
||||
const isActive = useMemo(
|
||||
() => matchMenuItem(pathname, menuItem),
|
||||
[pathname, menuItem]
|
||||
[pathname, menuItem],
|
||||
);
|
||||
|
||||
if ("path" in menuItem) {
|
||||
|
|
|
@ -52,7 +52,7 @@ export const Root = () => {
|
|||
signOut: t("signOut"),
|
||||
unknownUser: t("unknownUser"),
|
||||
}),
|
||||
[t]
|
||||
[t],
|
||||
);
|
||||
|
||||
return (
|
||||
|
|
|
@ -45,7 +45,7 @@ export type PromiseResolvedFn<T> = (value: T) => void;
|
|||
export function usePromise<T>(
|
||||
factory: PromiseFactoryFn<T>,
|
||||
callback: PromiseResolvedFn<T>,
|
||||
deps: DependencyList = []
|
||||
deps: DependencyList = [],
|
||||
) {
|
||||
useEffect(() => {
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("Policies", () => {
|
|||
otpPoliciesPage.checkSupportedApplications(
|
||||
"FreeOTP",
|
||||
"Google Authenticator",
|
||||
"Microsoft Authenticator"
|
||||
"Microsoft Authenticator",
|
||||
);
|
||||
otpPoliciesPage.setPolicyType("hotp").increaseInitialCounter().save();
|
||||
masthead.checkNotificationMessage("OTP policy successfully updated");
|
||||
|
@ -48,7 +48,7 @@ describe("Policies", () => {
|
|||
});
|
||||
webauthnPage.webAuthnPolicyCreateTimeout(30).save();
|
||||
masthead.checkNotificationMessage(
|
||||
"Updated webauthn policies successfully"
|
||||
"Updated webauthn policies successfully",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -61,11 +61,11 @@ describe("Policies", () => {
|
|||
webAuthnPolicyRequireResidentKey: "Yes",
|
||||
webAuthnPolicyUserVerificationRequirement: "Preferred",
|
||||
},
|
||||
true
|
||||
true,
|
||||
)
|
||||
.save();
|
||||
masthead.checkNotificationMessage(
|
||||
"Updated webauthn policies successfully"
|
||||
"Updated webauthn policies successfully",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("Authentication - Policies - CIBA", () => {
|
|||
it("displays the initial state", () => {
|
||||
Select.assertSelectedItem(
|
||||
CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(),
|
||||
"Poll"
|
||||
"Poll",
|
||||
);
|
||||
CIBAPolicyPage.getExpiresInput().should("have.value", "120");
|
||||
CIBAPolicyPage.getIntervalInput().should("have.value", "5");
|
||||
|
@ -65,7 +65,7 @@ describe("Authentication - Policies - CIBA", () => {
|
|||
// Select new values for fields.
|
||||
Select.selectItem(
|
||||
CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(),
|
||||
"Ping"
|
||||
"Ping",
|
||||
);
|
||||
CIBAPolicyPage.getExpiresInput().clear().type("140");
|
||||
CIBAPolicyPage.getIntervalInput().clear().type("20");
|
||||
|
@ -77,7 +77,7 @@ describe("Authentication - Policies - CIBA", () => {
|
|||
// Assert values are saved.
|
||||
Select.assertSelectedItem(
|
||||
CIBAPolicyPage.getBackchannelTokenDeliveryModeSelect(),
|
||||
"Ping"
|
||||
"Ping",
|
||||
);
|
||||
CIBAPolicyPage.getExpiresInput().should("have.value", "140");
|
||||
CIBAPolicyPage.getIntervalInput().should("have.value", "20");
|
||||
|
|
|
@ -68,7 +68,7 @@ describe("Authentication test", () => {
|
|||
listingPage.clickRowDetails("Browser").clickDetailMenu("Duplicate");
|
||||
duplicateFlowModal.fill("browser");
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not duplicate flow: New flow alias name already exists"
|
||||
"Could not duplicate flow: New flow alias name already exists",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -85,7 +85,7 @@ describe("Authentication test", () => {
|
|||
detailPage.expectPriorityChange(fromRow, () => {
|
||||
detailPage.moveRowTo(
|
||||
fromRow,
|
||||
`[data-testid="Identity Provider Redirector"]`
|
||||
`[data-testid="Identity Provider Redirector"]`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -124,7 +124,7 @@ describe("Authentication test", () => {
|
|||
listingPage.goToItemDetails("Copy of browser");
|
||||
detailPage.addExecution(
|
||||
"Copy of browser forms",
|
||||
"reset-credentials-choose-user"
|
||||
"reset-credentials-choose-user",
|
||||
);
|
||||
|
||||
masthead.checkNotificationMessage("Flow successfully updated");
|
||||
|
@ -135,7 +135,7 @@ describe("Authentication test", () => {
|
|||
listingPage.goToItemDetails("Copy of browser");
|
||||
detailPage.addCondition(
|
||||
"Copy of browser Browser - Conditional OTP",
|
||||
"conditional-user-role"
|
||||
"conditional-user-role",
|
||||
);
|
||||
|
||||
masthead.checkNotificationMessage("Flow successfully updated");
|
||||
|
@ -146,7 +146,7 @@ describe("Authentication test", () => {
|
|||
listingPage.goToItemDetails("Copy of browser");
|
||||
detailPage.addSubFlow(
|
||||
"Copy of browser Browser - Conditional OTP",
|
||||
flowName
|
||||
flowName,
|
||||
);
|
||||
|
||||
masthead.checkNotificationMessage("Flow successfully updated");
|
||||
|
@ -173,7 +173,7 @@ describe("Authentication test", () => {
|
|||
detailPage.fillCreateForm(
|
||||
flowName,
|
||||
"Some nice description about what this flow does so that we can use it later",
|
||||
"Client flow"
|
||||
"Client flow",
|
||||
);
|
||||
masthead.checkNotificationMessage("Flow created");
|
||||
detailPage.addSubFlowToEmpty(flowName, "EmptySubFlow");
|
||||
|
@ -293,7 +293,7 @@ describe("Accessibility tests for authentication", () => {
|
|||
detailPage.fillCreateForm(
|
||||
flowName,
|
||||
"Some nice description about what this flow does",
|
||||
"Client flow"
|
||||
"Client flow",
|
||||
);
|
||||
cy.checkA11y();
|
||||
});
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Client authentication subtab", () => {
|
|||
authorizationServicesEnabled: true,
|
||||
serviceAccountsEnabled: true,
|
||||
standardFlowEnabled: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
after(() => {
|
||||
|
@ -99,7 +99,7 @@ describe("Client authentication subtab", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Authorization scope created successfully",
|
||||
true
|
||||
true,
|
||||
);
|
||||
authenticationTab.goToScopesSubTab();
|
||||
listingPage.itemExist("The scope");
|
||||
|
@ -109,7 +109,7 @@ describe("Client authentication subtab", () => {
|
|||
authenticationTab.goToPoliciesSubTab();
|
||||
cy.intercept(
|
||||
"GET",
|
||||
"/admin/realms/master/clients/*/authz/resource-server/policy/regex/*"
|
||||
"/admin/realms/master/clients/*/authz/resource-server/policy/regex/*",
|
||||
).as("get");
|
||||
policiesSubTab
|
||||
.createPolicy("regex")
|
||||
|
@ -141,7 +141,7 @@ describe("Client authentication subtab", () => {
|
|||
authenticationTab.goToPoliciesSubTab();
|
||||
cy.intercept(
|
||||
"GET",
|
||||
"/admin/realms/master/clients/*/authz/resource-server/policy/client/*"
|
||||
"/admin/realms/master/clients/*/authz/resource-server/policy/client/*",
|
||||
).as("get");
|
||||
policiesSubTab
|
||||
.createPolicy("client")
|
||||
|
@ -168,11 +168,11 @@ describe("Client authentication subtab", () => {
|
|||
});
|
||||
permissionsSubTab.selectResource("Default Resource").formUtils().save();
|
||||
cy.intercept(
|
||||
"/admin/realms/master/clients/*/authz/resource-server/resource?first=0&max=10&permission=false"
|
||||
"/admin/realms/master/clients/*/authz/resource-server/resource?first=0&max=10&permission=false",
|
||||
).as("load");
|
||||
masthead.checkNotificationMessage(
|
||||
"Successfully created the permission",
|
||||
true
|
||||
true,
|
||||
);
|
||||
authenticationTab.formUtils().cancel();
|
||||
});
|
||||
|
@ -191,7 +191,7 @@ describe("Client authentication subtab", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Successfully exported authorization details.",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ describe("Client registration policies subtab", () => {
|
|||
clientRegistrationPage.modalUtils().confirmModal();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Client registration policy deleted successfully"
|
||||
"Client registration policy deleted successfully",
|
||||
);
|
||||
listingPage.itemExist("policy 2", false);
|
||||
});
|
||||
|
|
|
@ -220,7 +220,7 @@ describe("Client Scopes test", () => {
|
|||
.checkModalMessage(modalMessageDeleteConfirmation)
|
||||
.confirmModal();
|
||||
masthead.checkNotificationMessage(
|
||||
notificationMessageDeletionConfirmation
|
||||
notificationMessageDeletionConfirmation,
|
||||
);
|
||||
listingPage.checkInSearchBarChangeTypeToButtonIsDisabled();
|
||||
});
|
||||
|
@ -235,7 +235,7 @@ describe("Client Scopes test", () => {
|
|||
.checkModalMessage(modalMessageDeleteConfirmation)
|
||||
.confirmModal();
|
||||
masthead.checkNotificationMessage(
|
||||
notificationMessageDeletionConfirmation
|
||||
notificationMessageDeletionConfirmation,
|
||||
);
|
||||
listingPage.checkInSearchBarChangeTypeToButtonIsDisabled();
|
||||
});
|
||||
|
@ -252,7 +252,7 @@ describe("Client Scopes test", () => {
|
|||
.checkModalMessage(modalMessageDeleteConfirmation)
|
||||
.confirmModal();
|
||||
masthead.checkNotificationMessage(
|
||||
notificationMessageDeletionConfirmation
|
||||
notificationMessageDeletionConfirmation,
|
||||
);
|
||||
listingPage.checkInSearchBarChangeTypeToButtonIsDisabled();
|
||||
});
|
||||
|
@ -272,7 +272,7 @@ describe("Client Scopes test", () => {
|
|||
createClientScopePage.fillClientScopeData("address").save();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create client scope: 'Client Scope address already exists'"
|
||||
"Could not create client scope: 'Client Scope address already exists'",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -456,7 +456,7 @@ describe("Client Scopes test", () => {
|
|||
|
||||
mappersTab.addMappersByConfiguration(
|
||||
predefinedMapper,
|
||||
predefinedMapperName
|
||||
predefinedMapperName,
|
||||
);
|
||||
cy.checkA11y();
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ describe("Clients Saml advanced tab", () => {
|
|||
advancedTab.termsOfServiceUrl("not a url").saveFineGrain();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Client could not be updated: Terms of service URL is not a valid URL"
|
||||
"Client could not be updated: Terms of service URL is not a valid URL",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -89,7 +89,7 @@ describe("Clients SAML tests", () => {
|
|||
|
||||
it("should disable client signature", () => {
|
||||
cy.intercept(
|
||||
"admin/realms/master/clients/*/certificates/saml.signing"
|
||||
"admin/realms/master/clients/*/certificates/saml.signing",
|
||||
).as("load");
|
||||
cy.findByTestId("clientSignature").click({ force: true });
|
||||
|
||||
|
@ -106,7 +106,7 @@ describe("Clients SAML tests", () => {
|
|||
|
||||
cy.findByTestId("generate").click();
|
||||
masthead.checkNotificationMessage(
|
||||
"New key pair and certificate generated successfully"
|
||||
"New key pair and certificate generated successfully",
|
||||
);
|
||||
|
||||
modalUtils.confirmModal();
|
||||
|
|
|
@ -61,7 +61,7 @@ describe("Clients test", () => {
|
|||
await adminClient.createClientScope(clientScope);
|
||||
await adminClient.addDefaultClientScopeInClient(
|
||||
clientScopeName + i,
|
||||
clientId
|
||||
clientId,
|
||||
);
|
||||
}
|
||||
clientScope.name = clientScopeNameDefaultType;
|
||||
|
@ -310,7 +310,7 @@ describe("Clients test", () => {
|
|||
commonPage
|
||||
.masthead()
|
||||
.checkNotificationMessage(
|
||||
"Could not create client: 'Client account already exists'"
|
||||
"Could not create client: 'Client account already exists'",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -459,7 +459,7 @@ describe("Clients test", () => {
|
|||
cy.findByTestId("importClient").click();
|
||||
cy.findByTestId("realm-file").selectFile(
|
||||
"cypress/fixtures/partial-import-test-data/import-identical-client.json",
|
||||
{ action: "drag-drop" }
|
||||
{ action: "drag-drop" },
|
||||
);
|
||||
|
||||
cy.wait(1000);
|
||||
|
@ -470,7 +470,7 @@ describe("Clients test", () => {
|
|||
.masthead()
|
||||
.checkNotificationMessage(
|
||||
"Could not import client: Client identical already exists",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -489,7 +489,7 @@ describe("Clients test", () => {
|
|||
clientId: client,
|
||||
protocol: "openid-connect",
|
||||
publicClient: false,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -563,7 +563,7 @@ describe("Clients test", () => {
|
|||
.masthead()
|
||||
.checkNotificationMessage(
|
||||
`Could not create role: Role with name ${itemId} already exists`,
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -595,7 +595,7 @@ describe("Clients test", () => {
|
|||
// Add associated client role
|
||||
associatedRolesPage.addAssociatedRoleFromSearchBar(
|
||||
"manage-account",
|
||||
true
|
||||
true,
|
||||
);
|
||||
commonPage
|
||||
.masthead()
|
||||
|
@ -606,7 +606,7 @@ describe("Clients test", () => {
|
|||
// Add associated client role
|
||||
associatedRolesPage.addAssociatedRoleFromSearchBar(
|
||||
"manage-consent",
|
||||
true
|
||||
true,
|
||||
);
|
||||
commonPage
|
||||
.masthead()
|
||||
|
@ -807,7 +807,7 @@ describe("Clients test", () => {
|
|||
authorizationServicesEnabled: true,
|
||||
serviceAccountsEnabled: true,
|
||||
standardFlowEnabled: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -968,7 +968,7 @@ describe("Clients test", () => {
|
|||
protocol: "openid-connect",
|
||||
clientId: keysName,
|
||||
publicClient: false,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -991,7 +991,7 @@ describe("Clients test", () => {
|
|||
commonPage
|
||||
.masthead()
|
||||
.checkNotificationMessage(
|
||||
"New key pair and certificate generated successfully"
|
||||
"New key pair and certificate generated successfully",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -1036,7 +1036,7 @@ describe("Clients test", () => {
|
|||
protocol: "openid-connect",
|
||||
publicClient: false,
|
||||
bearerOnly: true,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -43,13 +43,13 @@ describe.skip("Events tests", () => {
|
|||
|
||||
before(async () => {
|
||||
const result = await adminClient.createUser(
|
||||
eventsTestUser.userRepresentation
|
||||
eventsTestUser.userRepresentation,
|
||||
);
|
||||
eventsTestUser.eventsTestUserId = result.id!;
|
||||
});
|
||||
|
||||
after(() =>
|
||||
adminClient.deleteUser(eventsTestUser.userRepresentation.username)
|
||||
adminClient.deleteUser(eventsTestUser.userRepresentation.username),
|
||||
);
|
||||
|
||||
describe("User events list", () => {
|
||||
|
@ -175,8 +175,8 @@ describe.skip("Events tests", () => {
|
|||
adminClient.loginUser(
|
||||
eventsTestUser.userRepresentation.username,
|
||||
eventsTestUser.userRepresentation.credentials[0].value,
|
||||
eventsTestUserClientId
|
||||
)
|
||||
eventsTestUserClientId,
|
||||
),
|
||||
);
|
||||
userEventsTab
|
||||
.searchUserEventByUserId(eventsTestUser.eventsTestUserId)
|
||||
|
|
|
@ -46,7 +46,7 @@ describe("Group test", () => {
|
|||
return { id: user.id!, username: username + index };
|
||||
});
|
||||
return user;
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -133,7 +133,7 @@ describe("Group test", () => {
|
|||
|
||||
it("Delete groups from search bar", () => {
|
||||
cy.wrap(null).then(() =>
|
||||
adminClient.createGroup("group_multiple_deletion_test")
|
||||
adminClient.createGroup("group_multiple_deletion_test"),
|
||||
);
|
||||
cy.reload();
|
||||
groupPage
|
||||
|
@ -151,7 +151,7 @@ describe("Group test", () => {
|
|||
range(5).map((index) => {
|
||||
adminClient.addUserToGroup(
|
||||
users[index].id!,
|
||||
createdGroups[index % 3].id
|
||||
createdGroups[index % 3].id,
|
||||
);
|
||||
}),
|
||||
adminClient.createUser({ username: "new", enabled: true }),
|
||||
|
@ -267,7 +267,7 @@ describe("Group test", () => {
|
|||
childGroupsTab
|
||||
.createGroup(predefinedGroups[2], false)
|
||||
.assertNotificationCouldNotCreateGroupWithDuplicatedName(
|
||||
predefinedGroups[2]
|
||||
predefinedGroups[2],
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -317,7 +317,7 @@ describe("Group test", () => {
|
|||
range(5).map((index) => {
|
||||
adminClient.addUserToGroup(
|
||||
users[index].id!,
|
||||
createdGroups[index % 3].id
|
||||
createdGroups[index % 3].id,
|
||||
);
|
||||
}),
|
||||
adminClient.createGroup(emptyGroup),
|
||||
|
|
|
@ -142,7 +142,7 @@ describe("i18n tests", () => {
|
|||
addLocalization(
|
||||
"en",
|
||||
"user-federation:addProvider_other",
|
||||
"addProvider_other en: {{provider}}"
|
||||
"addProvider_other en: {{provider}}",
|
||||
);
|
||||
updateUserLocale("en");
|
||||
|
||||
|
@ -159,20 +159,22 @@ describe("i18n tests", () => {
|
|||
|
||||
function updateUserLocale(locale: string) {
|
||||
cy.wrap(null).then(() =>
|
||||
adminClient.updateUser(usernameI18nId, { attributes: { locale: locale } })
|
||||
adminClient.updateUser(usernameI18nId, {
|
||||
attributes: { locale: locale },
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
function addCommonRealmSettingsLocalizationText(
|
||||
locale: string,
|
||||
value: string
|
||||
value: string,
|
||||
) {
|
||||
addLocalization(locale, "common:realmSettings", value);
|
||||
}
|
||||
|
||||
function addLocalization(locale: string, key: string, value: string) {
|
||||
cy.wrap(null).then(() =>
|
||||
adminClient.addLocalizationText(locale, key, value)
|
||||
adminClient.addLocalizationText(locale, key, value),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -81,16 +81,16 @@ describe("OIDC identity provider test", () => {
|
|||
providerBaseAdvancedSettingsPage.assertOIDCPKCESwitch();
|
||||
//Client Authentication
|
||||
providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication(
|
||||
ClientAuthentication.basicAuth
|
||||
ClientAuthentication.basicAuth,
|
||||
);
|
||||
providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication(
|
||||
ClientAuthentication.jwt
|
||||
ClientAuthentication.jwt,
|
||||
);
|
||||
providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication(
|
||||
ClientAuthentication.jwtPrivKey
|
||||
ClientAuthentication.jwtPrivKey,
|
||||
);
|
||||
providerBaseAdvancedSettingsPage.assertOIDCClientAuthentication(
|
||||
ClientAuthentication.post
|
||||
ClientAuthentication.post,
|
||||
);
|
||||
//Client assertion signature algorithm
|
||||
Object.entries(ClientAssertionSigningAlg).forEach(([, value]) => {
|
||||
|
@ -103,7 +103,7 @@ describe("OIDC identity provider test", () => {
|
|||
providerBaseAdvancedSettingsPage.selectPromptOption(PromptSelect.login);
|
||||
providerBaseAdvancedSettingsPage.selectPromptOption(PromptSelect.select);
|
||||
providerBaseAdvancedSettingsPage.selectPromptOption(
|
||||
PromptSelect.unspecified
|
||||
PromptSelect.unspecified,
|
||||
);
|
||||
//Advanced Settings
|
||||
providerBaseAdvancedSettingsPage.assertAdvancedSettings();
|
||||
|
|
|
@ -81,7 +81,7 @@ describe("SAML identity provider test", () => {
|
|||
addMapperPage.goToMappersTab();
|
||||
addMapperPage.addMapper();
|
||||
addMapperPage.addUsernameTemplateImporterMapper(
|
||||
"SAML Username Template Importer Mapper"
|
||||
"SAML Username Template Importer Mapper",
|
||||
);
|
||||
masthead.checkNotificationMessage(createMapperSuccessMsg, true);
|
||||
});
|
||||
|
@ -92,7 +92,7 @@ describe("SAML identity provider test", () => {
|
|||
addMapperPage.goToMappersTab();
|
||||
addMapperPage.addMapper();
|
||||
addMapperPage.addHardcodedUserSessionAttrMapper(
|
||||
"Hardcoded User Session Attribute"
|
||||
"Hardcoded User Session Attribute",
|
||||
);
|
||||
masthead.checkNotificationMessage(createMapperSuccessMsg, true);
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ describe("Identity provider test", () => {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
);
|
||||
return instance;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ describe("Identity provider test", () => {
|
|||
after(async () => {
|
||||
await Promise.all(
|
||||
socialLoginIdentityProviders.map((idp) =>
|
||||
adminClient.deleteIdentityProvider(idp.alias)
|
||||
)
|
||||
adminClient.deleteIdentityProvider(idp.alias),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -318,7 +318,7 @@ describe("Identity provider test", () => {
|
|||
|
||||
advancedSettings.assertStoreTokensSwitchTurnedOn(false);
|
||||
advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(
|
||||
false
|
||||
false,
|
||||
);
|
||||
advancedSettings.assertDisableUserInfoSwitchTurnedOn(false);
|
||||
advancedSettings.assertTrustEmailSwitchTurnedOn(false);
|
||||
|
@ -338,7 +338,7 @@ describe("Identity provider test", () => {
|
|||
advancedSettings.ensureAdvancedSettingsAreVisible();
|
||||
advancedSettings.assertStoreTokensSwitchTurnedOn(true);
|
||||
advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(
|
||||
true
|
||||
true,
|
||||
);
|
||||
advancedSettings.assertDisableUserInfoSwitchTurnedOn(true);
|
||||
advancedSettings.assertTrustEmailSwitchTurnedOn(true);
|
||||
|
@ -358,19 +358,19 @@ describe("Identity provider test", () => {
|
|||
cy.findByTestId("jump-link-advanced-settings").click();
|
||||
advancedSettings.assertStoreTokensSwitchTurnedOn(true);
|
||||
advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(
|
||||
true
|
||||
true,
|
||||
);
|
||||
advancedSettings.clickStoreTokensSwitch();
|
||||
advancedSettings.clickAcceptsPromptNoneForwardFromClientSwitch();
|
||||
advancedSettings.ensureAdvancedSettingsAreVisible();
|
||||
advancedSettings.assertStoreTokensSwitchTurnedOn(false);
|
||||
advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(
|
||||
false
|
||||
false,
|
||||
);
|
||||
cy.findByTestId("idp-details-revert").click();
|
||||
advancedSettings.assertStoreTokensSwitchTurnedOn(true);
|
||||
advancedSettings.assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("Masthead tests", () => {
|
|||
cy.origin(href, () => {
|
||||
cy.get("#header").should(
|
||||
"contain.text",
|
||||
"Server Administration Guide"
|
||||
"Server Administration Guide",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("Partial realm export", () => {
|
|||
modal.includeGroupsAndRolesSwitch().click({ force: true });
|
||||
modal.exportButton().click();
|
||||
cy.readFile(
|
||||
Cypress.config("downloadsFolder") + "/realm-export.json"
|
||||
Cypress.config("downloadsFolder") + "/realm-export.json",
|
||||
).should("exist");
|
||||
modal.exportButton().should("not.exist");
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("Partial import test", () => {
|
|||
Promise.all([
|
||||
adminClient.createRealm(TEST_REALM),
|
||||
adminClient.createRealm(TEST_REALM_2),
|
||||
])
|
||||
]),
|
||||
);
|
||||
|
||||
after(async () => {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Realm roles test", () => {
|
|||
// The error should inform about duplicated name/id (THIS MESSAGE DOES NOT HAVE QUOTES AS THE OTHERS)
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create role: Role with name admin already exists",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -85,7 +85,7 @@ describe("Realm roles test", () => {
|
|||
listingPage.itemExist(defaultRole).deleteItem(defaultRole);
|
||||
masthead.checkNotificationMessage(
|
||||
"You cannot delete a default role.",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -122,7 +122,7 @@ describe("Realm roles test", () => {
|
|||
// Add associated client role
|
||||
associatedRolesPage.addAssociatedRoleFromSearchBar(
|
||||
"manage-account-links",
|
||||
true
|
||||
true,
|
||||
);
|
||||
masthead.checkNotificationMessage("Associated roles have been added", true);
|
||||
});
|
||||
|
@ -159,7 +159,7 @@ describe("Realm roles test", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Scope mapping successfully removed",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -178,7 +178,7 @@ describe("Realm roles test", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Scope mapping successfully removed",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -209,7 +209,7 @@ describe("Realm roles test", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Scope mapping successfully removed",
|
||||
true
|
||||
true,
|
||||
);
|
||||
listingPage.removeItem("offline_access");
|
||||
sidebarPage.waitForPageLoad();
|
||||
|
@ -218,7 +218,7 @@ describe("Realm roles test", () => {
|
|||
|
||||
masthead.checkNotificationMessage(
|
||||
"Scope mapping successfully removed",
|
||||
true
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -231,7 +231,7 @@ describe("Realm roles test", () => {
|
|||
adminClient.createRealmRole({
|
||||
name: editRoleName,
|
||||
description,
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
after(() => adminClient.deleteRealmRole(editRoleName));
|
||||
|
|
|
@ -48,7 +48,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
|
||||
realmSettingsPage.createNewClientPolicyFromEmptyState(
|
||||
"Test",
|
||||
"Test Description"
|
||||
"Test Description",
|
||||
);
|
||||
masthead.checkNotificationMessage("New policy created");
|
||||
cy.wait("@save");
|
||||
|
@ -88,7 +88,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
modalUtils
|
||||
.checkModalTitle("Delete condition?")
|
||||
.checkModalMessage(
|
||||
"This action will permanently delete client-roles. This cannot be undone."
|
||||
"This action will permanently delete client-roles. This cannot be undone.",
|
||||
)
|
||||
.checkConfirmButtonText("Delete")
|
||||
.cancelButtonContains("Cancel")
|
||||
|
@ -111,7 +111,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
realmSettingsPage.deleteClientPolicyItemFromTable("Test");
|
||||
modalUtils
|
||||
.checkModalMessage(
|
||||
"This action will permanently delete the policy Test. This cannot be undone."
|
||||
"This action will permanently delete the policy Test. This cannot be undone.",
|
||||
)
|
||||
.cancelModal();
|
||||
realmSettingsPage.checkElementInList("Test");
|
||||
|
@ -135,7 +135,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
|
||||
realmSettingsPage.createNewClientPolicyFromEmptyState(
|
||||
"Test",
|
||||
"Test Description"
|
||||
"Test Description",
|
||||
);
|
||||
masthead.checkNotificationMessage("New policy created");
|
||||
cy.wait("@save");
|
||||
|
@ -147,7 +147,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
realmSettingsPage.createNewClientPolicyFromList(
|
||||
"Test",
|
||||
"Test Again Description",
|
||||
true
|
||||
true,
|
||||
);
|
||||
|
||||
realmSettingsPage.shouldShowErrorWhenDuplicate();
|
||||
|
@ -169,7 +169,7 @@ describe("Realm settings client policies tab tests", () => {
|
|||
cy.intercept("PUT", url).as("save");
|
||||
realmSettingsPage.createNewClientPolicyFromEmptyState(
|
||||
"Test again",
|
||||
"Test Again Description"
|
||||
"Test Again Description",
|
||||
);
|
||||
masthead.checkNotificationMessage("New policy created");
|
||||
sidebarPage.waitForPageLoad();
|
||||
|
|
|
@ -87,7 +87,7 @@ describe("Realm settings client profiles tab tests", () => {
|
|||
.saveClientProfileCreation();
|
||||
cy.wait("@save");
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create client profile: 'proposed client profile name duplicated.'"
|
||||
"Could not create client profile: 'proposed client profile name duplicated.'",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -158,7 +158,7 @@ describe("Realm settings client profiles tab tests", () => {
|
|||
.checkModalMessage(
|
||||
"This action will permanently delete the profile " +
|
||||
editedProfileName +
|
||||
". This cannot be undone."
|
||||
". This cannot be undone.",
|
||||
)
|
||||
.cancelModal();
|
||||
realmSettingsPage.checkElementInList(editedProfileName);
|
||||
|
|
|
@ -108,13 +108,13 @@ describe("Realm settings events tab tests", () => {
|
|||
realmSettingsPage.clearEvents("user");
|
||||
modalUtils
|
||||
.checkModalMessage(
|
||||
"If you clear all events of this realm, all records will be permanently cleared in the database"
|
||||
"If you clear all events of this realm, all records will be permanently cleared in the database",
|
||||
)
|
||||
.confirmModal();
|
||||
masthead.checkNotificationMessage("The user events have been cleared");
|
||||
const events = ["Client info", "Client info error"];
|
||||
cy.intercept("GET", `/admin/realms/${realmName}/events/config`).as(
|
||||
"fetchConfig"
|
||||
"fetchConfig",
|
||||
);
|
||||
realmSettingsPage.addUserEvents(events).clickAdd();
|
||||
masthead.checkNotificationMessage("Successfully saved configuration");
|
||||
|
@ -254,7 +254,7 @@ describe("Realm settings events tab tests", () => {
|
|||
cy.get("#kc-l-supported-locales").click();
|
||||
|
||||
cy.intercept("GET", `/admin/realms/${realmName}/localization/en*`).as(
|
||||
"load"
|
||||
"load",
|
||||
);
|
||||
|
||||
cy.findByTestId("localization-tab-save").click();
|
||||
|
@ -263,7 +263,7 @@ describe("Realm settings events tab tests", () => {
|
|||
addBundle();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Success! The message bundle has been added."
|
||||
"Success! The message bundle has been added.",
|
||||
);
|
||||
realmSettingsPage.setDefaultLocale("dansk");
|
||||
cy.findByTestId("localization-tab-save").click();
|
||||
|
@ -315,46 +315,46 @@ describe("Realm settings events tab tests", () => {
|
|||
|
||||
cy.findByTestId(realmSettingsPage.ssoSessionIdleInput).should(
|
||||
"have.value",
|
||||
1
|
||||
1,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.ssoSessionMaxInput).should(
|
||||
"have.value",
|
||||
2
|
||||
2,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.ssoSessionIdleRememberMeInput).should(
|
||||
"have.value",
|
||||
3
|
||||
3,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.ssoSessionMaxRememberMeInput).should(
|
||||
"have.value",
|
||||
4
|
||||
4,
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.clientSessionIdleInput).should(
|
||||
"have.value",
|
||||
5
|
||||
5,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.clientSessionMaxInput).should(
|
||||
"have.value",
|
||||
6
|
||||
6,
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.offlineSessionIdleInput).should(
|
||||
"have.value",
|
||||
7
|
||||
7,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.offlineSessionMaxSwitch).should(
|
||||
"have.value",
|
||||
"on"
|
||||
"on",
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.loginTimeoutInput).should(
|
||||
"have.value",
|
||||
9
|
||||
9,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.loginActionTimeoutInput).should(
|
||||
"have.value",
|
||||
10
|
||||
10,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -376,42 +376,42 @@ describe("Realm settings events tab tests", () => {
|
|||
|
||||
cy.findByTestId(realmSettingsPage.accessTokenLifespanInput).should(
|
||||
"have.value",
|
||||
1
|
||||
1,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.accessTokenLifespanImplicitInput).should(
|
||||
"have.value",
|
||||
2
|
||||
2,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.clientLoginTimeoutInput).should(
|
||||
"have.value",
|
||||
3
|
||||
3,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.userInitiatedActionLifespanInput).should(
|
||||
"have.value",
|
||||
4
|
||||
4,
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.defaultAdminInitatedInput).should(
|
||||
"have.value",
|
||||
5
|
||||
5,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.emailVerificationInput).should(
|
||||
"have.value",
|
||||
6
|
||||
6,
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.idpEmailVerificationInput).should(
|
||||
"have.value",
|
||||
7
|
||||
7,
|
||||
);
|
||||
cy.findByTestId(realmSettingsPage.forgotPasswordInput).should(
|
||||
"have.value",
|
||||
8
|
||||
8,
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.executeActionsInput).should(
|
||||
"have.value",
|
||||
9
|
||||
9,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -32,13 +32,13 @@ describe("Realm settings general tab tests", () => {
|
|||
sidebarPage.goToRealmSettings();
|
||||
realmSettingsPage.toggleSwitch(
|
||||
realmSettingsPage.managedAccessSwitch,
|
||||
false
|
||||
false,
|
||||
);
|
||||
realmSettingsPage.save(realmSettingsPage.generalSaveBtn);
|
||||
masthead.checkNotificationMessage("Realm successfully updated", true);
|
||||
realmSettingsPage.toggleSwitch(
|
||||
realmSettingsPage.managedAccessSwitch,
|
||||
false
|
||||
false,
|
||||
);
|
||||
realmSettingsPage.save(realmSettingsPage.generalSaveBtn);
|
||||
masthead.checkNotificationMessage("Realm successfully updated", true);
|
||||
|
@ -127,8 +127,8 @@ describe("Realm settings general tab tests", () => {
|
|||
"have.attr",
|
||||
"href",
|
||||
`${Cypress.env(
|
||||
"KEYCLOAK_SERVER"
|
||||
)}/realms/${realmName}/.well-known/openid-configuration`
|
||||
"KEYCLOAK_SERVER",
|
||||
)}/realms/${realmName}/.well-known/openid-configuration`,
|
||||
)
|
||||
.should("have.attr", "target", "_blank")
|
||||
.should("have.attr", "rel", "noreferrer noopener");
|
||||
|
@ -152,8 +152,8 @@ describe("Realm settings general tab tests", () => {
|
|||
"have.attr",
|
||||
"href",
|
||||
`${Cypress.env(
|
||||
"KEYCLOAK_SERVER"
|
||||
)}/realms/${realmName}/protocol/saml/descriptor`
|
||||
"KEYCLOAK_SERVER",
|
||||
)}/realms/${realmName}/protocol/saml/descriptor`,
|
||||
)
|
||||
.should("have.attr", "target", "_blank")
|
||||
.should("have.attr", "rel", "noreferrer noopener");
|
||||
|
|
|
@ -39,7 +39,7 @@ describe("Realm settings tabs tests", () => {
|
|||
cy.findByTestId(realmSettingsPage.userProfileTab).should("not.exist");
|
||||
realmSettingsPage.toggleSwitch(
|
||||
realmSettingsPage.profileEnabledSwitch,
|
||||
false
|
||||
false,
|
||||
);
|
||||
realmSettingsPage.save(realmSettingsPage.generalSaveBtn);
|
||||
masthead.checkNotificationMessage("Realm successfully updated");
|
||||
|
@ -75,12 +75,12 @@ describe("Realm settings tabs tests", () => {
|
|||
// Check other values
|
||||
cy.findByTestId(realmSettingsPage.emailAsUsernameSwitch).should(
|
||||
"have.value",
|
||||
"off"
|
||||
"off",
|
||||
);
|
||||
|
||||
cy.findByTestId(realmSettingsPage.verifyEmailSwitch).should(
|
||||
"have.value",
|
||||
"off"
|
||||
"off",
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("User profile tabs", () => {
|
|||
before(() =>
|
||||
adminClient.createRealm(realmName, {
|
||||
attributes: { userProfileEnabled: "true" },
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
after(() => adminClient.deleteRealm(realmName));
|
||||
|
@ -67,7 +67,7 @@ describe("User profile tabs", () => {
|
|||
.createAttribute(attributeName, "Display name")
|
||||
.saveAttributeCreation();
|
||||
masthead.checkNotificationMessage(
|
||||
"Success! User Profile configuration has been saved."
|
||||
"Success! User Profile configuration has been saved.",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -79,7 +79,7 @@ describe("User profile tabs", () => {
|
|||
.editAttribute("Edited display name")
|
||||
.saveAttributeCreation();
|
||||
masthead.checkNotificationMessage(
|
||||
"Success! User Profile configuration has been saved."
|
||||
"Success! User Profile configuration has been saved.",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -101,7 +101,7 @@ describe("User profile tabs", () => {
|
|||
cy.wrap(null).then(() =>
|
||||
adminClient.patchUserProfile(realmName, {
|
||||
groups: [{ name: "Test" }],
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
getUserProfileTab();
|
||||
|
@ -131,7 +131,7 @@ describe("User profile tabs", () => {
|
|||
getJsonEditorTab();
|
||||
userProfileTab.typeJSON(removedThree).saveJSON();
|
||||
masthead.checkNotificationMessage(
|
||||
"User profile settings successfully updated."
|
||||
"User profile settings successfully updated.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -29,9 +29,9 @@ describe("Realm tests", () => {
|
|||
after(() =>
|
||||
Promise.all(
|
||||
[testRealmName, newRealmName, editedRealmName].map((realm) =>
|
||||
adminClient.deleteRealm(realm)
|
||||
)
|
||||
)
|
||||
adminClient.deleteRealm(realm),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
it("should fail creating Master realm", () => {
|
||||
|
@ -39,7 +39,7 @@ describe("Realm tests", () => {
|
|||
createRealmPage.fillRealmName("master").createRealm();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create realm Conflict detected. See logs for details"
|
||||
"Could not create realm Conflict detected. See logs for details",
|
||||
);
|
||||
createRealmPage.cancelRealmCreation();
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@ describe("Sessions test", () => {
|
|||
commonPage
|
||||
.masthead()
|
||||
.checkNotificationMessage(
|
||||
"No push sent. No admin URI configured or no registered cluster nodes available"
|
||||
"No push sent. No admin URI configured or no registered cluster nodes available",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -74,7 +74,7 @@ describe("User Fed Kerberos tests", () => {
|
|||
firstKerberosName,
|
||||
firstKerberosRealm,
|
||||
firstKerberosPrincipal,
|
||||
firstKerberosKeytab
|
||||
firstKerberosKeytab,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
|
||||
|
@ -216,7 +216,7 @@ describe("User Fed Kerberos tests", () => {
|
|||
secondKerberosName,
|
||||
secondKerberosRealm,
|
||||
secondKerberosPrincipal,
|
||||
secondKerberosKeytab
|
||||
secondKerberosKeytab,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ describe("User Fed LDAP mapper tests", () => {
|
|||
truststoreSpiAlways,
|
||||
connectionTimeoutTwoSecs,
|
||||
bindDnCnDc,
|
||||
bindCredsValid
|
||||
bindCredsValid,
|
||||
);
|
||||
providersPage.toggleSwitch(providersPage.enableStartTls);
|
||||
providersPage.toggleSwitch(providersPage.connectionPooling);
|
||||
|
@ -107,7 +107,7 @@ describe("User Fed LDAP mapper tests", () => {
|
|||
firstUserLdapAtt,
|
||||
firstRdnLdapAtt,
|
||||
firstUuidLdapAtt,
|
||||
firstUserObjClasses
|
||||
firstUserObjClasses,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
masthead.checkNotificationMessage(providerCreatedSuccess);
|
||||
|
|
|
@ -99,7 +99,7 @@ describe("User Fed LDAP mapper tests", () => {
|
|||
truststoreSpiAlways,
|
||||
connectionTimeoutTwoSecs,
|
||||
bindDnCnDc,
|
||||
bindCredsValid
|
||||
bindCredsValid,
|
||||
);
|
||||
providersPage.toggleSwitch(providersPage.enableStartTls);
|
||||
providersPage.toggleSwitch(providersPage.connectionPooling);
|
||||
|
@ -110,7 +110,7 @@ describe("User Fed LDAP mapper tests", () => {
|
|||
firstUserLdapAtt,
|
||||
firstRdnLdapAtt,
|
||||
firstUuidLdapAtt,
|
||||
firstUserObjClasses
|
||||
firstUserObjClasses,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
masthead.checkNotificationMessage(providerCreatedSuccess);
|
||||
|
|
|
@ -120,7 +120,7 @@ describe("User Federation LDAP tests", () => {
|
|||
truststoreSpiNever,
|
||||
connectionTimeoutTwoSecs,
|
||||
bindDnCnOnly,
|
||||
bindCredsInvalid
|
||||
bindCredsInvalid,
|
||||
);
|
||||
providersPage.fillLdapSearchingData(
|
||||
editModeReadOnly,
|
||||
|
@ -131,7 +131,7 @@ describe("User Federation LDAP tests", () => {
|
|||
firstUserObjClasses,
|
||||
firstUserLdapFilter,
|
||||
searchScopeOneLevel,
|
||||
firstReadTimeout
|
||||
firstReadTimeout,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
masthead.checkNotificationMessage(createdSuccessMessage);
|
||||
|
@ -159,7 +159,7 @@ describe("User Federation LDAP tests", () => {
|
|||
secondUserLdapAtt,
|
||||
secondRdnLdapAtt,
|
||||
secondUuidLdapAtt,
|
||||
secondUserObjClasses
|
||||
secondUserObjClasses,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
masthead.checkNotificationMessage(savedSuccessMessage);
|
||||
|
@ -221,7 +221,7 @@ describe("User Federation LDAP tests", () => {
|
|||
connectionUrlInvalid,
|
||||
bindTypeNone,
|
||||
truststoreSpiNever,
|
||||
connectionTimeoutTwoSecs
|
||||
connectionTimeoutTwoSecs,
|
||||
);
|
||||
providersPage.toggleSwitch(providersPage.enableStartTls);
|
||||
providersPage.toggleSwitch(providersPage.connectionPooling);
|
||||
|
@ -234,15 +234,15 @@ describe("User Federation LDAP tests", () => {
|
|||
providersPage.clickExistingCard(firstLdapName);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.connectionUrlInput,
|
||||
connectionUrlInvalid
|
||||
connectionUrlInvalid,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.connectionTimeoutInput,
|
||||
connectionTimeoutTwoSecs
|
||||
connectionTimeoutTwoSecs,
|
||||
);
|
||||
providersPage.verifySelect(
|
||||
providersPage.truststoreSpiInput,
|
||||
truststoreSpiNever
|
||||
truststoreSpiNever,
|
||||
);
|
||||
providersPage.verifySelect(providersPage.bindTypeInput, bindTypeNone);
|
||||
providersPage.verifyToggle(providersPage.enableStartTls, "on");
|
||||
|
@ -271,7 +271,7 @@ describe("User Federation LDAP tests", () => {
|
|||
truststoreSpiAlways,
|
||||
connectionTimeoutTwoSecs,
|
||||
bindDnCnDc,
|
||||
bindCredsValid
|
||||
bindCredsValid,
|
||||
);
|
||||
providersPage.toggleSwitch(providersPage.enableStartTls);
|
||||
providersPage.toggleSwitch(providersPage.connectionPooling);
|
||||
|
@ -296,11 +296,11 @@ describe("User Federation LDAP tests", () => {
|
|||
|
||||
providersPage.fillTextField(
|
||||
providersPage.ldapKerberosRealmInput,
|
||||
kerberosRealm
|
||||
kerberosRealm,
|
||||
);
|
||||
providersPage.fillTextField(
|
||||
providersPage.ldapServerPrincipalInput,
|
||||
serverPrincipal
|
||||
serverPrincipal,
|
||||
);
|
||||
providersPage.fillTextField(providersPage.ldapKeyTabInput, keyTab);
|
||||
|
||||
|
@ -312,11 +312,11 @@ describe("User Federation LDAP tests", () => {
|
|||
providersPage.clickExistingCard(firstLdapName);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapKerberosRealmInput,
|
||||
kerberosRealm
|
||||
kerberosRealm,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapServerPrincipalInput,
|
||||
serverPrincipal
|
||||
serverPrincipal,
|
||||
);
|
||||
providersPage.verifyTextField(providersPage.ldapKeyTabInput, keyTab);
|
||||
providersPage.verifyToggle(providersPage.allowKerberosAuth, "on");
|
||||
|
@ -336,11 +336,11 @@ describe("User Federation LDAP tests", () => {
|
|||
providersPage.fillTextField(providersPage.ldapBatchSizeInput, batchSize);
|
||||
providersPage.fillTextField(
|
||||
providersPage.ldapFullSyncPeriodInput,
|
||||
fullSyncPeriod
|
||||
fullSyncPeriod,
|
||||
);
|
||||
providersPage.fillTextField(
|
||||
providersPage.ldapUsersSyncPeriodInput,
|
||||
userSyncPeriod
|
||||
userSyncPeriod,
|
||||
);
|
||||
|
||||
providersPage.save(provider);
|
||||
|
@ -352,11 +352,11 @@ describe("User Federation LDAP tests", () => {
|
|||
providersPage.verifyTextField(providersPage.ldapBatchSizeInput, batchSize);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapFullSyncPeriodInput,
|
||||
fullSyncPeriod
|
||||
fullSyncPeriod,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUsersSyncPeriodInput,
|
||||
userSyncPeriod
|
||||
userSyncPeriod,
|
||||
);
|
||||
providersPage.verifyToggle(providersPage.periodicFullSync, "on");
|
||||
providersPage.verifyToggle(providersPage.periodicUsersSync, "on");
|
||||
|
@ -376,7 +376,7 @@ describe("User Federation LDAP tests", () => {
|
|||
secondUserObjClasses,
|
||||
secondUserLdapFilter,
|
||||
searchScopeSubtree,
|
||||
secondReadTimeout
|
||||
secondReadTimeout,
|
||||
);
|
||||
providersPage.toggleSwitch(providersPage.ldapPagination);
|
||||
|
||||
|
@ -389,39 +389,39 @@ describe("User Federation LDAP tests", () => {
|
|||
|
||||
providersPage.verifySelect(
|
||||
providersPage.ldapEditModeInput,
|
||||
editModeWritable
|
||||
editModeWritable,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUsersDnInput,
|
||||
secondUsersDn
|
||||
secondUsersDn,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUserLdapAttInput,
|
||||
secondUserLdapAtt
|
||||
secondUserLdapAtt,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapRdnLdapAttInput,
|
||||
secondRdnLdapAtt
|
||||
secondRdnLdapAtt,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUuidLdapAttInput,
|
||||
secondUuidLdapAtt
|
||||
secondUuidLdapAtt,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUserObjClassesInput,
|
||||
secondUserObjClasses
|
||||
secondUserObjClasses,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapUserLdapFilter,
|
||||
secondUserLdapFilter
|
||||
secondUserLdapFilter,
|
||||
);
|
||||
providersPage.verifySelect(
|
||||
providersPage.ldapSearchScopeInput,
|
||||
searchScopeSubtree
|
||||
searchScopeSubtree,
|
||||
);
|
||||
providersPage.verifyTextField(
|
||||
providersPage.ldapReadTimeout,
|
||||
secondReadTimeout
|
||||
secondReadTimeout,
|
||||
);
|
||||
providersPage.verifyToggle(providersPage.ldapPagination, "on");
|
||||
|
||||
|
@ -452,7 +452,7 @@ describe("User Federation LDAP tests", () => {
|
|||
|
||||
providersPage.verifySelect(
|
||||
providersPage.ldapEditModeInput,
|
||||
editModeUnsynced
|
||||
editModeUnsynced,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -542,7 +542,7 @@ describe("User Federation LDAP tests", () => {
|
|||
truststoreSpiNever,
|
||||
connectionTimeoutTwoSecs,
|
||||
bindDnCnOnly,
|
||||
bindCredsInvalid
|
||||
bindCredsInvalid,
|
||||
);
|
||||
providersPage.fillLdapSearchingData(
|
||||
editModeWritable,
|
||||
|
@ -550,7 +550,7 @@ describe("User Federation LDAP tests", () => {
|
|||
secondUserLdapAtt,
|
||||
secondRdnLdapAtt,
|
||||
secondUuidLdapAtt,
|
||||
secondUserObjClasses
|
||||
secondUserObjClasses,
|
||||
);
|
||||
providersPage.save(provider);
|
||||
masthead.checkNotificationMessage(createdSuccessMessage);
|
||||
|
|
|
@ -242,7 +242,7 @@ describe("User creation", () => {
|
|||
enabled: true,
|
||||
}),
|
||||
identityProviders.forEach((idp) =>
|
||||
adminClient.createIdentityProvider(idp.displayName, idp.alias)
|
||||
adminClient.createIdentityProvider(idp.displayName, idp.alias),
|
||||
),
|
||||
]);
|
||||
});
|
||||
|
@ -251,8 +251,8 @@ describe("User creation", () => {
|
|||
await adminClient.deleteUser(usernameIdpLinksTest);
|
||||
await Promise.all(
|
||||
identityProviders.map((idp) =>
|
||||
adminClient.deleteIdentityProvider(idp.alias)
|
||||
)
|
||||
adminClient.deleteIdentityProvider(idp.alias),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -267,7 +267,7 @@ describe("User creation", () => {
|
|||
|
||||
if (linkedIdpsCount == 0) {
|
||||
identityProviderLinksTab.assertNoIdentityProvidersLinkedMessageExist(
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
identityProviderLinksTab
|
||||
|
@ -285,7 +285,7 @@ describe("User creation", () => {
|
|||
.assertAvailableIdentityProviderExist($idp.testName, false);
|
||||
if (availableIdpsCount - 1 == 0) {
|
||||
identityProviderLinksTab.assertNoAvailableIdentityProvidersMessageExist(
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -295,8 +295,8 @@ describe("User creation", () => {
|
|||
cy.wrap(null).then(() =>
|
||||
adminClient.unlinkAccountIdentityProvider(
|
||||
usernameIdpLinksTest,
|
||||
identityProviders[0].displayName
|
||||
)
|
||||
identityProviders[0].displayName,
|
||||
),
|
||||
);
|
||||
|
||||
sidebarPage.goToUsers();
|
||||
|
@ -306,15 +306,15 @@ describe("User creation", () => {
|
|||
cy.wrap(null).then(() =>
|
||||
adminClient.linkAccountIdentityProvider(
|
||||
usernameIdpLinksTest,
|
||||
identityProviders[0].displayName
|
||||
)
|
||||
identityProviders[0].displayName,
|
||||
),
|
||||
);
|
||||
|
||||
identityProviderLinksTab
|
||||
.clickLinkAccount(identityProviders[0].testName)
|
||||
.assertLinkAccountModalTitleEqual(identityProviders[0].testName)
|
||||
.assertLinkAccountModalIdentityProviderInputEqual(
|
||||
identityProviders[0].testName
|
||||
identityProviders[0].testName,
|
||||
)
|
||||
.typeLinkAccountModalUserId("testUserId")
|
||||
.typeLinkAccountModalUsername("testUsername")
|
||||
|
@ -329,7 +329,7 @@ describe("User creation", () => {
|
|||
|
||||
if (availableIdpsCount == 0) {
|
||||
identityProviderLinksTab.assertNoAvailableIdentityProvidersMessageExist(
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
identityProviderLinksTab
|
||||
|
@ -344,7 +344,7 @@ describe("User creation", () => {
|
|||
.assertAvailableIdentityProviderExist($idp.testName, true);
|
||||
if (linkedIdpsCount - 1 == 0) {
|
||||
identityProviderLinksTab.assertNoIdentityProvidersLinkedMessageExist(
|
||||
true
|
||||
true,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -358,7 +358,7 @@ describe("User creation", () => {
|
|||
.clickEmptyStateResetBtn()
|
||||
.fillResetCredentialForm();
|
||||
masthead.checkNotificationMessage(
|
||||
"Failed: Failed to send execute actions email"
|
||||
"Failed: Failed to send execute actions email",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -370,7 +370,7 @@ describe("User creation", () => {
|
|||
.fillResetCredentialForm();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"Failed: Failed to send execute actions email"
|
||||
"Failed: Failed to send execute actions email",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -383,7 +383,7 @@ describe("User creation", () => {
|
|||
.clickEditConfirmationBtn();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"The user label has been changed successfully."
|
||||
"The user label has been changed successfully.",
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -404,7 +404,7 @@ describe("User creation", () => {
|
|||
modalUtils.checkModalTitle("Delete credentials?").confirmModal();
|
||||
|
||||
masthead.checkNotificationMessage(
|
||||
"The credentials has been deleted successfully."
|
||||
"The credentials has been deleted successfully.",
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -5,21 +5,21 @@ export default class FormValidation {
|
|||
|
||||
static assertMinValue(
|
||||
chain: Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
minValue: number
|
||||
minValue: number,
|
||||
) {
|
||||
this.#getHelperText(chain).should(
|
||||
"have.text",
|
||||
`Must be greater than ${minValue}`
|
||||
`Must be greater than ${minValue}`,
|
||||
);
|
||||
}
|
||||
|
||||
static assertMaxValue(
|
||||
chain: Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
maxValue: number
|
||||
maxValue: number,
|
||||
) {
|
||||
this.#getHelperText(chain).should(
|
||||
"have.text",
|
||||
`Must be less than ${maxValue}`
|
||||
`Must be less than ${maxValue}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
export default class Select {
|
||||
static assertSelectedItem(
|
||||
chain: Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
itemName: string
|
||||
itemName: string,
|
||||
) {
|
||||
chain.should("have.text", itemName);
|
||||
}
|
||||
|
||||
static selectItem(
|
||||
chain: Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
itemName: string
|
||||
itemName: string,
|
||||
) {
|
||||
chain.click();
|
||||
this.#getSelectMenu(chain).contains(itemName).click();
|
||||
|
|
|
@ -43,13 +43,13 @@ export default class CommonElements {
|
|||
|
||||
checkElementIsDisabled(
|
||||
element: Cypress.Chainable<JQuery<HTMLElement>>,
|
||||
disabled: boolean
|
||||
disabled: boolean,
|
||||
) {
|
||||
element.then(($btn) => {
|
||||
if ($btn.hasClass("pf-m-disabled")) {
|
||||
element.should(
|
||||
(!disabled ? "not." : "") + "have.class",
|
||||
"pf-m-disabled"
|
||||
"pf-m-disabled",
|
||||
);
|
||||
} else {
|
||||
element.should((!disabled ? "not." : "") + "have.attr", "disabled");
|
||||
|
|
|
@ -37,7 +37,7 @@ export default class LoginPage {
|
|||
validate() {
|
||||
cy.get('[role="progressbar"]').should("not.exist");
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ export default class Masthead extends CommonElements {
|
|||
.document()
|
||||
.then(({ documentElement }) => documentElement.getBoundingClientRect())
|
||||
.then(({ width }) =>
|
||||
cy.get(width < 1024 ? this.userDrpDwnKebab : this.userDrpDwn)
|
||||
cy.get(width < 1024 ? this.userDrpDwnKebab : this.userDrpDwn),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ export default class SidebarPage extends CommonElements {
|
|||
cy.findByTestId(this.realmsDrpDwn).click();
|
||||
cy.get('[data-testid="realmSelector"] li').should(
|
||||
"have.length",
|
||||
length + 1 // account for button
|
||||
length + 1, // account for button
|
||||
);
|
||||
cy.findByTestId(this.realmsDrpDwn).click({ force: true });
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class FormPage extends CommonElements {
|
|||
checkSaveButtonIsDisabled(disabled: boolean) {
|
||||
this.checkElementIsDisabled(
|
||||
cy.get(this.primaryBtn).contains("Save"),
|
||||
disabled
|
||||
disabled,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class PageObject {
|
|||
|
||||
protected assertIsVisible(
|
||||
element: Cypress.Chainable<JQuery>,
|
||||
isVisible: boolean
|
||||
isVisible: boolean,
|
||||
) {
|
||||
element.should((!isVisible ? "not." : "") + "be.visible");
|
||||
return this;
|
||||
|
@ -30,13 +30,13 @@ export default class PageObject {
|
|||
|
||||
protected assertIsEnabled(
|
||||
element: Cypress.Chainable<JQuery>,
|
||||
isEnabled = true
|
||||
isEnabled = true,
|
||||
) {
|
||||
element.then(($btn) => {
|
||||
if ($btn.hasClass("pf-m-disabled")) {
|
||||
element.should(
|
||||
(isEnabled ? "not." : "") + "have.class",
|
||||
"pf-m-disabled"
|
||||
"pf-m-disabled",
|
||||
);
|
||||
} else {
|
||||
element.should((isEnabled ? "not." : "") + "have.attr", "disabled");
|
||||
|
@ -61,7 +61,7 @@ export default class PageObject {
|
|||
|
||||
protected assertSwitchStateOn(
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
isOn = true
|
||||
isOn = true,
|
||||
) {
|
||||
(element ?? cy.get(this.switchInput))
|
||||
.parent()
|
||||
|
@ -76,7 +76,7 @@ export default class PageObject {
|
|||
|
||||
protected assertDropdownMenuIsOpen(
|
||||
isOpen = true,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
this.assertExist(element ?? cy.get(this.drpDwnMenuList), isOpen);
|
||||
return this;
|
||||
|
@ -85,13 +85,13 @@ export default class PageObject {
|
|||
protected assertDropdownMenuIsClosed(element?: Cypress.Chainable<JQuery>) {
|
||||
return this.assertDropdownMenuIsOpen(
|
||||
false,
|
||||
element ?? cy.get(this.drpDwnMenuList)
|
||||
element ?? cy.get(this.drpDwnMenuList),
|
||||
);
|
||||
}
|
||||
|
||||
protected clickDropdownMenuItem(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
(element ?? cy.get(this.drpDwnMenuItem).contains(itemName)).click();
|
||||
return this;
|
||||
|
@ -99,7 +99,7 @@ export default class PageObject {
|
|||
|
||||
protected clickDropdownMenuToggleButton(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -110,7 +110,7 @@ export default class PageObject {
|
|||
|
||||
protected openDropdownMenu(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -122,7 +122,7 @@ export default class PageObject {
|
|||
|
||||
protected closeDropdownMenu(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -135,19 +135,19 @@ export default class PageObject {
|
|||
protected assertDropdownMenuItemIsSelected(
|
||||
itemName: string,
|
||||
isSelected: boolean,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element = element ?? cy.get(this.drpDwnMenuItem);
|
||||
this.assertExist(
|
||||
element.contains(itemName).find(this.selectItemSelectedIcon),
|
||||
isSelected
|
||||
isSelected,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
protected assertDropdownMenuHasItems(
|
||||
items: string[],
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
const initialElement = element;
|
||||
for (const item of items) {
|
||||
|
@ -159,7 +159,7 @@ export default class PageObject {
|
|||
|
||||
protected assertDropdownMenuHasLabels(
|
||||
items: string[],
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
const initialElement = element;
|
||||
for (const item of items) {
|
||||
|
@ -171,7 +171,7 @@ export default class PageObject {
|
|||
|
||||
protected assertDropdownMenuItemsEqualTo(
|
||||
number: number,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element = element ?? cy.get(this.drpDwnMenuList);
|
||||
element.find(this.drpDwnMenuItem).should(($item) => {
|
||||
|
@ -182,7 +182,7 @@ export default class PageObject {
|
|||
|
||||
protected assertSelectMenuIsOpen(
|
||||
isOpen = true,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element = element ?? cy.get(this.selectMenuList);
|
||||
return this.assertDropdownMenuIsOpen(isOpen, element);
|
||||
|
@ -195,7 +195,7 @@ export default class PageObject {
|
|||
|
||||
protected clickSelectMenuItem(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -205,7 +205,7 @@ export default class PageObject {
|
|||
|
||||
protected clickSelectMenuToggleButton(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -224,7 +224,7 @@ export default class PageObject {
|
|||
|
||||
protected closeSelectMenu(
|
||||
itemName: string,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element =
|
||||
element ??
|
||||
|
@ -237,7 +237,7 @@ export default class PageObject {
|
|||
protected assertSelectMenuItemIsSelected(
|
||||
itemName: string,
|
||||
isSelected: boolean,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element = element ?? cy.get(this.selectMenuItem);
|
||||
return this.assertDropdownMenuItemIsSelected(itemName, isSelected, element);
|
||||
|
@ -245,7 +245,7 @@ export default class PageObject {
|
|||
|
||||
protected assertSelectMenuHasItems(
|
||||
items: string[],
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
const initialElement = element;
|
||||
for (const item of items) {
|
||||
|
@ -257,7 +257,7 @@ export default class PageObject {
|
|||
|
||||
protected assertSelectMenuItemsEqualTo(
|
||||
number: number,
|
||||
element?: Cypress.Chainable<JQuery>
|
||||
element?: Cypress.Chainable<JQuery>,
|
||||
) {
|
||||
element = element ?? cy.get(this.selectMenuList);
|
||||
element.find(this.selectMenuItem).should(($item) => {
|
||||
|
@ -320,11 +320,11 @@ export default class PageObject {
|
|||
protected assertChipGroupItemExist(
|
||||
groupName: string,
|
||||
itemName: string,
|
||||
exist: boolean
|
||||
exist: boolean,
|
||||
) {
|
||||
this.assertExist(
|
||||
this.getChipGroup(groupName).contains(this.chipItem, itemName),
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ export default class TabPage extends CommonElements {
|
|||
checkTabExists(
|
||||
tabName: string,
|
||||
exists: boolean,
|
||||
index: number | undefined = 0
|
||||
index: number | undefined = 0,
|
||||
) {
|
||||
const condition = exists ? "exist" : "not.exist";
|
||||
this.getTab(tabName, index).should(condition);
|
||||
|
|
|
@ -27,7 +27,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
selectRowItemCheckbox(itemName: string) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.contains(itemName)
|
||||
.parentsUntil("tbody")
|
||||
|
@ -38,7 +38,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
clickRowItemLink(itemName: string) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.contains(itemName)
|
||||
.click();
|
||||
|
@ -47,7 +47,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
selectRowItemAction(itemName: string, actionItemName: string) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.contains(itemName)
|
||||
.parentsUntil("tbody")
|
||||
|
@ -63,7 +63,7 @@ export default class TablePage extends CommonElements {
|
|||
this.tableRowItem +
|
||||
":nth-child(" +
|
||||
row +
|
||||
")"
|
||||
")",
|
||||
)
|
||||
.find("td:nth-child(" + column + ")")
|
||||
.type(value);
|
||||
|
@ -76,7 +76,7 @@ export default class TablePage extends CommonElements {
|
|||
this.tableRowItem +
|
||||
":nth-child(" +
|
||||
row +
|
||||
")"
|
||||
")",
|
||||
)
|
||||
.find("td:nth-child(" + column + ") " + appendChildren)
|
||||
.click();
|
||||
|
@ -86,10 +86,10 @@ export default class TablePage extends CommonElements {
|
|||
clickRowItemByItemName(
|
||||
itemName: string,
|
||||
column: number,
|
||||
appendChildren?: string
|
||||
appendChildren?: string,
|
||||
) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.find("td:nth-child(" + column + ") " + appendChildren)
|
||||
.contains(itemName)
|
||||
|
@ -100,7 +100,7 @@ export default class TablePage extends CommonElements {
|
|||
clickHeaderItem(column: number, appendChildren?: string) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") +
|
||||
this.tableHeaderRowItem
|
||||
this.tableHeaderRowItem,
|
||||
)
|
||||
.find("td:nth-child(" + column + ") " + appendChildren)
|
||||
.click();
|
||||
|
@ -109,7 +109,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
checkRowItemsEqualTo(amount: number) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.its("length")
|
||||
.should("be.eq", amount);
|
||||
|
@ -118,7 +118,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
checkRowItemsGreaterThan(amount: number) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.its("length")
|
||||
.should("be.gt", amount);
|
||||
|
@ -127,7 +127,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
checkRowItemExists(itemName: string, exist = true) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.contains(itemName)
|
||||
.should((!exist ? "not." : "") + "exist");
|
||||
|
@ -136,7 +136,7 @@ export default class TablePage extends CommonElements {
|
|||
|
||||
checkRowItemValueByItemName(itemName: string, column: number, value: string) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") + this.tableRowItem,
|
||||
)
|
||||
.contains(itemName)
|
||||
.parentsUntil("tbody")
|
||||
|
@ -149,14 +149,14 @@ export default class TablePage extends CommonElements {
|
|||
row: number,
|
||||
column: number,
|
||||
value: string,
|
||||
appendChildren?: string
|
||||
appendChildren?: string,
|
||||
) {
|
||||
cy.get(
|
||||
(this.tableInModal ? ".pf-c-modal-box.pf-m-md " : "") +
|
||||
this.tableRowItem +
|
||||
":nth-child(" +
|
||||
row +
|
||||
")"
|
||||
")",
|
||||
)
|
||||
.find("td:nth-child(" + column + ") " + appendChildren)
|
||||
.should("have.text", value)
|
||||
|
|
|
@ -9,7 +9,7 @@ export default class GroupModal {
|
|||
typeResourceFile = (filename: string) => {
|
||||
cy.get("#partial-import-file-filename").selectFile(
|
||||
"cypress/fixtures/partial-import-test-data/" + filename,
|
||||
{ action: "drag-drop" }
|
||||
{ action: "drag-drop" },
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ export default class RoleMappingTab {
|
|||
|
||||
assignRole(notEmpty = true) {
|
||||
cy.findByTestId(
|
||||
notEmpty ? this.assignEmptyRoleBtn(this.type) : this.assignRoleBtn
|
||||
notEmpty ? this.assignEmptyRoleBtn(this.type) : this.assignRoleBtn,
|
||||
).click();
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ export default class FlowDetails {
|
|||
const executionId = rowDetails.children().attr("data-id");
|
||||
cy.intercept(
|
||||
"POST",
|
||||
`/admin/realms/test*/authentication/executions/${executionId}/lower-priority`
|
||||
`/admin/realms/test*/authentication/executions/${executionId}/lower-priority`,
|
||||
).as("priority");
|
||||
callback();
|
||||
cy.wait("@priority");
|
||||
|
@ -90,7 +90,7 @@ export default class FlowDetails {
|
|||
|
||||
private fillSubFlowModal(subFlowName: string, name: string) {
|
||||
cy.get(".pf-c-modal-box__title-text").contains(
|
||||
"Add step to " + subFlowName
|
||||
"Add step to " + subFlowName,
|
||||
);
|
||||
cy.findByTestId("name").type(name);
|
||||
cy.findByTestId("modal-add").click();
|
||||
|
@ -99,7 +99,7 @@ export default class FlowDetails {
|
|||
fillCreateForm(
|
||||
name: string,
|
||||
description: string,
|
||||
type: "Basic flow" | "Client flow"
|
||||
type: "Basic flow" | "Client flow",
|
||||
) {
|
||||
cy.findByTestId("name").type(name);
|
||||
cy.findByTestId("description").type(description);
|
||||
|
|
|
@ -17,7 +17,7 @@ export default class OTPPolicies {
|
|||
checkSupportedApplications(...supportedApplications: string[]) {
|
||||
cy.findByTestId("supportedApplications").should(
|
||||
"have.text",
|
||||
supportedApplications.join("")
|
||||
supportedApplications.join(""),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export default class WebAuthnPolicies {
|
|||
cy.get(
|
||||
`#${
|
||||
isPasswordLess ? prop.replace("Policy", "PolicyPasswordless") : prop
|
||||
}`
|
||||
}`,
|
||||
)
|
||||
.click()
|
||||
.parent()
|
||||
|
|
|
@ -43,7 +43,7 @@ export default class CreateClientScopePage extends CommonPage {
|
|||
name: string,
|
||||
description = "",
|
||||
consentScreenText = "",
|
||||
displayOrder = ""
|
||||
displayOrder = "",
|
||||
) {
|
||||
cy.get(this.clientScopeNameInput).clear();
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ export default class CreateClientPage extends CommonPage {
|
|||
name = "",
|
||||
description = "",
|
||||
alwaysDisplay?: boolean,
|
||||
frontchannelLogout?: boolean
|
||||
frontchannelLogout?: boolean,
|
||||
) {
|
||||
cy.get(this.clientIdInput).clear();
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import type PolicyRepresentation from "@keycloak/keycloak-admin-client/lib/defs/
|
|||
export default class CreatePermissionPage extends CommonPage {
|
||||
fillPermissionForm(permission: PolicyRepresentation) {
|
||||
Object.entries(permission).map(([key, value]) =>
|
||||
cy.get(`#${key}`).type(value)
|
||||
cy.get(`#${key}`).type(value),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class AdvancedSamlTab extends PageObject {
|
|||
checkTermsOfServiceUrl(termsOfServiceUrl: string) {
|
||||
cy.findAllByTestId(this.termsOfServiceUrlId).should(
|
||||
"have.value",
|
||||
termsOfServiceUrl
|
||||
termsOfServiceUrl,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ export default class AdvancedTab extends PageObject {
|
|||
new Date().toLocaleString("en-US", {
|
||||
dateStyle: "long",
|
||||
timeStyle: "short",
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -89,7 +89,7 @@ export default class AdvancedTab extends PageObject {
|
|||
checkTestClusterAvailability(active: boolean) {
|
||||
cy.get(this.testClusterAvailability).should(
|
||||
(active ? "not." : "") + "have.class",
|
||||
"pf-m-disabled"
|
||||
"pf-m-disabled",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ export default class AdvancedTab extends PageObject {
|
|||
checkAccessTokenSignatureAlgorithm(algorithm: string) {
|
||||
cy.get(this.accessTokenSignatureAlgorithmInput).should(
|
||||
"have.text",
|
||||
algorithm
|
||||
algorithm,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ export default class AdvancedTab extends PageObject {
|
|||
.parent()
|
||||
.click();
|
||||
this.assertSwitchStateOn(
|
||||
cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch)
|
||||
cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch),
|
||||
);
|
||||
cy.get(this.useLowerCaseBearerTypeSwitch).parent().click();
|
||||
this.assertSwitchStateOn(cy.get(this.useLowerCaseBearerTypeSwitch));
|
||||
|
@ -191,7 +191,7 @@ export default class AdvancedTab extends PageObject {
|
|||
.parent()
|
||||
.click();
|
||||
this.assertSwitchStateOff(
|
||||
cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch)
|
||||
cy.get(this.useRefreshTokenForClientCredentialsGrantSwitch),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ export default class AdvancedTab extends PageObject {
|
|||
cy.get(this.oAuthMutualSwitch).scrollIntoView();
|
||||
this.assertSwitchStateOn(cy.get(this.oAuthMutualSwitch));
|
||||
this.assertSwitchStateOn(
|
||||
cy.get(this.pushedAuthorizationRequestRequiredSwitch)
|
||||
cy.get(this.pushedAuthorizationRequestRequiredSwitch),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ export default class AdvancedTab extends PageObject {
|
|||
checkAdvancedSwitchesOff() {
|
||||
this.assertSwitchStateOff(cy.get(this.oAuthMutualSwitch));
|
||||
this.assertSwitchStateOff(
|
||||
cy.get(this.pushedAuthorizationRequestRequiredSwitch)
|
||||
cy.get(this.pushedAuthorizationRequestRequiredSwitch),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class KeysTab extends CommonPage {
|
|||
archiveFormat: string,
|
||||
keyAlias: string,
|
||||
keyPassword: string,
|
||||
storePassword: string
|
||||
storePassword: string,
|
||||
) {
|
||||
cy.get("#archiveFormat").click();
|
||||
cy.findAllByRole("option").contains(archiveFormat).click();
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class PoliciesTab extends CommonPage {
|
|||
|
||||
fillBasePolicyForm(policy: { [key: string]: string }) {
|
||||
Object.entries(policy).map(([key, value]) =>
|
||||
cy.findByTestId(key).type(value)
|
||||
cy.findByTestId(key).type(value),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ export default class InitialAccessTokenTab extends CommonPage {
|
|||
checkExpirationGreaterThanZeroError() {
|
||||
cy.get(this.expirationText).should(
|
||||
"have.text",
|
||||
"Value should should be greater or equal to 1"
|
||||
"Value should should be greater or equal to 1",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
|
||||
public assertAdminSearchDropdownMenuHasLabels() {
|
||||
super.assertDropdownMenuHasLabels(
|
||||
Object.values(AdminEventsTabSearchFormFieldsLabel)
|
||||
Object.values(AdminEventsTabSearchFormFieldsLabel),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertResourceTypesChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.ResourceTypes,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertOperationTypesChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.OperationTypes,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -220,19 +220,19 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertResourcePathChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.ResourcePath,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
public assertResourcePathChipGroupItemExist(
|
||||
itemName: string,
|
||||
exist: boolean
|
||||
exist: boolean,
|
||||
) {
|
||||
super.assertChipGroupItemExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.ResourcePath,
|
||||
itemName,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertRealmChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.Realm,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertClientChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.Client,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertIpAddressChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.IpAddress,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertDateFromChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.DateFrom,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ export default class AdminEventsTab extends PageObject {
|
|||
public assertDateToChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
AdminEventsTabSearchFormFieldsLabel.DateTo,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public openSearchUserEventDropdownMenu() {
|
||||
super.openDropdownMenu(
|
||||
"",
|
||||
cy.findByTestId(this.searchUserEventDrpDwnToggle)
|
||||
cy.findByTestId(this.searchUserEventDrpDwnToggle),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ export default class UserEventsTab extends PageObject {
|
|||
|
||||
public assertUserSearchDropdownMenuHasLabels() {
|
||||
super.assertDropdownMenuHasLabels(
|
||||
Object.values(UserEventsTabSearchFormFieldsLabel)
|
||||
Object.values(UserEventsTabSearchFormFieldsLabel),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public removeEventTypeChipGroupItem(itemName: string) {
|
||||
super.removeChipGroupItem(
|
||||
UserEventsTabSearchFormFieldsLabel.EventType,
|
||||
itemName
|
||||
itemName,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ export default class UserEventsTab extends PageObject {
|
|||
super.assertChipGroupItemExist(
|
||||
UserEventsTabSearchFormFieldsLabel.EventType,
|
||||
itemName,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertUserIdChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.UserId,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertEventTypeChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.EventType,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertClientChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.Client,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertDateFromChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.DateFrom,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertDateToChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.DateTo,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ export default class UserEventsTab extends PageObject {
|
|||
public assertIpAddressChipGroupExist(exist: boolean) {
|
||||
super.assertChipGroupExist(
|
||||
UserEventsTabSearchFormFieldsLabel.IpAddress,
|
||||
exist
|
||||
exist,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ export default class GroupPage extends PageObject {
|
|||
|
||||
public moveGroupItemAction(
|
||||
groupName: string,
|
||||
destinationGroupName: string[]
|
||||
destinationGroupName: string[],
|
||||
) {
|
||||
listingPage.clickRowDetails(groupName);
|
||||
listingPage.clickDetailMenu("Move to");
|
||||
|
@ -176,18 +176,18 @@ export default class GroupPage extends PageObject {
|
|||
|
||||
public assertNotificationCouldNotCreateGroupWithEmptyName() {
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create group Group name is missing"
|
||||
"Could not create group Group name is missing",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
public assertNotificationCouldNotCreateGroupWithDuplicatedName(
|
||||
groupName: string
|
||||
groupName: string,
|
||||
) {
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not create group Top level group named '" +
|
||||
groupName +
|
||||
"' already exists."
|
||||
"' already exists.",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ export default class GroupDetailPage extends GroupPage {
|
|||
super.openDropdownMenu("", cy.findByTestId(this.actionDrpDwnButton));
|
||||
super.clickDropdownMenuItem(
|
||||
"",
|
||||
cy.findByTestId(this.actionDrpDwnItemRenameGroup)
|
||||
cy.findByTestId(this.actionDrpDwnItemRenameGroup),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export default class GroupDetailPage extends GroupPage {
|
|||
super.openDropdownMenu("", cy.findByTestId(this.actionDrpDwnButton));
|
||||
super.clickDropdownMenuItem(
|
||||
"",
|
||||
cy.findByTestId(this.actionDrpDwnItemDeleteGroup)
|
||||
cy.findByTestId(this.actionDrpDwnItemDeleteGroup),
|
||||
);
|
||||
modalUtils.confirmModal();
|
||||
return this;
|
||||
|
|
|
@ -61,14 +61,14 @@ export default class MembersTab extends GroupDetailPage {
|
|||
|
||||
public assertNotificationUserAddedToTheGroup(amount: number) {
|
||||
masthead.checkNotificationMessage(
|
||||
`${amount} user${amount > 1 ? "s" : ""} added to the group`
|
||||
`${amount} user${amount > 1 ? "s" : ""} added to the group`,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
public assertNotificationUserLeftTheGroup(amount: number) {
|
||||
masthead.checkNotificationMessage(
|
||||
`${amount} user${amount > 1 ? "s" : ""} left the group`
|
||||
`${amount} user${amount > 1 ? "s" : ""} left the group`,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ export default class AddMapperPage {
|
|||
|
||||
cy.findByTestId(this.socialProfileJSONfieldPath).clear();
|
||||
cy.findByTestId(this.socialProfileJSONfieldPath).type(
|
||||
"social profile JSON field path"
|
||||
"social profile JSON field path",
|
||||
);
|
||||
|
||||
cy.findByTestId(this.userAttributeName).clear();
|
||||
|
@ -175,7 +175,7 @@ export default class AddMapperPage {
|
|||
|
||||
cy.findByTestId(this.userSessionAttributeValue).clear();
|
||||
cy.findByTestId(this.userSessionAttributeValue).type(
|
||||
"user session attribute value"
|
||||
"user session attribute value",
|
||||
);
|
||||
|
||||
this.saveNewMapper();
|
||||
|
@ -323,7 +323,7 @@ export default class AddMapperPage {
|
|||
cy.findByTestId(this.socialProfileJSONfieldPath).clear();
|
||||
|
||||
cy.findByTestId(this.socialProfileJSONfieldPath).type(
|
||||
"social profile JSON field path edited"
|
||||
"social profile JSON field path edited",
|
||||
);
|
||||
|
||||
cy.findByTestId(this.userAttributeName).clear();
|
||||
|
|
|
@ -43,7 +43,7 @@ export default class CreateProviderPage {
|
|||
|
||||
checkAddButtonDisabled(disabled = true) {
|
||||
cy.findByTestId(this.addButton).should(
|
||||
!disabled ? "not." : "" + "be.disabled"
|
||||
!disabled ? "not." : "" + "be.disabled",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ export default class CreateProviderPage {
|
|||
shouldBeSuccessful() {
|
||||
cy.findByTestId(this.discoveryEndpoint).should(
|
||||
"have.class",
|
||||
"pf-m-success"
|
||||
"pf-m-success",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
cy.get(this.firstLoginFlowSelect).click();
|
||||
super.clickSelectMenuItem(
|
||||
loginFlowOption,
|
||||
cy.get(".pf-c-select__menu-item").contains(loginFlowOption)
|
||||
cy.get(".pf-c-select__menu-item").contains(loginFlowOption),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -165,18 +165,18 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
cy.get(this.postLoginFlowSelect).click();
|
||||
super.clickSelectMenuItem(
|
||||
loginFlowOption,
|
||||
cy.get(".pf-c-select__menu-item").contains(loginFlowOption)
|
||||
cy.get(".pf-c-select__menu-item").contains(loginFlowOption),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
public selectClientAssertSignAlg(
|
||||
clientAssertionSigningAlg: ClientAssertionSigningAlg
|
||||
clientAssertionSigningAlg: ClientAssertionSigningAlg,
|
||||
) {
|
||||
cy.get(this.clientAssertionSigningAlg).click();
|
||||
super.clickSelectMenuItem(
|
||||
clientAssertionSigningAlg,
|
||||
cy.get(".pf-c-select__menu-item").contains(clientAssertionSigningAlg)
|
||||
cy.get(".pf-c-select__menu-item").contains(clientAssertionSigningAlg),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
cy.get(this.syncModeSelect).click();
|
||||
super.clickSelectMenuItem(
|
||||
syncModeOption,
|
||||
cy.get(".pf-c-select__menu-item").contains(syncModeOption)
|
||||
cy.get(".pf-c-select__menu-item").contains(syncModeOption),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
cy.get(this.promptSelect).click();
|
||||
super.clickSelectMenuItem(
|
||||
promptOption,
|
||||
cy.get(".pf-c-select__menu-item").contains(promptOption).parent()
|
||||
cy.get(".pf-c-select__menu-item").contains(promptOption).parent(),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
public assertAcceptsPromptNoneForwardFromClientSwitchTurnedOn(isOn: boolean) {
|
||||
super.assertSwitchStateOn(
|
||||
cy.get(this.acceptsPromptNoneForwardFromClientSwitch).parent(),
|
||||
isOn
|
||||
isOn,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
public assertDisableUserInfoSwitchTurnedOn(isOn: boolean) {
|
||||
super.assertSwitchStateOn(
|
||||
cy.get(this.disableUserInfoSwitch).parent(),
|
||||
isOn
|
||||
isOn,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
public assertHideOnLoginPageSwitchTurnedOn(isOn: boolean) {
|
||||
super.assertSwitchStateOn(
|
||||
cy.get(this.hideOnLoginPageSwitch).parent(),
|
||||
isOn
|
||||
isOn,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -269,14 +269,14 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
}
|
||||
|
||||
public assertFirstLoginFlowSelectOptionEqual(
|
||||
loginFlowOption: LoginFlowOption
|
||||
loginFlowOption: LoginFlowOption,
|
||||
) {
|
||||
cy.get(this.firstLoginFlowSelect).should("have.text", loginFlowOption);
|
||||
return this;
|
||||
}
|
||||
|
||||
public assertPostLoginFlowSelectOptionEqual(
|
||||
loginFlowOption: LoginFlowOption
|
||||
loginFlowOption: LoginFlowOption,
|
||||
) {
|
||||
cy.get(this.postLoginFlowSelect).should("have.text", loginFlowOption);
|
||||
return this;
|
||||
|
@ -288,11 +288,11 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
}
|
||||
|
||||
public assertClientAssertSigAlgSelectOptionEqual(
|
||||
clientAssertionSigningAlg: ClientAssertionSigningAlg
|
||||
clientAssertionSigningAlg: ClientAssertionSigningAlg,
|
||||
) {
|
||||
cy.get(this.clientAssertionSigningAlg).should(
|
||||
"have.text",
|
||||
clientAssertionSigningAlg
|
||||
clientAssertionSigningAlg,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
this.clickSaveBtn();
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not update the provider The url [" + url + "_url] is malformed",
|
||||
true
|
||||
true,
|
||||
);
|
||||
this.clickRevertBtn();
|
||||
//cy.findByTestId(url + "Url").contains
|
||||
|
@ -382,7 +382,7 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
|
||||
this.clickAcceptsPromptNoneForwardFromClientSwitch();
|
||||
super.assertSwitchStateOn(
|
||||
cy.get(this.acceptsPromptNoneForwardFromClientSwitch)
|
||||
cy.get(this.acceptsPromptNoneForwardFromClientSwitch),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -413,12 +413,12 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
this.assertHideOnLoginPageSwitchTurnedOn(false);
|
||||
|
||||
this.assertFirstLoginFlowSelectOptionEqual(
|
||||
LoginFlowOption.firstBrokerLogin
|
||||
LoginFlowOption.firstBrokerLogin,
|
||||
);
|
||||
this.assertPostLoginFlowSelectOptionEqual(LoginFlowOption.none);
|
||||
this.assertSyncModeSelectOptionEqual(SyncModeOption.import);
|
||||
this.assertClientAssertSigAlgSelectOptionEqual(
|
||||
ClientAssertionSigningAlg.algorithmNotSpecified
|
||||
ClientAssertionSigningAlg.algorithmNotSpecified,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -122,12 +122,12 @@ export default class ProviderBaseGeneralSettingsPage extends PageObject {
|
|||
protected assertCommonFilledDataEqual(idpName: string) {
|
||||
cy.get(this.clientIdInput).should(
|
||||
"have.value",
|
||||
this.testData["ClientId"] + idpName
|
||||
this.testData["ClientId"] + idpName,
|
||||
);
|
||||
cy.get(this.clientSecretInput).should("contain.value", "****");
|
||||
cy.get(this.displayOrderInput).should(
|
||||
"have.value",
|
||||
this.testData["DisplayOrder"]
|
||||
this.testData["DisplayOrder"],
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral
|
|||
public assertAdditionalUsersProfileFieldsInputEqual(value: string) {
|
||||
cy.findByTestId(this.additionalUsersProfileFieldsInput).should(
|
||||
"have.value",
|
||||
value
|
||||
value,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral
|
|||
public fillData(idpName: string) {
|
||||
this.fillCommonFields(idpName);
|
||||
this.typeAdditionalUsersProfileFieldsInput(
|
||||
idpName + additionalUsersProfile_input_test_value
|
||||
idpName + additionalUsersProfile_input_test_value,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ export default class ProviderFacebookGeneralSettings extends ProviderBaseGeneral
|
|||
public assertFilledDataEqual(idpName: string) {
|
||||
this.assertCommonFilledDataEqual(idpName);
|
||||
this.assertAdditionalUsersProfileFieldsInputEqual(
|
||||
idpName + additionalUsersProfile_input_test_value
|
||||
idpName + additionalUsersProfile_input_test_value,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class ProviderGoogleGeneralSettings extends ProviderBaseGeneralSe
|
|||
public assertRequestRefreshTokenSwitchTurnedOn(isOn: boolean) {
|
||||
super.assertSwitchStateOn(
|
||||
cy.findByTestId(this.requestRefreshTokenSwitch),
|
||||
isOn
|
||||
isOn,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export default class ProviderOpenshiftGeneralSettings extends ProviderBaseGenera
|
|||
public fillData(idpName: string) {
|
||||
this.fillCommonFields(idpName);
|
||||
cy.findByTestId(this.baseUrlInput).type(
|
||||
idpName + base_url_input_test_value
|
||||
idpName + base_url_input_test_value,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ export default class ProviderPage {
|
|||
verifyChangedHourInput(expected: string, unexpected: string) {
|
||||
expect(cy.get(this.cacheHourInput).contains(expected).should("exist"));
|
||||
expect(
|
||||
cy.get(this.cacheHourInput).contains(unexpected).should("not.exist")
|
||||
cy.get(this.cacheHourInput).contains(unexpected).should("not.exist"),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ export default class ProviderPage {
|
|||
name: string,
|
||||
realm: string,
|
||||
principal: string,
|
||||
keytab: string
|
||||
keytab: string,
|
||||
) {
|
||||
if (name) {
|
||||
cy.findByTestId(this.kerberosNameInput).clear().type(name);
|
||||
|
@ -229,7 +229,7 @@ export default class ProviderPage {
|
|||
truststoreSpi?: string,
|
||||
connectionTimeout?: string,
|
||||
bindDn?: string,
|
||||
bindCreds?: string
|
||||
bindCreds?: string,
|
||||
) {
|
||||
cy.findByTestId(this.connectionUrlInput).clear().type(connectionUrl);
|
||||
|
||||
|
@ -263,7 +263,7 @@ export default class ProviderPage {
|
|||
userObjClasses?: string,
|
||||
userLdapFilter?: string,
|
||||
searchScope?: string,
|
||||
readTimeout?: string
|
||||
readTimeout?: string,
|
||||
) {
|
||||
cy.get(this.ldapEditModeInput).click();
|
||||
cy.get(this.ldapEditModeList).contains(editMode).click();
|
||||
|
|
|
@ -27,7 +27,7 @@ export default class AssociatedRolesPage {
|
|||
|
||||
cy.findByTestId(this.compositeRoleBadge).should(
|
||||
"contain.text",
|
||||
"Composite"
|
||||
"Composite",
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -86,7 +86,7 @@ export default class AssociatedRolesPage {
|
|||
isRemoveAssociatedRolesBtnDisabled() {
|
||||
cy.findByTestId(this.removeRolesButton).should(
|
||||
"have.class",
|
||||
"pf-m-disabled"
|
||||
"pf-m-disabled",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
disableRealm() {
|
||||
cy.get(this.modalDialogTitle).contains("Disable realm?");
|
||||
cy.get(this.modalDialogBodyText).contains(
|
||||
"User and clients can't access the realm if it's disabled. Are you sure you want to continue?"
|
||||
"User and clients can't access the realm if it's disabled. Are you sure you want to continue?",
|
||||
);
|
||||
cy.findByTestId(this.modalConfirm).contains("Disable").click();
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success. The provider has been deleted."
|
||||
"Success. The provider has been deleted.",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
changeTimeUnit(
|
||||
unit: "Minutes" | "Hours" | "Days",
|
||||
inputType: string,
|
||||
listType: string
|
||||
listType: string,
|
||||
) {
|
||||
switch (unit) {
|
||||
case "Minutes":
|
||||
|
@ -518,38 +518,38 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
this.changeTimeUnit(
|
||||
"Minutes",
|
||||
this.ssoSessionIdleSelectMenu,
|
||||
this.ssoSessionIdleSelectMenuList
|
||||
this.ssoSessionIdleSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.ssoSessionMaxInput).clear().type("2");
|
||||
this.changeTimeUnit(
|
||||
"Hours",
|
||||
this.ssoSessionMaxSelectMenu,
|
||||
this.ssoSessionMaxSelectMenuList
|
||||
this.ssoSessionMaxSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.ssoSessionIdleRememberMeInput).clear().type("3");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.ssoSessionIdleRememberMeSelectMenu,
|
||||
this.ssoSessionIdleRememberMeSelectMenuList
|
||||
this.ssoSessionIdleRememberMeSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.ssoSessionMaxRememberMeInput).clear().type("4");
|
||||
this.changeTimeUnit(
|
||||
"Minutes",
|
||||
this.ssoSessionMaxRememberMeSelectMenu,
|
||||
this.ssoSessionMaxRememberMeSelectMenuList
|
||||
this.ssoSessionMaxRememberMeSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.clientSessionIdleInput).clear().type("5");
|
||||
this.changeTimeUnit(
|
||||
"Hours",
|
||||
this.clientSessionIdleSelectMenu,
|
||||
this.clientSessionIdleSelectMenuList
|
||||
this.clientSessionIdleSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.clientSessionMaxInput).clear().type("6");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.clientSessionMaxSelectMenu,
|
||||
this.clientSessionMaxSelectMenuList
|
||||
this.clientSessionMaxSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.offlineSessionIdleInput).clear().type("7");
|
||||
|
@ -559,13 +559,13 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
this.changeTimeUnit(
|
||||
"Minutes",
|
||||
this.loginTimeoutSelectMenu,
|
||||
this.loginTimeoutSelectMenuList
|
||||
this.loginTimeoutSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.loginActionTimeoutInput).clear().type("10");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.loginActionTimeoutSelectMenu,
|
||||
this.loginActionTimeoutSelectMenuList
|
||||
this.loginActionTimeoutSelectMenuList,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -579,61 +579,61 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.accessTokenLifespanSelectMenu,
|
||||
this.accessTokenLifespanSelectMenuList
|
||||
this.accessTokenLifespanSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.accessTokenLifespanImplicitInput).clear().type("2");
|
||||
this.changeTimeUnit(
|
||||
"Minutes",
|
||||
this.accessTokenLifespanImplicitSelectMenu,
|
||||
this.accessTokenLifespanImplicitSelectMenuList
|
||||
this.accessTokenLifespanImplicitSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.clientLoginTimeoutInput).clear().type("3");
|
||||
this.changeTimeUnit(
|
||||
"Hours",
|
||||
this.clientLoginTimeoutSelectMenu,
|
||||
this.clientLoginTimeoutSelectMenuList
|
||||
this.clientLoginTimeoutSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.userInitiatedActionLifespanInput).clear().type("4");
|
||||
this.changeTimeUnit(
|
||||
"Minutes",
|
||||
this.userInitiatedActionLifespanSelectMenu,
|
||||
this.userInitiatedActionLifespanSelectMenuList
|
||||
this.userInitiatedActionLifespanSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.defaultAdminInitatedInput).clear().type("5");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.defaultAdminInitatedInputSelectMenu,
|
||||
this.defaultAdminInitatedInputSelectMenuList
|
||||
this.defaultAdminInitatedInputSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.emailVerificationInput).clear().type("6");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.emailVerificationSelectMenu,
|
||||
this.emailVerificationSelectMenuList
|
||||
this.emailVerificationSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.idpEmailVerificationInput).clear().type("7");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.idpEmailVerificationSelectMenu,
|
||||
this.idpEmailVerificationSelectMenuList
|
||||
this.idpEmailVerificationSelectMenuList,
|
||||
);
|
||||
|
||||
cy.findByTestId(this.forgotPasswordInput).clear().type("8");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.forgotPasswordSelectMenu,
|
||||
this.forgotPasswordSelectMenuList
|
||||
this.forgotPasswordSelectMenuList,
|
||||
);
|
||||
cy.findByTestId(this.executeActionsInput).clear().type("9");
|
||||
this.changeTimeUnit(
|
||||
"Days",
|
||||
this.executeActionsSelectMenu,
|
||||
this.executeActionsSelectMenuList
|
||||
this.executeActionsSelectMenuList,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -675,7 +675,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.eventListenersSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Event listener has been updated."
|
||||
"Event listener has been updated.",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -684,7 +684,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.eventListenersSaveBtn).click({ force: true });
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Event listener has been updated."
|
||||
"Event listener has been updated.",
|
||||
);
|
||||
cy.get(this.eventListenersDrpDwn).should("not.have.text", "email");
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.jsonEditorSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"The client profiles configuration was updated"
|
||||
"The client profiles configuration was updated",
|
||||
);
|
||||
cy.findByTestId(this.formViewProfilesView).check();
|
||||
cy.get("table").should("be.visible").contains("td", "Test");
|
||||
|
@ -792,7 +792,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.saveNewClientProfileBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Client profile updated successfully"
|
||||
"Client profile updated successfully",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
shouldShowErrorWhenDuplicate() {
|
||||
cy.get("form").should(
|
||||
"not.have.text",
|
||||
"The name must be unique within the realm"
|
||||
"The name must be unique within the realm",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.reloadBtn).click();
|
||||
cy.findByTestId(this.newClientProfileNameInput).should(
|
||||
"have.value",
|
||||
"Edit"
|
||||
"Edit",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -828,7 +828,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.get(this.clientProfileTwo).click();
|
||||
cy.get('h2[class*="kc-emptyExecutors"]').should(
|
||||
"have.text",
|
||||
"No executors configured"
|
||||
"No executors configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -842,7 +842,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.get(this.addExecutorCancelBtn).click();
|
||||
cy.get('h2[class*="kc-emptyExecutors"]').should(
|
||||
"have.text",
|
||||
"No executors configured"
|
||||
"No executors configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -856,11 +856,11 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addExecutorSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success! Executor created successfully"
|
||||
"Success! Executor created successfully",
|
||||
);
|
||||
cy.get('ul[class*="pf-c-data-list"]').should(
|
||||
"have.text",
|
||||
"secure-ciba-signed-authn-req"
|
||||
"secure-ciba-signed-authn-req",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -869,22 +869,22 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.get('svg[class*="kc-executor-trash-icon"]').click();
|
||||
cy.get(this.modalDialogTitle).contains("Delete executor?");
|
||||
cy.get(this.modalDialogBodyText).contains(
|
||||
"The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone."
|
||||
"The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone.",
|
||||
);
|
||||
cy.findByTestId(this.modalConfirm).contains("Delete");
|
||||
cy.get(this.deleteDialogCancelBtn).contains("Cancel").click();
|
||||
cy.get('ul[class*="pf-c-data-list"]').should(
|
||||
"have.text",
|
||||
"secure-ciba-signed-authn-req"
|
||||
"secure-ciba-signed-authn-req",
|
||||
);
|
||||
}
|
||||
|
||||
openProfileDetails(name: string) {
|
||||
cy.intercept(
|
||||
`/admin/realms/${this.realmName}/client-policies/profiles*`
|
||||
`/admin/realms/${this.realmName}/client-policies/profiles*`,
|
||||
).as("profilesFetch");
|
||||
cy.get(
|
||||
'a[href*="realm-settings/client-policies/' + name + '/edit-profile"]'
|
||||
'a[href*="realm-settings/client-policies/' + name + '/edit-profile"]',
|
||||
).click();
|
||||
cy.wait("@profilesFetch");
|
||||
return this;
|
||||
|
@ -892,7 +892,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
|
||||
editExecutor(availablePeriod?: number) {
|
||||
cy.intercept(
|
||||
`/admin/realms/${this.realmName}/client-policies/profiles*`
|
||||
`/admin/realms/${this.realmName}/client-policies/profiles*`,
|
||||
).as("profilesFetch");
|
||||
cy.get(this.editExecutorBtn).click();
|
||||
cy.wait("@profilesFetch");
|
||||
|
@ -917,7 +917,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
checkExecutorNotInList() {
|
||||
cy.get('ul[class*="pf-c-data-list"]').should(
|
||||
"have.text",
|
||||
"secure-ciba-signed-authn-req"
|
||||
"secure-ciba-signed-authn-req",
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
checkAvailablePeriodExecutor(value: number) {
|
||||
cy.findByTestId(this.availablePeriodExecutorFld).should(
|
||||
"have.value",
|
||||
value
|
||||
value,
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
@ -937,7 +937,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addExecutorSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Executor updated successfully"
|
||||
"Executor updated successfully",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -946,13 +946,13 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.get('svg[class*="kc-executor-trash-icon"]').click();
|
||||
cy.get(this.modalDialogTitle).contains("Delete executor?");
|
||||
cy.get(this.modalDialogBodyText).contains(
|
||||
"The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone."
|
||||
"The action will permanently delete secure-ciba-signed-authn-req. This cannot be undone.",
|
||||
);
|
||||
cy.findByTestId(this.modalConfirm).contains("Delete");
|
||||
cy.findByTestId(this.modalConfirm).click();
|
||||
cy.get('h2[class*="kc-emptyExecutors"]').should(
|
||||
"have.text",
|
||||
"No executors configured"
|
||||
"No executors configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -985,7 +985,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"The client policy configuration was updated"
|
||||
"The client policy configuration was updated",
|
||||
);
|
||||
cy.findByTestId(this.formViewSelectPolicies).check();
|
||||
cy.get("table").should("be.visible").contains("td", "Test");
|
||||
|
@ -997,7 +997,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.jsonEditorReloadBtn).contains("Reload");
|
||||
cy.findByTestId(this.formViewSelectPolicies).check();
|
||||
cy.findByTestId(this.createPolicyEmptyStateBtn).contains(
|
||||
"Create client policy"
|
||||
"Create client policy",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
createNewClientPolicyFromList(
|
||||
name: string,
|
||||
description: string,
|
||||
cancel?: boolean
|
||||
cancel?: boolean,
|
||||
) {
|
||||
cy.findByTestId(this.createPolicyBtn).click();
|
||||
cy.findByTestId(this.newClientPolicyNameInput).type(name);
|
||||
|
@ -1049,7 +1049,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.get(this.clientPolicy).click();
|
||||
cy.get('h2[class*="kc-emptyConditions"]').should(
|
||||
"have.text",
|
||||
"No conditions configured"
|
||||
"No conditions configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1063,7 +1063,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addConditionCancelBtn).click();
|
||||
cy.get('h2[class*="kc-emptyConditions"]').should(
|
||||
"have.text",
|
||||
"No conditions configured"
|
||||
"No conditions configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addConditionSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success! Condition created successfully"
|
||||
"Success! Condition created successfully",
|
||||
);
|
||||
cy.get('ul[class*="pf-c-data-list"]').should("have.text", "client-roles");
|
||||
}
|
||||
|
@ -1105,7 +1105,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addConditionSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success! Condition created successfully"
|
||||
"Success! Condition created successfully",
|
||||
);
|
||||
cy.get('ul[class*="pf-c-data-list"]').contains("client-scopes");
|
||||
}
|
||||
|
@ -1121,7 +1121,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addConditionSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success! Condition updated successfully"
|
||||
"Success! Condition updated successfully",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.addConditionSaveBtn).click();
|
||||
cy.get(this.alertMessage).should(
|
||||
"be.visible",
|
||||
"Success! Condition updated successfully"
|
||||
"Success! Condition updated successfully",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1155,13 +1155,13 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
cy.findByTestId(this.deleteClientScopesConditionBtn).click();
|
||||
cy.get(this.modalDialogTitle).contains("Delete condition?");
|
||||
cy.get(this.modalDialogBodyText).contains(
|
||||
"This action will permanently delete client-scopes. This cannot be undone."
|
||||
"This action will permanently delete client-scopes. This cannot be undone.",
|
||||
);
|
||||
cy.findByTestId(this.modalConfirm).contains("Delete");
|
||||
cy.findByTestId(this.modalConfirm).click({ force: true });
|
||||
cy.get('h2[class*="kc-emptyConditions"]').should(
|
||||
"have.text",
|
||||
"No conditions configured"
|
||||
"No conditions configured",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1183,7 @@ export default class RealmSettingsPage extends CommonPage {
|
|||
createNewClientPolicyFromEmptyState(
|
||||
name: string,
|
||||
description: string,
|
||||
cancel?: boolean
|
||||
cancel?: boolean,
|
||||
) {
|
||||
cy.findByTestId(this.createPolicyEmptyStateBtn).click();
|
||||
cy.findByTestId(this.newClientPolicyNameInput).type(name);
|
||||
|
|
|
@ -40,7 +40,7 @@ export default class AdminEventsSettingsTab extends PageObject {
|
|||
{ waitForRealm, waitForConfig } = {
|
||||
waitForRealm: true,
|
||||
waitForConfig: false,
|
||||
}
|
||||
},
|
||||
) {
|
||||
waitForRealm && cy.intercept("/admin/realms/*").as("saveRealm");
|
||||
waitForConfig &&
|
||||
|
|
|
@ -62,7 +62,7 @@ export default class IdentityProviderLinksTab {
|
|||
public assertNoIdentityProvidersLinkedMessageExist(exist: boolean) {
|
||||
cy.get(this.linkedProvidersSection).should(
|
||||
(exist ? "" : "not.") + "contain.text",
|
||||
"No identity providers linked. Choose one from the list below."
|
||||
"No identity providers linked. Choose one from the list below.",
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -71,7 +71,7 @@ export default class IdentityProviderLinksTab {
|
|||
public assertNoAvailableIdentityProvidersMessageExist(exist: boolean) {
|
||||
cy.get(this.availableProvidersSection).should(
|
||||
(exist ? "" : "not.") + "contain.text",
|
||||
"No available identity providers."
|
||||
"No available identity providers.",
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -92,7 +92,7 @@ export default class IdentityProviderLinksTab {
|
|||
public assertLinkAccountModalIdentityProviderInputEqual(idpName: string) {
|
||||
cy.findByTestId(this.linkAccountModalIdentityProviderInput).should(
|
||||
"have.value",
|
||||
idpName
|
||||
idpName,
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -106,7 +106,7 @@ export default class IdentityProviderLinksTab {
|
|||
|
||||
public assertNotificationAlreadyLinkedError() {
|
||||
masthead.checkNotificationMessage(
|
||||
"Could not link identity provider User is already linked with provider"
|
||||
"Could not link identity provider User is already linked with provider",
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -144,7 +144,7 @@ export default class IdentityProviderLinksTab {
|
|||
public assertLinkedIdentityProviderExist(idpName: string, exist: boolean) {
|
||||
cy.get(this.linkedProvidersSection).should(
|
||||
(exist ? "" : "not.") + "contain.text",
|
||||
idpName
|
||||
idpName,
|
||||
);
|
||||
|
||||
return this;
|
||||
|
@ -153,7 +153,7 @@ export default class IdentityProviderLinksTab {
|
|||
public assertAvailableIdentityProviderExist(idpName: string, exist: boolean) {
|
||||
cy.get(this.availableProvidersSection).should(
|
||||
(exist ? "" : "not.") + "contain.text",
|
||||
idpName
|
||||
idpName,
|
||||
);
|
||||
|
||||
return this;
|
||||
|
|
|
@ -83,7 +83,7 @@ class AdminClient {
|
|||
} else {
|
||||
parentGroup = await this.client.groups.createChildGroup(
|
||||
{ id: parentGroup.id },
|
||||
{ name: group }
|
||||
{ name: group },
|
||||
);
|
||||
}
|
||||
createdGroups.push(parentGroup);
|
||||
|
@ -107,7 +107,7 @@ class AdminClient {
|
|||
|
||||
if (!createdUser) {
|
||||
throw new Error(
|
||||
"Unable to create user, created user could not be found."
|
||||
"Unable to create user, created user could not be found.",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ class AdminClient {
|
|||
|
||||
async addDefaultClientScopeInClient(
|
||||
clientScopeName: string,
|
||||
clientId: string
|
||||
clientId: string,
|
||||
) {
|
||||
await this.login();
|
||||
const scope = await this.client.clientScopes.findOneByName({
|
||||
|
@ -192,7 +192,7 @@ class AdminClient {
|
|||
|
||||
async removeDefaultClientScopeInClient(
|
||||
clientScopeName: string,
|
||||
clientId: string
|
||||
clientId: string,
|
||||
) {
|
||||
await this.login();
|
||||
const scope = await this.client.clientScopes.findOneByName({
|
||||
|
@ -211,7 +211,7 @@ class AdminClient {
|
|||
const currentProfile = await this.client.users.getProfile({ realm });
|
||||
|
||||
await this.client.users.updateProfile(
|
||||
merge(currentProfile, payload, { realm })
|
||||
merge(currentProfile, payload, { realm }),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ class AdminClient {
|
|||
|
||||
async unlinkAccountIdentityProvider(
|
||||
username: string,
|
||||
idpDisplayName: string
|
||||
idpDisplayName: string,
|
||||
) {
|
||||
await this.login();
|
||||
const user = await this.client.users.find({ username });
|
||||
|
@ -282,7 +282,7 @@ class AdminClient {
|
|||
await this.login();
|
||||
await this.client.realms.addLocalization(
|
||||
{ realm: this.client.realmName, selectedLocale: locale, key: key },
|
||||
value
|
||||
value,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -296,8 +296,8 @@ class AdminClient {
|
|||
this.client.realms.deleteRealmLocalizationTexts({
|
||||
realm: this.client.realmName,
|
||||
selectedLocale: locale,
|
||||
})
|
||||
)
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ export default function grantClipboardAccess() {
|
|||
permissions: ["clipboardReadWrite", "clipboardSanitizedWrite"],
|
||||
origin: window.location.origin,
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ const LeftNav = ({ title, path }: LeftNavProps) => {
|
|||
const { hasAccess } = useAccess();
|
||||
const { realm } = useRealm();
|
||||
const route = routes.find(
|
||||
(route) => route.path.replace(/\/:.+?(\?|(?:(?!\/).)*|$)/g, "") === path
|
||||
(route) => route.path.replace(/\/:.+?(\?|(?:(?!\/).)*|$)/g, "") === path,
|
||||
);
|
||||
|
||||
const accessAllowed =
|
||||
|
@ -76,13 +76,13 @@ export const PageNav = () => {
|
|||
"query-groups",
|
||||
"query-users",
|
||||
"query-clients",
|
||||
"view-events"
|
||||
"view-events",
|
||||
);
|
||||
|
||||
const showConfigure = hasSomeAccess(
|
||||
"view-realm",
|
||||
"query-clients",
|
||||
"view-identity-providers"
|
||||
"view-identity-providers",
|
||||
);
|
||||
|
||||
const isOnAddRealm = !!useMatch(AddRealmRoute.path);
|
||||
|
|
|
@ -103,12 +103,12 @@ export default function AuthenticationSection() {
|
|||
const loader = async () => {
|
||||
const flowsRequest = await fetch(
|
||||
`${addTrailingSlash(
|
||||
adminClient.baseUrl
|
||||
adminClient.baseUrl,
|
||||
)}admin/realms/${realmName}/ui-ext/authentication-management/flows`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: getAuthorizationHeaders(await adminClient.getAccessToken()),
|
||||
}
|
||||
},
|
||||
);
|
||||
const flows = await flowsRequest.json();
|
||||
|
||||
|
@ -118,7 +118,7 @@ export default function AuthenticationSection() {
|
|||
|
||||
return sortBy(
|
||||
localeSort<AuthenticationType>(flows, mapByKey("alias")),
|
||||
(flow) => flow.usedBy?.type
|
||||
(flow) => flow.usedBy?.type,
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
|
|||
try {
|
||||
await adminClient.realms.update(
|
||||
{ realm },
|
||||
{ ...realmRep, [bindingType]: flowAlias }
|
||||
{ ...realmRep, [bindingType]: flowAlias },
|
||||
);
|
||||
addAlert(t("updateFlowSuccess"), AlertVariant.success);
|
||||
} catch (error) {
|
||||
|
|
|
@ -58,7 +58,7 @@ export const DuplicateFlowModal = ({
|
|||
newFlow.description = form.description;
|
||||
await adminClient.authenticationManagement.updateFlow(
|
||||
{ flowId: newFlow.id! },
|
||||
newFlow
|
||||
newFlow,
|
||||
);
|
||||
}
|
||||
addAlert(t("copyFlowSuccess"), AlertVariant.success);
|
||||
|
@ -68,7 +68,7 @@ export const DuplicateFlowModal = ({
|
|||
id: newFlow.id!,
|
||||
usedBy: "notInUse",
|
||||
builtIn: newFlow.builtIn ? "builtIn" : undefined,
|
||||
})
|
||||
}),
|
||||
);
|
||||
} catch (error) {
|
||||
addError("authentication:copyFlowError", error);
|
||||
|
|
|
@ -32,7 +32,7 @@ export const EditFlowModal = ({ flow, toggleDialog }: EditFlowModalProps) => {
|
|||
try {
|
||||
await adminClient.authenticationManagement.updateFlow(
|
||||
{ flowId: flow.id! },
|
||||
{ ...flow, ...formValues }
|
||||
{ ...flow, ...formValues },
|
||||
);
|
||||
addAlert(t("updateFlowSuccess"), AlertVariant.success);
|
||||
} catch (error) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue