From d71d91e8934a966aaf30b923960ee7a8b08d3ac1 Mon Sep 17 00:00:00 2001 From: June Kelly Date: Wed, 19 Oct 2022 10:09:25 +0100 Subject: [PATCH] Merge pull request #10020 from overleaf/sg-account-delete-case-sensitivity [web] email in leave modal should be case insensitive GitOrigin-RevId: 250e867f88dd76769a27a8cd61dd82625c1e151f --- .../js/features/settings/components/leave/modal-form.tsx | 2 +- .../features/settings/components/leave/modal-form.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/settings/components/leave/modal-form.tsx b/services/web/frontend/js/features/settings/components/leave/modal-form.tsx index 1c3d85dfd3..901a85e25e 100644 --- a/services/web/frontend/js/features/settings/components/leave/modal-form.tsx +++ b/services/web/frontend/js/features/settings/components/leave/modal-form.tsx @@ -64,7 +64,7 @@ function LeaveModalForm({ useEffect(() => { setIsFormValid( !!email && - email === userDefaultEmail && + email.toLowerCase() === userDefaultEmail.toLowerCase() && password.length > 0 && confirmation ) diff --git a/services/web/test/frontend/features/settings/components/leave/modal-form.test.tsx b/services/web/test/frontend/features/settings/components/leave/modal-form.test.tsx index 501dedb6f0..7229b81eb4 100644 --- a/services/web/test/frontend/features/settings/components/leave/modal-form.test.tsx +++ b/services/web/test/frontend/features/settings/components/leave/modal-form.test.tsx @@ -28,7 +28,7 @@ describe('', function () { ) const emailInput = screen.getByLabelText('Email') - fireEvent.change(emailInput, { target: { value: 'foo@bar.com' } }) + fireEvent.change(emailInput, { target: { value: 'FOO@bar.com' } }) const passwordInput = screen.getByLabelText('Password') fireEvent.change(passwordInput, { target: { value: 'foobar' } })