Skip to content

Commit

Permalink
i18n fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumimku committed Jul 12, 2024
1 parent b13274a commit 1304fe3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,6 @@ export const InboundOIDCForm: FunctionComponent<InboundOIDCFormPropsInterface> =
setIsSubjectTokenFeatureAvailable(initialValues?.subjectToken ? true : false);
}, [ initialValues ]);

/**
* Sets if subject token is enable button should be visible.
*/
useEffect(() => {
if (isGrantChanged) {
if (!selectedGrantTypes?.includes(ApplicationManagementConstants.OAUTH2_TOKEN_EXCHANGE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ import { render, screen } from "../../test-configs/utils";
import { ImpersonationConfigurationPage } from "../pages/impersonation-configuration";
import "@testing-library/jest-dom";

jest.mock("@wso2is/admin.impersonation.v1/api/impersonation-configuration", () => ({
useImpersonationConfig: () => ({
data: {
"enableEmailNotification":true
},
error: undefined,
isLoading: false
})
}));

describe.skip("Impersonation Configuration", () => {

jest.mock("@wso2is/admin.impersonation.v1/api/impersonation-configuration", () => ({
useImpersonationConfig: () => ({
data: {
"enableEmailNotification":true
},
error: undefined,
isLoading: false
})
}));

it("<ImpersonationConfigurationPage /> matches snapshot", () => {
const { container } = render(
<ImpersonationConfigurationPage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ export const ImpersonationConfigurationPage: FunctionComponent<ImpersonationConf

const featureConfig: FeatureConfigInterface = useSelector((state: AppState) => state.config.ui.features);

const isReadOnly: boolean = useRequiredScopes(
const isReadOnly: boolean = !useRequiredScopes(
featureConfig?.server?.scopes?.update,
);
console.log("readonly" + isReadOnly);

const dispatch: Dispatch<any> = useDispatch();

Expand Down Expand Up @@ -218,7 +219,7 @@ export const ImpersonationConfigurationPage: FunctionComponent<ImpersonationConf
ariaLabel="Enable Email Notification"
name="enableEmailNotification"
hint={ t("impersonation:form.enableEmailNotification" +
".label.hint") }
".hint") }
label={ t("impersonation:form." +
"enableEmailNotification.label") }
readOnly={ isReadOnly }
Expand Down

0 comments on commit 1304fe3

Please sign in to comment.