mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-25 06:40:26 +00:00
fixing some tests
This commit is contained in:
@@ -401,7 +401,9 @@ export class CallViewModel extends ViewModel {
|
||||
* The raw list of RemoteParticipants as reported by LiveKit
|
||||
*/
|
||||
private readonly rawRemoteParticipants$: Observable<RemoteParticipant[]> =
|
||||
connectedParticipantsObserver(this.livekitRoom).behavior(this.scope);
|
||||
connectedParticipantsObserver(this.livekitRoom)
|
||||
.pipe(startWith([]))
|
||||
.behavior(this.scope);
|
||||
|
||||
/**
|
||||
* Lists of RemoteParticipants to "hold" on display, even if LiveKit claims that
|
||||
@@ -507,6 +509,21 @@ export class CallViewModel extends ViewModel {
|
||||
)
|
||||
.behavior(this.scope);
|
||||
|
||||
public readonly handsRaised$ = this.handsRaisedSubject$.behavior(this.scope);
|
||||
|
||||
public readonly reactions$ = this.reactionsSubject$
|
||||
.pipe(
|
||||
map((v) =>
|
||||
Object.fromEntries(
|
||||
Object.entries(v).map(([a, { reactionOption }]) => [
|
||||
a,
|
||||
reactionOption,
|
||||
]),
|
||||
),
|
||||
),
|
||||
)
|
||||
.behavior(this.scope);
|
||||
|
||||
/**
|
||||
* List of MediaItems that we want to display
|
||||
*/
|
||||
@@ -1313,21 +1330,6 @@ export class CallViewModel extends ViewModel {
|
||||
},
|
||||
).behavior(this.scope);
|
||||
|
||||
public readonly reactions$ = this.reactionsSubject$
|
||||
.pipe(
|
||||
map((v) =>
|
||||
Object.fromEntries(
|
||||
Object.entries(v).map(([a, { reactionOption }]) => [
|
||||
a,
|
||||
reactionOption,
|
||||
]),
|
||||
),
|
||||
),
|
||||
)
|
||||
.behavior(this.scope);
|
||||
|
||||
public readonly handsRaised$ = this.handsRaisedSubject$.behavior(this.scope);
|
||||
|
||||
/**
|
||||
* Emits an array of reactions that should be visible on the screen.
|
||||
*/
|
||||
|
||||
@@ -26,11 +26,9 @@ test("muteAllAudio$", () => {
|
||||
|
||||
muteAllAudio.unsubscribe();
|
||||
|
||||
expect(valueMock).toHaveBeenCalledTimes(6);
|
||||
expect(valueMock).toHaveBeenCalledTimes(4);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(1, false); // startWith([false, muteAllAudioSetting.getValue()]);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(2, true); // setAudioEnabled$.next(false);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(3, false); // setAudioEnabled$.next(true);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(4, false); // muteAllAudioSetting.setValue(false);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(5, true); // muteAllAudioSetting.setValue(true);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(6, true); // setAudioEnabled$.next(false);
|
||||
expect(valueMock).toHaveBeenNthCalledWith(4, true); // muteAllAudioSetting.setValue(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user