mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-15 07:50:26 +00:00
Fix mocks
This commit is contained in:
@@ -12,7 +12,7 @@ import userEvent from "@testing-library/user-event";
|
||||
import { of } from "rxjs";
|
||||
|
||||
import { SpotlightTile } from "./SpotlightTile";
|
||||
import { withLocalMedia, withRemoteMedia } from "../utils/test";
|
||||
import { mockMembership, withLocalMedia, withRemoteMedia } from "../utils/test";
|
||||
import { SpotlightTileViewModel } from "../state/TileViewModel";
|
||||
|
||||
global.IntersectionObserver = class MockIntersectionObserver {
|
||||
@@ -22,6 +22,7 @@ global.IntersectionObserver = class MockIntersectionObserver {
|
||||
|
||||
test("SpotlightTile is accessible", async () => {
|
||||
await withRemoteMedia(
|
||||
mockMembership("@alice:example.org", "AAAA"),
|
||||
{
|
||||
rawDisplayName: "Alice",
|
||||
getMxcAvatarUrl: () => "mxc://adfsg",
|
||||
@@ -29,6 +30,7 @@ test("SpotlightTile is accessible", async () => {
|
||||
{},
|
||||
async (vm1) => {
|
||||
await withLocalMedia(
|
||||
mockMembership("@bob:example.org", "BBBB"),
|
||||
{
|
||||
rawDisplayName: "Bob",
|
||||
getMxcAvatarUrl: () => "mxc://dlskf",
|
||||
|
||||
Reference in New Issue
Block a user