-
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
Shaed Parkar
committed
Nov 7, 2023
1 parent
83f4752
commit e9fe8cb
Showing
2 changed files
with
10 additions
and
10 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 |
---|---|---|
|
@@ -72,42 +72,42 @@ describe('ParticipantItemComponent', () => { | |
it('should edit participant details', () => { | ||
component.isSummaryPage = true; | ||
component.participant = { representee: 'rep', is_judge: false, is_exist_person: false, isJudiciaryMember: false }; | ||
const participant: ParticipantModel = { | ||
const pat: ParticipantModel = { | ||
email: '[email protected]', | ||
is_exist_person: false, | ||
is_judge: false, | ||
isJudiciaryMember: false | ||
}; | ||
component.editParticipant(participant); | ||
component.editParticipant(pat); | ||
fixture.detectChanges(); | ||
expect(bookingServiceSpy.setEditMode).toHaveBeenCalled(); | ||
expect(bookingServiceSpy.setParticipantEmail).toHaveBeenCalledWith(participant.email); | ||
expect(bookingServiceSpy.setParticipantEmail).toHaveBeenCalledWith(pat.email); | ||
expect(router.navigate).toHaveBeenCalledWith([PageUrls.AddParticipants]); | ||
}); | ||
|
||
it('should edit judicial office holder details', () => { | ||
component.isSummaryPage = true; | ||
component.participant = { representee: 'rep', is_judge: true, is_exist_person: false, isJudiciaryMember: true }; | ||
const participant: ParticipantModel = { email: '[email protected]', is_exist_person: false, is_judge: true, isJudiciaryMember: true }; | ||
component.editParticipant(participant); | ||
const pat: ParticipantModel = { email: '[email protected]', is_exist_person: false, is_judge: true, isJudiciaryMember: true }; | ||
component.editParticipant(pat); | ||
fixture.detectChanges(); | ||
expect(bookingServiceSpy.setEditMode).toHaveBeenCalled(); | ||
expect(bookingServiceSpy.setParticipantEmail).toHaveBeenCalledWith(participant.email); | ||
expect(bookingServiceSpy.setParticipantEmail).toHaveBeenCalledWith(pat.email); | ||
expect(router.navigate).toHaveBeenCalledWith([PageUrls.AddJudicialOfficeHolders]); | ||
}); | ||
|
||
it('should emit edit event for non-summary page', () => { | ||
component.isSummaryPage = false; | ||
const participant: ParticipantModel = { | ||
const pat: ParticipantModel = { | ||
email: '[email protected]', | ||
is_exist_person: false, | ||
is_judge: false, | ||
isJudiciaryMember: false | ||
}; | ||
spyOn(component.edit, 'emit'); | ||
component.editParticipant(participant); | ||
component.editParticipant(pat); | ||
fixture.detectChanges(); | ||
expect(component.edit.emit).toHaveBeenCalledWith(participant); | ||
expect(component.edit.emit).toHaveBeenCalledWith(pat); | ||
}); | ||
|
||
it('should return true if participant has a representative', () => { | ||
|
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 |
---|---|---|
|
@@ -708,7 +708,7 @@ describe('Video hearing service', () => { | |
}); | ||
}); | ||
|
||
fdescribe('removeJudiciaryParticipant', () => { | ||
describe('removeJudiciaryParticipant', () => { | ||
it('should remove judiciary participant from modelHearing', () => { | ||
// Arrange | ||
const participantEmail = '[email protected]'; | ||
|