From 64bbee83e1d226d5b1ccbb0aa20da910fe860517 Mon Sep 17 00:00:00 2001 From: Yury Barsukou Date: Sun, 27 Oct 2024 23:01:52 +0300 Subject: [PATCH 1/4] Update src/SignUpForm.js --- src/SignUpForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignUpForm.js b/src/SignUpForm.js index 400b66b..70e31dd 100644 --- a/src/SignUpForm.js +++ b/src/SignUpForm.js @@ -134,7 +134,7 @@ const SignUpForm = () => { 1 number
  • - Minimum 8 characters + Minimum 10 characters
  • From 523962b2669afe8bd4e6bc6f51c4835d3269402e Mon Sep 17 00:00:00 2001 From: Yury Barsukou Date: Sun, 27 Oct 2024 23:01:54 +0300 Subject: [PATCH 2/4] Update src/SignUpForm.js --- src/SignUpForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignUpForm.js b/src/SignUpForm.js index 70e31dd..d913aee 100644 --- a/src/SignUpForm.js +++ b/src/SignUpForm.js @@ -34,7 +34,7 @@ const SignUpForm = () => { hasUppercase: /[A-Z]/.test(password), hasLowercase: /[a-z]/.test(password), hasNumber: /[0-9]/.test(password), - isLongEnough: password.length >= 8, + isLongEnough: password.length >= 10, }); }; From 643715c45133c60290cbbf02bf8dac299d9c1267 Mon Sep 17 00:00:00 2001 From: Yury Barsukou Date: Sun, 27 Oct 2024 23:01:57 +0300 Subject: [PATCH 3/4] Update src/SignUpForm.test.js --- src/SignUpForm.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignUpForm.test.js b/src/SignUpForm.test.js index f4ea4aa..7ee63b2 100644 --- a/src/SignUpForm.test.js +++ b/src/SignUpForm.test.js @@ -61,7 +61,7 @@ describe('SignUpForm', () => { test('validates password criteria correctly', () => { const password = screen.getByLabelText(LABELS.password); fireEvent.change(password, { target: { value: 'short' } }); - expect(screen.getByText(/Minimum 8 characters/i).className).toMatch(/red/); + expect(screen.getByText(/Minimum 10 characters/i).className).toMatch(/red/); fireEvent.change(password, { target: { value: 'LongEnough1' } }); expect(screen.getByText(/1 uppercase character/i).className).toMatch(/green/); expect(screen.getByText(/1 lowercase character/i).className).toMatch(/green/); From 12b4981e46b00d71d2891d7c6066750ecbc29651 Mon Sep 17 00:00:00 2001 From: Yury Barsukou Date: Sun, 27 Oct 2024 23:02:00 +0300 Subject: [PATCH 4/4] Update src/SignUpForm.test.js --- src/SignUpForm.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignUpForm.test.js b/src/SignUpForm.test.js index 7ee63b2..711f5be 100644 --- a/src/SignUpForm.test.js +++ b/src/SignUpForm.test.js @@ -66,7 +66,7 @@ describe('SignUpForm', () => { expect(screen.getByText(/1 uppercase character/i).className).toMatch(/green/); expect(screen.getByText(/1 lowercase character/i).className).toMatch(/green/); expect(screen.getByText(/1 number/i).className).toMatch(/green/); - expect(screen.getByText(/Minimum 8 characters/i).className).toMatch(/green/); + expect(screen.getByText(/Minimum 10 characters/i).className).toMatch(/green/); }); });