-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53d91dd
commit 01ce8d1
Showing
2 changed files
with
20 additions
and
6 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 |
---|---|---|
|
@@ -82,6 +82,7 @@ describe('Fix Newsletter - Contact', () => { | |
it('should be Physical and display startDate', () => { | ||
primaryAddress.street = '100 Test St'; | ||
primaryAddress.startDate = '2022-12-10T16:05:26-05:00'; | ||
primaryAddress.createdAt = '2022-10-10T16:05:26-05:00'; | ||
primaryAddress.source = 'Siebel'; | ||
|
||
const { getByRole, getByText } = render( | ||
|
@@ -97,6 +98,25 @@ describe('Fix Newsletter - Contact', () => { | |
).toBeInTheDocument(); | ||
}); | ||
|
||
it('should show createdAt if startDate is null', () => { | ||
primaryAddress.street = '100 Test St'; | ||
primaryAddress.startDate = null; | ||
primaryAddress.createdAt = '2022-10-10T16:05:26-05:00'; | ||
primaryAddress.source = 'Siebel'; | ||
|
||
const { getByRole, getByText } = render( | ||
<TestComponent | ||
primaryPerson={primaryPerson} | ||
primaryAddress={primaryAddress} | ||
/>, | ||
); | ||
|
||
expect(getByText(/(10\/10\/2022)/i)).toBeInTheDocument(); | ||
expect( | ||
within(getByRole('combobox')).getByText('Physical'), | ||
).toBeInTheDocument(); | ||
}); | ||
|
||
it('should be Digital', () => { | ||
primaryPerson.primaryEmailAddress = { id: '1', email: '[email protected]' }; | ||
|
||
|