You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Update test interface to add call object (#10477)
Compatibility with https://github.com/matrix-org/matrix-js-sdk/pull/3237
This commit is contained in:
@ -365,7 +365,7 @@ describe("LegacyCallHandler", () => {
|
||||
fakeCall!.getRemoteAssertedIdentity = jest.fn().mockReturnValue({
|
||||
id: NATIVE_BOB,
|
||||
});
|
||||
fakeCall!.emit(CallEvent.AssertedIdentityChanged);
|
||||
fakeCall!.emit(CallEvent.AssertedIdentityChanged, fakeCall);
|
||||
|
||||
// Now set the config option
|
||||
SdkConfig.add({
|
||||
@ -378,7 +378,7 @@ describe("LegacyCallHandler", () => {
|
||||
fakeCall!.getRemoteAssertedIdentity = jest.fn().mockReturnValue({
|
||||
id: NATIVE_CHARLIE,
|
||||
});
|
||||
fakeCall!.emit(CallEvent.AssertedIdentityChanged);
|
||||
fakeCall!.emit(CallEvent.AssertedIdentityChanged, fakeCall);
|
||||
|
||||
await roomChangePromise;
|
||||
callHandler.removeAllListeners();
|
||||
@ -624,7 +624,7 @@ describe("LegacyCallHandler without third party protocols", () => {
|
||||
|
||||
// call added to call map
|
||||
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
|
||||
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
|
||||
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);
|
||||
|
||||
// ringer audio element started
|
||||
expect(mockAudioElement.play).toHaveBeenCalled();
|
||||
@ -641,7 +641,7 @@ describe("LegacyCallHandler without third party protocols", () => {
|
||||
|
||||
// call added to call map
|
||||
expect(callHandler.getCallForRoom(roomId)).toEqual(call);
|
||||
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected);
|
||||
call.emit(CallEvent.State, CallState.Ringing, CallState.Connected, fakeCall);
|
||||
|
||||
// ringer audio element started
|
||||
expect(mockAudioElement.play).not.toHaveBeenCalled();
|
||||
|
Reference in New Issue
Block a user