Skip to content

Commit

Permalink
VIH-8295 observer hearing room UI bug fix (#2127)
Browse files Browse the repository at this point in the history
Hide additional flex bar in icons container when user is an observer because they will see a bar but no icons such as share-screen to separate the sections
  • Loading branch information
shaed-parkar authored Apr 29, 2024
1 parent 40e8efa commit 0722b5b
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,15 @@ describe('UserMediaService', () => {
const conferenceId = 'conferenceId';
localStorageServiceSpy.load.and.returnValue(null);
userMediaService.updateStartWithAudioMuted(conferenceId, true);
expect(localStorageServiceSpy.save).toHaveBeenCalledWith(userMediaService.CONFERENCES_KEY, [
new ConferenceSetting(conferenceId, true)
]);
expect(localStorageServiceSpy.save).toHaveBeenCalledWith(
userMediaService.CONFERENCES_KEY,
jasmine.arrayContaining([
jasmine.objectContaining({
conferenceId: conferenceId,
startWithAudioMuted: true
})
])
);
});

it('should not insert into local storage when startWithAudioMuted is false', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ClientSettingsResponse,
ConferenceResponse,
ParticipantForUserResponse,
ParticipantResponse,
ParticipantStatus,
Role
} from 'src/app/services/clients/api-client';
Expand Down Expand Up @@ -1122,4 +1123,21 @@ describe('HearingControlsBaseComponent', () => {
expect(eventsServiceSpy.sendMediaStatus).toHaveBeenCalledTimes(0);
});
});

describe('isObserver', () => {
it('should return true when participant role is QuickLinkObserver', () => {
component.participant = { role: Role.QuickLinkObserver } as ParticipantResponse;
expect(component.isObserver).toBeTrue();
});

it('should return false when participant role is not QuickLinkObserver', () => {
component.participant = { role: Role.Judge } as ParticipantResponse;
expect(component.isObserver).toBeFalse();
});

it('should return false when participant is undefined', () => {
component.participant = undefined;
expect(component.isObserver).toBeFalse();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export abstract class HearingControlsBaseComponent implements OnInit, OnDestroy
return this.participant.role === Role.JudicialOfficeHolder || this.isJudge;
}

get isObserver(): boolean {
return this.participant?.role === Role.QuickLinkObserver;
}

get isJOHRoom(): boolean {
return this.participant?.current_room?.label.startsWith('JudgeJOH');
}
Expand Down
Loading

0 comments on commit 0722b5b

Please sign in to comment.