Test that the local user can see their own screen share

To make this test work I had to extend the mocking of the CallViewModel tests to make a local connection object exist.
This commit is contained in:
Robin
2026-04-15 19:53:11 +02:00
parent b03524e25f
commit e8963effe2
5 changed files with 154 additions and 24 deletions

View File

@@ -74,6 +74,8 @@ import {
createRemoteScreenShare,
type RemoteScreenShareViewModel,
} from "../state/media/RemoteScreenShareViewModel";
import { Connection } from "../state/CallViewModel/remoteMembers/Connection";
import { type SFUConfig } from "../livekit/openIDSFU";
export function withFakeTimers(continuation: () => void): void {
vi.useFakeTimers();
@@ -210,6 +212,13 @@ export const exampleTransport: LivekitTransport = {
livekit_alias: "!alias:example.org",
};
export const exampleSfuConfig: SFUConfig = {
jwt: "foo",
livekitAlias: "bar",
livekitIdentity: "baz",
url: "bro",
};
export function mockRtcMembership(
user: string | RoomMember,
deviceId: string,
@@ -564,3 +573,8 @@ export function mockMuteStates(
videoEnabled: false,
});
}
export class MockConnection extends Connection {
public async start(): Promise<void> {}
public async stop(): Promise<void> {}
}