Refactor into own files.

This commit is contained in:
Half-Shot
2024-10-28 15:57:55 +00:00
parent 43b4fc0a0c
commit 4501e670b2
8 changed files with 308 additions and 217 deletions

View File

@@ -9,6 +9,7 @@ import { RemoteTrackPublication } from "livekit-client";
import { test, expect } from "vitest";
import { render, screen } from "@testing-library/react";
import { axe } from "vitest-axe";
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { GridTile } from "./GridTile";
import { withRemoteMedia } from "../utils/test";
@@ -26,8 +27,17 @@ test("GridTile is accessible", async () => {
({}) as Partial<RemoteTrackPublication> as RemoteTrackPublication,
},
async (vm) => {
const fakeRtcSession = {
on: () => {},
off: () => {},
room: {
on: () => {},
off: () => {},
},
memberships: [],
} as unknown as MatrixRTCSession;
const { container } = render(
<ReactionsProvider>
<ReactionsProvider rtcSession={fakeRtcSession}>
<GridTile
vm={vm}
onOpenProfile={() => {}}