Acknowledge DeviceMute
widget actions (#12790)
* acknowledge DeviceMute widget actions (to prevent sending the default error response to the widget) * rephrase comment * test for widget action ack
This commit is contained in:
parent
6e9fc55cb4
commit
72e7df0f13
3 changed files with 34 additions and 5 deletions
|
@ -965,6 +965,18 @@ describe("ElementCall", () => {
|
|||
expect(messaging.transport.send).toHaveBeenCalledWith(ElementWidgetActions.TileLayout, {});
|
||||
});
|
||||
|
||||
it("acknowledges mute_device widget action", async () => {
|
||||
await callConnectProcedure(call);
|
||||
const preventDefault = jest.fn();
|
||||
const mockEv = {
|
||||
preventDefault,
|
||||
detail: { video_enabled: false },
|
||||
};
|
||||
messaging.emit(`action:${ElementWidgetActions.DeviceMute}`, mockEv);
|
||||
expect(messaging.transport.reply).toHaveBeenCalledWith({ video_enabled: false }, {});
|
||||
expect(preventDefault).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("emits events when connection state changes", async () => {
|
||||
// const wait = jest.spyOn(CallModule, "waitForEvent");
|
||||
const onConnectionState = jest.fn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue