Skip to content

Commit d42558d

Browse files
#RI-5277 - update tlsClientAuthRequired onChange
1 parent 863100f commit d42558d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const TlsDetails = (props: Props) => {
6464
inputDisplay: cert.name,
6565
})
6666
})
67+
console.log(formik.values.verifyServerTlsCert, formik.values.tlsClientAuthRequired)
6768

6869
return (
6970
<>
@@ -219,7 +220,11 @@ const TlsDetails = (props: Props) => {
219220
name="tlsClientAuthRequired"
220221
label="Requires TLS Client Authentication"
221222
checked={!!formik.values.tlsClientAuthRequired}
222-
onChange={formik.handleChange}
223+
onChange={(e: ChangeEvent<HTMLInputElement>) =>
224+
formik.setFieldValue(
225+
'tlsClientAuthRequired',
226+
e.target.checked
227+
)}
223228
data-testid="tls-required-checkbox"
224229
/>
225230
</EuiFlexItem>

redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionFrom.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ describe('InstanceForm', () => {
615615
})
616616
expect(handleTestConnection).toBeCalledWith(
617617
expect.objectContaining({
618-
tlsClientAuthRequired: ['on'],
618+
tlsClientAuthRequired: true,
619619
})
620620
)
621621
await act(() => {
@@ -624,7 +624,7 @@ describe('InstanceForm', () => {
624624

625625
expect(handleSubmit).toBeCalledWith(
626626
expect.objectContaining({
627-
tlsClientAuthRequired: ['on'],
627+
tlsClientAuthRequired: true,
628628
})
629629
)
630630
})

0 commit comments

Comments
 (0)