Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaed Parkar committed Nov 7, 2023
1 parent 83f4752 commit e9fe8cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ describe('Video hearing service', () => {
});
});

fdescribe('removeJudiciaryParticipant', () => {
describe('removeJudiciaryParticipant', () => {
it('should remove judiciary participant from modelHearing', () => {
// Arrange
const participantEmail = '[email protected]';
Expand Down

0 comments on commit e9fe8cb

Please sign in to comment.