Skip to content

Commit 2807b8d

Browse files
authored
Merge pull request #1579 from RedisInsight/fe/feature/RI-3970_password-length
#RI-3970 - change password length
2 parents 86128a6 + 6bdadf3 commit 2807b8d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm/InstanceForm.spec.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,4 +903,26 @@ describe('InstanceForm', () => {
903903
})
904904
)
905905
})
906+
907+
it('should render password input with 10_000 length limit', () => {
908+
render(
909+
<InstanceForm
910+
{...instance(mockedProps)}
911+
formFields={{ ...formFields, connectionType: ConnectionType.Standalone }}
912+
/>
913+
)
914+
915+
expect(screen.getByTestId('password')).toHaveAttribute('maxLength', '10000')
916+
})
917+
918+
it('should render ssh password input with 10_000 length limit', () => {
919+
render(
920+
<InstanceForm
921+
{...instance(mockedProps)}
922+
formFields={{ ...formFields, connectionType: ConnectionType.Standalone, ssh: true }}
923+
/>
924+
)
925+
926+
expect(screen.getByTestId('sshPassword')).toHaveAttribute('maxLength', '10000')
927+
})
906928
})

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm/form-components/DatabaseForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const DatabaseForm = (props: Props) => {
176176
data-testid="password"
177177
fullWidth
178178
className="passwordField"
179-
maxLength={200}
179+
maxLength={10_000}
180180
placeholder="Enter Password"
181181
value={formik.values.password ?? ''}
182182
onChange={formik.handleChange}

0 commit comments

Comments
 (0)