-
Notifications
You must be signed in to change notification settings - Fork 4
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
de7a839
commit f0087aa
Showing
31 changed files
with
126 additions
and
126 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 |
---|---|---|
|
@@ -94,7 +94,7 @@ const participants: VHParticipant[] = []; | |
const p1 = new VHParticipant(); | ||
p1.firstName = 'John'; | ||
p1.lastName = 'Doe'; | ||
p1.display_Name = 'John Doe'; | ||
p1.displayName = 'John Doe'; | ||
p1.title = 'Mr.'; | ||
p1.email = '[email protected]'; | ||
p1.phone = '32332'; | ||
|
@@ -107,7 +107,7 @@ p1.username = '[email protected]'; | |
const p2 = new VHParticipant(); | ||
p2.firstName = 'Jane'; | ||
p2.lastName = 'Doe'; | ||
p2.display_Name = 'Jane Doe'; | ||
p2.displayName = 'Jane Doe'; | ||
p2.title = 'Mr.'; | ||
p2.email = '[email protected]'; | ||
p2.phone = '32332'; | ||
|
@@ -120,7 +120,7 @@ p1.username = '[email protected]'; | |
const p3 = new VHParticipant(); | ||
p3.firstName = 'Chris'; | ||
p3.lastName = 'Green'; | ||
p3.display_Name = 'Chris Green'; | ||
p3.displayName = 'Chris Green'; | ||
p3.title = 'Mr.'; | ||
p3.email = '[email protected]'; | ||
p3.phone = '32332'; | ||
|
@@ -134,7 +134,7 @@ p3.userRoleName = 'Representative'; | |
const p4 = new VHParticipant(); | ||
p4.firstName = 'Test'; | ||
p4.lastName = 'Participant'; | ||
p4.display_Name = 'Test Participant'; | ||
p4.displayName = 'Test Participant'; | ||
p4.title = 'Mr.'; | ||
p4.email = '[email protected]'; | ||
p4.phone = '32332'; | ||
|
@@ -146,7 +146,7 @@ p4.userRoleName = 'Individual'; | |
const p5 = new VHParticipant(); | ||
p5.firstName = 'Test7'; | ||
p5.lastName = 'Participant7'; | ||
p5.display_Name = 'Test Participant7'; | ||
p5.displayName = 'Test Participant7'; | ||
p5.title = 'Mr.'; | ||
p5.email = '[email protected]'; | ||
p5.phone = '32332'; | ||
|
@@ -159,7 +159,7 @@ p5.interpreterFor = '[email protected]'; | |
const p6 = new VHParticipant(); | ||
p6.firstName = 'Test8'; | ||
p6.lastName = 'Participant8'; | ||
p6.display_Name = 'Test Participant8'; | ||
p6.displayName = 'Test Participant8'; | ||
p6.title = 'Mr.'; | ||
p6.email = '[email protected]'; | ||
p6.phone = '32332'; | ||
|
@@ -202,7 +202,7 @@ function initParticipant() { | |
participant.firstName = 'Sam'; | ||
participant.lastName = 'Green'; | ||
participant.phone = '12345'; | ||
participant.display_Name = 'Sam Green'; | ||
participant.displayName = 'Sam Green'; | ||
participant.title = 'Mr'; | ||
participant.hearingRoleName = 'Representative'; | ||
participant.company = 'CN'; | ||
|
@@ -401,7 +401,7 @@ describe('AddParticipantComponent', () => { | |
expect(email.value).toBe(participant.email); | ||
expect(phone.value).toBe(participant.phone); | ||
expect(title.value).toBe(participant.title); | ||
expect(displayName.value).toBe(participant.display_Name); | ||
expect(displayName.value).toBe(participant.displayName); | ||
expect(companyName.value).toBe(participant.company); | ||
expect(component.displayNextButton).toBeFalsy(); | ||
expect(component.displayClearButton).toBeTruthy(); | ||
|
@@ -411,7 +411,7 @@ describe('AddParticipantComponent', () => { | |
it('should populate the form fields when values are null', () => { | ||
participant.email = null; | ||
participant.phone = null; | ||
participant.display_Name = null; | ||
participant.displayName = null; | ||
participant.company = null; | ||
participant.representee = null; | ||
component.getParticipant(participant); | ||
|
@@ -642,14 +642,14 @@ describe('AddParticipantComponent', () => { | |
const pa1 = new VHParticipant(); | ||
pa1.firstName = 'firstname'; | ||
pa1.lastName = 'lastname-interpretee'; | ||
pa1.display_Name = 'firstname lastname-interpretee'; | ||
pa1.displayName = 'firstname lastname-interpretee'; | ||
pa1.email = '[email protected]'; | ||
pa1.hearingRoleName = 'Litigant in Person'; | ||
|
||
const pa2 = new VHParticipant(); | ||
pa2.firstName = 'firstname'; | ||
pa2.lastName = 'lastname-interpreter'; | ||
pa1.display_Name = 'firstname lastname-interpreter'; | ||
pa1.displayName = 'firstname lastname-interpreter'; | ||
pa2.email = '[email protected]'; | ||
pa2.hearingRoleName = 'Interpreter'; | ||
pa2.interpreterFor = '[email protected]'; | ||
|
@@ -674,14 +674,14 @@ describe('AddParticipantComponent', () => { | |
const part1 = new VHParticipant(); | ||
part1.firstName = 'firstname'; | ||
part1.lastName = 'lastname-interpretee'; | ||
part1.display_Name = 'firstname lastname-interpretee'; | ||
part1.displayName = 'firstname lastname-interpretee'; | ||
part1.email = '[email protected]'; | ||
part1.hearingRoleName = 'Litigant in Person'; | ||
|
||
const part2 = new VHParticipant(); | ||
part2.firstName = 'firstname'; | ||
part2.lastName = 'lastname-interpreter'; | ||
part2.display_Name = 'firstname lastname-interpreter'; | ||
part2.displayName = 'firstname lastname-interpreter'; | ||
part2.email = '[email protected]'; | ||
part2.hearingRoleName = 'Interpreter'; | ||
part2.interpreterFor = '[email protected]'; | ||
|
@@ -909,7 +909,7 @@ describe('AddParticipantComponent edit mode', () => { | |
role: 'Panel Member', | ||
email: participant.email, | ||
phone: participant.phone, | ||
displayName: participant.display_Name, | ||
displayName: participant.displayName, | ||
companyName: participant.company, | ||
companyNameIndividual: participant.company, | ||
representing: participant.representee, | ||
|
@@ -1042,7 +1042,7 @@ describe('AddParticipantComponent edit mode', () => { | |
interpretee.setValue('[email protected]'); | ||
component.updateParticipant(); | ||
const updatedParticipant = component.hearing.participants.find(x => x.email === '[email protected]'); | ||
expect(updatedParticipant.display_Name).toBe('Sam Green'); | ||
expect(updatedParticipant.displayName).toBe('Sam Green'); | ||
}); | ||
it('should before save booking check if all fields available', () => { | ||
component.actionsBeforeSave(); | ||
|
@@ -1069,7 +1069,7 @@ describe('AddParticipantComponent edit mode', () => { | |
lastName: participant.lastName, | ||
email: participant.email, | ||
phone: participant.phone, | ||
displayName: participant.display_Name, | ||
displayName: participant.displayName, | ||
companyName: participant.company, | ||
companyNameIndividual: participant.company, | ||
representing: participant.representee, | ||
|
@@ -1094,7 +1094,7 @@ describe('AddParticipantComponent edit mode', () => { | |
lastName: participant.lastName, | ||
email: participant.email, | ||
phone: participant.phone, | ||
displayName: participant.display_Name, | ||
displayName: participant.displayName, | ||
companyName: participant.company, | ||
companyNameIndividual: participant.company, | ||
representing: participant.representee, | ||
|
@@ -1173,15 +1173,15 @@ describe('AddParticipantComponent edit mode', () => { | |
const part1 = new VHParticipant(); | ||
part1.firstName = 'firstname'; | ||
part1.lastName = 'lastname-interpretee'; | ||
part1.display_Name = 'firstname lastname-interpretee'; | ||
part1.displayName = 'firstname lastname-interpretee'; | ||
part1.email = '[email protected]'; | ||
part1.hearingRoleName = 'Litigant in Person'; | ||
part1.id = '100'; | ||
|
||
const part2 = new VHParticipant(); | ||
part2.firstName = 'firstname'; | ||
part2.lastName = 'lastname-interpreter'; | ||
part2.display_Name = 'firstname lastname-interpreter'; | ||
part2.displayName = 'firstname lastname-interpreter'; | ||
part2.email = '[email protected]'; | ||
part2.hearingRoleName = 'Interpreter'; | ||
part2.interpreterFor = '[email protected]'; | ||
|
@@ -1221,7 +1221,7 @@ describe('AddParticipantComponent edit mode', () => { | |
interpretee.setValue('[email protected]'); | ||
component.updateParticipant(); | ||
const updatedParticipant = component.hearing.participants.find(x => x.email === '[email protected]'); | ||
expect(updatedParticipant.display_Name).toBe('Test Participant8'); | ||
expect(updatedParticipant.displayName).toBe('Test Participant8'); | ||
}); | ||
}); | ||
describe('AddParticipantComponent edit mode no participants added', () => { | ||
|
@@ -1348,7 +1348,7 @@ describe('AddParticipantComponent edit mode no participants added', () => { | |
lastName: participant.lastName, | ||
email: participant.email, | ||
phone: participant.phone, | ||
displayName: participant.display_Name, | ||
displayName: participant.displayName, | ||
companyName: participant.company, | ||
companyNameIndividual: participant.company, | ||
representing: participant.representee, | ||
|
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ import { HearingRoles } from 'src/app/common/model/hearing-roles.model'; | |
function initHearingRequest(): VHBooking { | ||
const participants: VHParticipant[] = []; | ||
const p1 = new VHParticipant(); | ||
p1.display_Name = 'display name1'; | ||
p1.displayName = 'display name1'; | ||
p1.email = '[email protected]'; | ||
p1.contactEmail = '[email protected]'; | ||
p1.firstName = 'first'; | ||
|
@@ -39,7 +39,7 @@ function initHearingRequest(): VHBooking { | |
p1.hearingRoleName = 'Judge'; | ||
|
||
const p2 = new VHParticipant(); | ||
p2.display_Name = 'display name2'; | ||
p2.displayName = 'display name2'; | ||
p2.email = '[email protected]'; | ||
p2.contactEmail = '[email protected]'; | ||
p2.firstName = 'first2'; | ||
|
@@ -297,8 +297,8 @@ describe('AssignJudgeComponent', () => { | |
component.judgeDisplayNameFld.setValue('<script>' + displayNameSanitized + '</script>'); | ||
component.changeDisplayName(); | ||
expect(component.judgeDisplayNameFld.value).toBe(displayNameSanitized); | ||
expect(component.judge.display_Name).toBe(displayNameSanitized); | ||
expect(component.hearing.participants.find(x => x.isJudge).display_Name).toBe(displayNameSanitized); | ||
expect(component.judge.displayName).toBe(displayNameSanitized); | ||
expect(component.hearing.participants.find(x => x.isJudge).displayName).toBe(displayNameSanitized); | ||
}); | ||
|
||
it('should unsubscribe all subcriptions on destroy component', () => { | ||
|
@@ -351,14 +351,14 @@ describe('AssignJudgeComponent', () => { | |
const judge = new VHParticipant(); | ||
judge.username = 'JudgeUserName'; | ||
judge.email = 'JudgeEmail'; | ||
judge.display_Name = 'JudgeDisplayName'; | ||
judge.displayName = 'JudgeDisplayName'; | ||
judge.phone = 'JudgePhone'; | ||
judge.isCourtroomAccount = true; | ||
|
||
const alternateJudge = new VHParticipant(); | ||
alternateJudge.username = 'AlternateJudgeUserName'; | ||
alternateJudge.email = 'AlternateJudgeEmail'; | ||
alternateJudge.display_Name = 'AlternateJudgeDisplayName'; | ||
alternateJudge.displayName = 'AlternateJudgeDisplayName'; | ||
alternateJudge.phone = 'AlternateJudgePhone'; | ||
alternateJudge.hearingRoleName = Constants.HearingRoles.Judge; | ||
|
||
|
@@ -401,7 +401,7 @@ describe('AssignJudgeComponent', () => { | |
}); | ||
|
||
it('should set correct validation errors if display name is null', () => { | ||
component.judge.display_Name = null; | ||
component.judge.displayName = null; | ||
|
||
component.saveJudge(); | ||
expect(component.isJudgeParticipantError).toBe(false); | ||
|
@@ -410,7 +410,7 @@ describe('AssignJudgeComponent', () => { | |
}); | ||
|
||
it('should set correct validation errors if display name is null', () => { | ||
component.judge.display_Name = null; | ||
component.judge.displayName = null; | ||
|
||
component.saveJudge(); | ||
expect(component.isJudgeParticipantError).toBe(false); | ||
|
@@ -551,7 +551,7 @@ describe('AssignJudgeComponent', () => { | |
beforeEach(() => { | ||
const updatedJudgeDisplayName = 'UpdatedJudgeDisplayName'; | ||
videoHearingsServiceSpy.canAddJudge.and.returnValue(true); | ||
component.judge.display_Name = updatedJudgeDisplayName; | ||
component.judge.displayName = updatedJudgeDisplayName; | ||
}); | ||
|
||
it('should add judge account when none present', () => { | ||
|
@@ -569,7 +569,7 @@ describe('AssignJudgeComponent', () => { | |
|
||
expect(updatedJudges.length).toBe(1); | ||
expect(component.courtAccountJudgeEmail).toEqual(judge.username); | ||
expect(component.judgeDisplayNameFld.value).toEqual(judge.display_Name); | ||
expect(component.judgeDisplayNameFld.value).toEqual(judge.displayName); | ||
expect(updatedJudges[0]).toBe(judge); | ||
expect(updatedJudges[0].hearingRoleCode).toBe(Constants.HearingRoleCodes.Judge); | ||
|
||
|
@@ -578,7 +578,7 @@ describe('AssignJudgeComponent', () => { | |
}); | ||
}); | ||
afterEach(() => { | ||
expect(component.judgeDisplayNameFld.value).toEqual(judge.display_Name); | ||
expect(component.judgeDisplayNameFld.value).toEqual(judge.displayName); | ||
expect(component.judgeEmailFld.value).toEqual(otherInformationDetailsJudgeEmail); | ||
expect(component.judgePhoneFld.value).toEqual(otherInformationDetailsJudgePhone); | ||
}); | ||
|
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ function initHearingRequest(): VHBooking { | |
firstName: 'John', | ||
lastName: 'Doe', | ||
email: '[email protected]', | ||
display_Name: 'John Doe', | ||
displayName: 'John Doe', | ||
userRoleName: 'Representative', | ||
interpretation_language: undefined | ||
}), | ||
|
@@ -34,7 +34,7 @@ function initHearingRequest(): VHBooking { | |
firstName: 'Chris', | ||
lastName: 'Green', | ||
email: 'chris@green,com', | ||
display_Name: 'Chris Green', | ||
displayName: 'Chris Green', | ||
userRoleName: 'Representative', | ||
interpretation_language: undefined | ||
}), | ||
|
@@ -43,7 +43,7 @@ function initHearingRequest(): VHBooking { | |
firstName: 'Jane', | ||
lastName: 'Smith', | ||
email: '[email protected]', | ||
display_Name: 'Jane Smith', | ||
displayName: 'Jane Smith', | ||
userRoleName: 'Individual', | ||
interpretation_language: undefined | ||
}) | ||
|
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.