-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Cuong Vu
authored
Sep 9, 2020
1 parent
956e1e3
commit 562fdd1
Showing
11 changed files
with
43 additions
and
199 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
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 |
---|---|---|
|
@@ -34,7 +34,6 @@ describe('getInitHasReapitAccountsRef', () => { | |
describe('onSubmit', () => { | ||
it('onSubmit should run correctly', () => { | ||
const dispatch = jest.fn() | ||
const setIsSubmittedDebit = jest.fn() | ||
const values: AccountsInformationFormValues = { | ||
hasDirectDebit: 'yes', | ||
hasReapitAccountsRef: 'yes', | ||
|
@@ -51,18 +50,16 @@ describe('onSubmit', () => { | |
billingKeyContact: 'name', | ||
billingEmail: '[email protected]', | ||
} | ||
onSubmit({ dispatch, setIsSubmittedDebit })(values) | ||
onSubmit({ dispatch })(values) | ||
expect(dispatch).toHaveBeenCalledWith(updateDeveloperData(expectedData)) | ||
expect(setIsSubmittedDebit).toHaveBeenCalledWith(false) | ||
}) | ||
|
||
it('onSubmit should run correctly when hasReapitAccountsRef is no', () => { | ||
it('onSubmit should run correctly when hasReapitAccountsRef is no & status=incomplete', () => { | ||
const dispatch = jest.fn() | ||
const setIsSubmittedDebit = jest.fn() | ||
const values: AccountsInformationFormValues = { | ||
hasDirectDebit: 'yes', | ||
hasReapitAccountsRef: 'no', | ||
status: 'pending', | ||
status: 'incomplete', | ||
billingEmail: '[email protected]', | ||
reapitReference: 'aaa111', | ||
billingTelephone: '11111111', | ||
|
@@ -75,7 +72,7 @@ describe('onSubmit', () => { | |
billingKeyContact: 'name', | ||
billingEmail: '[email protected]', | ||
} | ||
onSubmit({ dispatch, setIsSubmittedDebit })(values) | ||
onSubmit({ dispatch })(values) | ||
expect(dispatch).toHaveBeenCalledWith(updateDeveloperData(expectedData)) | ||
}) | ||
}) | ||
|
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
20 changes: 4 additions & 16 deletions
20
.../pages/settings/settings-billing-tab/accounts-information-form/account-status-section.tsx
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
Oops, something went wrong.