Show "waiting for media..." when no participant

This commit is contained in:
Hugh Nimmo-Smith
2024-11-25 21:17:20 +00:00
parent b819a72c57
commit 4f2591feae
4 changed files with 29 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
*/
import { describe, expect, test } from "vitest";
import { describe, expect, it, test } from "vitest";
import { render, screen } from "@testing-library/react";
import { axe } from "vitest-axe";
import { TooltipProvider } from "@vector-im/compound-web";
@@ -59,6 +59,14 @@ describe("MediaView", () => {
});
});
describe("with no participant", () => {
it("shows avatar", () => {
render(<MediaView {...baseProps} video={undefined} />);
expect(screen.getByRole("img", { name: "some name" })).toBeVisible();
expect(screen.getByText("video_tile.waiting_for_media")).toBeVisible();
});
});
describe("name tag", () => {
test("is shown with name", () => {
render(<MediaView {...baseProps} displayName="Bob" />);