Merge pull request #10020 from overleaf/sg-account-delete-case-sensitivity

[web] email in leave modal should be case insensitive

GitOrigin-RevId: 250e867f88dd76769a27a8cd61dd82625c1e151f
This commit is contained in:
June Kelly 2022-10-19 10:09:25 +01:00 committed by Copybot
parent 24cfd7d670
commit d71d91e893
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ function LeaveModalForm({
useEffect(() => {
setIsFormValid(
!!email &&
email === userDefaultEmail &&
email.toLowerCase() === userDefaultEmail.toLowerCase() &&
password.length > 0 &&
confirmation
)

View file

@ -28,7 +28,7 @@ describe('<LeaveModalForm />', 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' } })