mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-28 06:50:26 +00:00
Merge remote-tracking branch 'origin/livekit' into hs/reactions-viewcallmodel
This commit is contained in:
@@ -5,10 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { expect, test } from "vitest";
|
||||
import { expect, test, afterEach } from "vitest";
|
||||
import { render } from "@testing-library/react";
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { afterEach } from "node:test";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import { Modal } from "./Modal";
|
||||
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
type MockedFunction,
|
||||
test,
|
||||
vitest,
|
||||
afterEach,
|
||||
} from "vitest";
|
||||
import { afterEach } from "node:test";
|
||||
import { act } from "react";
|
||||
import { type CallMembership } from "matrix-js-sdk/src/matrixrtc";
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ Please see LICENSE in the repository root for full details.
|
||||
import { render } from "@testing-library/react";
|
||||
import {
|
||||
afterAll,
|
||||
afterEach,
|
||||
beforeEach,
|
||||
expect,
|
||||
test,
|
||||
@@ -17,7 +18,6 @@ import {
|
||||
} from "vitest";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
import { act, type ReactNode } from "react";
|
||||
import { afterEach } from "node:test";
|
||||
|
||||
import { ReactionsAudioRenderer } from "./ReactionAudioRenderer";
|
||||
import {
|
||||
|
||||
@@ -6,9 +6,8 @@ Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { render } from "@testing-library/react";
|
||||
import { expect, test } from "vitest";
|
||||
import { expect, test, afterEach } from "vitest";
|
||||
import { act } from "react";
|
||||
import { afterEach } from "node:test";
|
||||
|
||||
import { showReactions } from "../settings/settings";
|
||||
import { ReactionsOverlay } from "./ReactionsOverlay";
|
||||
@@ -42,7 +41,10 @@ test("shows a reaction when sent", () => {
|
||||
const reaction = ReactionSet[0];
|
||||
act(() => {
|
||||
reactionsSubject$.next({
|
||||
[aliceRtcMember.deviceId]: { reactionOption: reaction, expireAfter: 0 },
|
||||
[aliceRtcMember.deviceId]: {
|
||||
reactionOption: reaction,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
});
|
||||
});
|
||||
const span = getByRole("presentation");
|
||||
@@ -60,8 +62,14 @@ test("shows two of the same reaction when sent", () => {
|
||||
const { getAllByRole } = render(<ReactionsOverlay vm={vm} />);
|
||||
act(() => {
|
||||
reactionsSubject$.next({
|
||||
[aliceRtcMember.deviceId]: { reactionOption: reaction, expireAfter: 0 },
|
||||
[bobRtcMember.deviceId]: { reactionOption: reaction, expireAfter: 0 },
|
||||
[aliceRtcMember.deviceId]: {
|
||||
reactionOption: reaction,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
[bobRtcMember.deviceId]: {
|
||||
reactionOption: reaction,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
});
|
||||
});
|
||||
expect(getAllByRole("presentation")).toHaveLength(2);
|
||||
@@ -77,8 +85,14 @@ test("shows two different reactions when sent", () => {
|
||||
const { getAllByRole } = render(<ReactionsOverlay vm={vm} />);
|
||||
act(() => {
|
||||
reactionsSubject$.next({
|
||||
[aliceRtcMember.deviceId]: { reactionOption: reactionA, expireAfter: 0 },
|
||||
[bobRtcMember.deviceId]: { reactionOption: reactionB, expireAfter: 0 },
|
||||
[aliceRtcMember.deviceId]: {
|
||||
reactionOption: reactionA,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
[bobRtcMember.deviceId]: {
|
||||
reactionOption: reactionB,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
});
|
||||
});
|
||||
const [reactionElementA, reactionElementB] = getAllByRole("presentation");
|
||||
@@ -96,7 +110,10 @@ test("hides reactions when reaction animations are disabled", () => {
|
||||
const { container } = render(<ReactionsOverlay vm={vm} />);
|
||||
act(() => {
|
||||
reactionsSubject$.next({
|
||||
[aliceRtcMember.deviceId]: { reactionOption: reaction, expireAfter: 0 },
|
||||
[aliceRtcMember.deviceId]: {
|
||||
reactionOption: reaction,
|
||||
expireAfter: new Date(0),
|
||||
},
|
||||
});
|
||||
});
|
||||
expect(container.getElementsByTagName("span")).toHaveLength(0);
|
||||
|
||||
@@ -5,10 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { expect, test, vitest } from "vitest";
|
||||
import { expect, test, vitest, afterEach } from "vitest";
|
||||
import { type FC } from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import { afterEach } from "node:test";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import { deviceStub, MediaDevicesContext } from "./livekit/MediaDevicesContext";
|
||||
|
||||
131
vitest.config.js.timestamp-1734431318010-5e75ad3d9ffe3.mjs
Normal file
131
vitest.config.js.timestamp-1734431318010-5e75ad3d9ffe3.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user