-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: backend error clear on focus (#116)
Description: Backen error should clear on focus VAN-2011 Co-authored-by: Ahtesham Quraish <[email protected]>
- Loading branch information
1 parent
4d0f0dd
commit a14d2e8
Showing
6 changed files
with
29 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import { BrowserRouter as Router } from 'react-router-dom'; | |
import configureStore from 'redux-mock-store'; | ||
|
||
import { OnboardingComponentContext } from '../../../data/storeHooks'; | ||
import { clearRegistrationBackendError, fetchRealtimeValidations } from '../../registration-popup/data/reducers'; | ||
import { fetchRealtimeValidations } from '../../registration-popup/data/reducers'; | ||
import getValidationMessage from '../../reset-password-popup/forgot-password/data/utils'; | ||
import { EmailField } from '../index'; | ||
|
||
|
@@ -67,6 +67,7 @@ describe('EmailField', () => { | |
handleChange: jest.fn(), | ||
floatingLabel: '', | ||
handleErrorChange: jest.fn(), | ||
handleFocus: jest.fn(), | ||
confirmEmailValue: '', | ||
}; | ||
window.location = { search: '' }; | ||
|
@@ -200,8 +201,10 @@ describe('EmailField', () => { | |
|
||
const emailInput = container.querySelector('input#email'); | ||
fireEvent.focus(emailInput, { target: { value: '[email protected]', name: 'email' } }); | ||
|
||
expect(store.dispatch).toHaveBeenCalledWith(clearRegistrationBackendError('email')); | ||
expect(props.handleFocus).toHaveBeenCalledWith( | ||
'', | ||
'email', | ||
); | ||
}); | ||
|
||
it('should clear email suggestions when close icon is clicked', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters