-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5331 from flexion/10339-test-feedback
10339: test - feedback
- Loading branch information
Showing
28 changed files
with
395 additions
and
176 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -363,15 +363,15 @@ describe('File a petition', () => { | |
"Petitioner's contact information: John Cruz 123 Test Drive Boulder, CO 12345 Phone: Test Phone", | ||
); | ||
expect(text).to.include( | ||
"Counsel's contact information: Test Private Practitioner Bogus Barristers 234 Main St Apartment 4 Under the stairs Chicago, IL 61234 +1 (555) 555-5555 [email protected] Tax Court Bar No.: PT5432", | ||
"Counsel's contact information: Test Private Practitioner Bogus Barristers 234 Main St Apartment 4 Under the stairs Chicago, IL 61234 Phone: +1 (555) 555-5555 Email: [email protected] Tax Court Bar No.: PT5432", | ||
); | ||
expect(text).not.to.include('Service Email'); | ||
expect(text).not.to.include( | ||
'Register for electronic filing and service', | ||
); | ||
}, | ||
); | ||
}); | ||
|
||
// should not display Service Email | ||
// should not display Register for electronic filing and service: | ||
// should display counsel contact information | ||
}); | ||
}); | ||
}); |
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
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 |
---|---|---|
|
@@ -347,7 +347,7 @@ describe('createCaseInteractor', () => { | |
stinFile: new File([], 'test.pdf'), | ||
stinFileSize: 1, | ||
}, | ||
stinFileId: '96759830-8970-486f-916b-23439a8ebb70', | ||
stinFileId: '413f62ce-7c8d-446e-aeda-14a2a625a611', | ||
}, | ||
user, | ||
); | ||
|
@@ -398,7 +398,7 @@ describe('createCaseInteractor', () => { | |
stinFile: new File([], 'test.pdf'), | ||
stinFileSize: 1, | ||
}, | ||
stinFileId: '96759830-8970-486f-916b-23439a8ebb70', | ||
stinFileId: '413f62ce-7c8d-446e-aeda-14a2a625a611', | ||
}, | ||
user, | ||
); | ||
|
@@ -548,7 +548,7 @@ describe('createCaseInteractor', () => { | |
}); | ||
}); | ||
|
||
it('should set serviceIndicator to none for petitioner when case is created by a private petitioner', async () => { | ||
it('should remove email and serviceIndicator for petitioner when case is created by a private petitioner', async () => { | ||
user = new PrivatePractitioner({ | ||
barNumber: 'BN1234', | ||
email: '[email protected]', | ||
|
@@ -594,6 +594,7 @@ describe('createCaseInteractor', () => { | |
|
||
result.petitioners.forEach(p => { | ||
expect(p.serviceIndicator).toBe(SERVICE_INDICATOR_TYPES.SI_NONE); | ||
expect(p.email).toBeUndefined(); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { | ||
CASE_TYPES_MAP, | ||
ROLES, | ||
} from '@shared/business/entities/EntityConstants'; | ||
import { CASE_TYPES_MAP } from '@shared/business/entities/EntityConstants'; | ||
import { applicationContextForClient as applicationContext } from '@web-client/test/createClientTestApplicationContext'; | ||
import { formatPetitionAction } from '@web-client/presenter/actions/formatPetitionAction'; | ||
import { mockPetitionerUser } from '@shared/test/mockAuthUsers'; | ||
import { | ||
mockPetitionerUser, | ||
mockPrivatePractitionerUser, | ||
} from '@shared/test/mockAuthUsers'; | ||
import { presenter } from '../presenter-mock'; | ||
import { runAction } from '@web-client/presenter/test.cerebral'; | ||
|
||
|
@@ -170,6 +170,7 @@ describe('formatPetitionAction', () => { | |
state: { | ||
petitionFormatted: undefined, | ||
user: { | ||
...mockPrivatePractitionerUser, | ||
barNumber: 'TEST_barNumber', | ||
contact: { | ||
address1: 'TEST_address1', | ||
|
@@ -180,10 +181,7 @@ describe('formatPetitionAction', () => { | |
postalCode: 'TEST_postalCode', | ||
state: 'TEST_state', | ||
}, | ||
email: TEST_EMAIL, | ||
firmName: 'TEST_firmName', | ||
name: 'TEST_Name', | ||
role: ROLES.privatePractitioner, | ||
}, | ||
}, | ||
}); | ||
|
@@ -194,12 +192,51 @@ describe('formatPetitionAction', () => { | |
address3: 'TEST_address3', | ||
barNumber: 'TEST_barNumber', | ||
city: 'TEST_city', | ||
email: 'TEST_EMAIL', | ||
email: '[email protected]', | ||
firmName: 'TEST_firmName', | ||
name: 'TEST_Name', | ||
name: 'Reginald Barclay', | ||
phone: 'TEST_phone', | ||
postalCode: 'TEST_postalCode', | ||
state: 'TEST_state', | ||
}); | ||
}); | ||
|
||
it('should set primary contact email to user email when the user is a petitioner', async () => { | ||
const results = await runAction(formatPetitionAction, { | ||
modules: { | ||
presenter, | ||
}, | ||
props: PROPS, | ||
state: { | ||
petitionFormatted: undefined, | ||
user: mockPetitionerUser, | ||
}, | ||
}); | ||
|
||
expect(results.state.petitionFormatted?.contactPrimary?.email).toEqual( | ||
'[email protected]', | ||
); | ||
}); | ||
|
||
it('should not set primary contact email to user email when the user is a private practitioner', async () => { | ||
const results = await runAction(formatPetitionAction, { | ||
modules: { | ||
presenter, | ||
}, | ||
props: { | ||
...PROPS, | ||
createPetitionStep1Data: { | ||
contactPrimary: { email: '[email protected]' }, | ||
}, | ||
}, | ||
state: { | ||
petitionFormatted: undefined, | ||
user: mockPrivatePractitionerUser, | ||
}, | ||
}); | ||
|
||
expect(results.state.petitionFormatted?.contactPrimary?.email).toEqual( | ||
'[email protected]', | ||
); | ||
}); | ||
}); |
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
Oops, something went wrong.