Fixed the saml tests (#3494)
This commit is contained in:
parent
de2be0f063
commit
8a6df5d743
2 changed files with 11 additions and 6 deletions
|
@ -271,7 +271,7 @@ export default function DetailSettings() {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isOIDC && <OIDCGeneralSettings id={alias} />}
|
{isOIDC && <OIDCGeneralSettings id={alias} />}
|
||||||
{isSAML && <SamlGeneralSettings id={alias} />}
|
{isSAML && <SamlGeneralSettings id={alias} isAliasReadonly />}
|
||||||
</FormAccess>
|
</FormAccess>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,8 +6,6 @@ import { HelpItem } from "../../components/help-enabler/HelpItem";
|
||||||
import { RedirectUrl } from "../component/RedirectUrl";
|
import { RedirectUrl } from "../component/RedirectUrl";
|
||||||
import { TextField } from "../component/TextField";
|
import { TextField } from "../component/TextField";
|
||||||
import { DisplayOrder } from "../component/DisplayOrder";
|
import { DisplayOrder } from "../component/DisplayOrder";
|
||||||
import { useParams } from "react-router";
|
|
||||||
import type { IdentityProviderParams } from "../routes/IdentityProvider";
|
|
||||||
import { FormattedLink } from "../../components/external-link/FormattedLink";
|
import { FormattedLink } from "../../components/external-link/FormattedLink";
|
||||||
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
||||||
import { useRealm } from "../../context/realm-context/RealmContext";
|
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||||
|
@ -15,10 +13,17 @@ import environment from "../../environment";
|
||||||
|
|
||||||
import "./saml-general-settings.css";
|
import "./saml-general-settings.css";
|
||||||
|
|
||||||
export const SamlGeneralSettings = ({ id }: { id: string }) => {
|
type SamlGeneralSettingsProps = {
|
||||||
|
id: string;
|
||||||
|
isAliasReadonly?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const SamlGeneralSettings = ({
|
||||||
|
id,
|
||||||
|
isAliasReadonly = false,
|
||||||
|
}: SamlGeneralSettingsProps) => {
|
||||||
const { t } = useTranslation("identity-providers");
|
const { t } = useTranslation("identity-providers");
|
||||||
const { realm } = useRealm();
|
const { realm } = useRealm();
|
||||||
const { tab } = useParams<IdentityProviderParams>();
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
|
@ -53,7 +58,7 @@ export const SamlGeneralSettings = ({ id }: { id: string }) => {
|
||||||
id="alias"
|
id="alias"
|
||||||
data-testid="alias"
|
data-testid="alias"
|
||||||
name="alias"
|
name="alias"
|
||||||
isReadOnly={tab === "settings"}
|
isReadOnly={isAliasReadonly}
|
||||||
validated={
|
validated={
|
||||||
errors.alias ? ValidatedOptions.error : ValidatedOptions.default
|
errors.alias ? ValidatedOptions.error : ValidatedOptions.default
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue