mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-06 14:38:21 +00:00
Fix widgets getting stuck in loading states (#31314)
* Refer to ClientWidgetApi as "widget API" rather than "messaging" * Rename StopGapWidgetDriver to ElementWidgetDriver * Rename StopGapWidget to WidgetMessaging * Fix WidgetMessaging's lifetime by storing it in WidgetMessagingStore (Rather than storing just the raw ClientWidgetApi objects.) * Unfail test * use an error * cleanup start * Add docs * Prettier * link to store * remove a let * More logging, split up loop * Add a test demonstrating a regression in Call.start * Restore Call.start to a single, robust event loop * Fix test failure by resetting the messaging store * Expand on the WidgetMessaging doc comment * Add additional tests to buff up coverage * Add a test for the sticker picker opening the IM. * reduce copy paste --------- Co-authored-by: Half-Shot <will@half-shot.uk> Co-authored-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -20,7 +20,6 @@ import {
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { Widget } from "matrix-widget-api";
|
||||
|
||||
import type { ClientWidgetApi } from "matrix-widget-api";
|
||||
import {
|
||||
stubClient,
|
||||
mkRoomMember,
|
||||
@@ -47,6 +46,7 @@ import { MessagePreviewStore } from "../../../../../src/stores/room-list/Message
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
import { ConnectionState } from "../../../../../src/models/Call";
|
||||
import { type WidgetMessaging } from "../../../../../src/stores/widgets/WidgetMessaging";
|
||||
|
||||
jest.mock("../../../../../src/customisations/helpers/UIComponents", () => ({
|
||||
shouldShowComponent: jest.fn(),
|
||||
@@ -204,7 +204,7 @@ describe("RoomTile", () => {
|
||||
widget = new Widget(call.widget);
|
||||
WidgetMessagingStore.instance.storeMessaging(widget, room.roomId, {
|
||||
stop: () => {},
|
||||
} as unknown as ClientWidgetApi);
|
||||
} as unknown as WidgetMessaging);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user