fix, testing: i18n not properly configured

This commit is contained in:
Valere
2025-03-03 14:37:29 +01:00
parent 05e81a8143
commit 4c91326edb
12 changed files with 30 additions and 42 deletions

View File

@@ -70,16 +70,14 @@ describe("MediaView", () => {
<MediaView {...baseProps} video={undefined} localParticipant={true} />,
);
expect(screen.getByRole("img", { name: "some name" })).toBeVisible();
expect(screen.queryAllByText("video_tile.waiting_for_media").length).toBe(
0,
);
expect(screen.queryAllByText("Waiting for media...").length).toBe(0);
});
it("shows avatar and label for remote user", () => {
render(
<MediaView {...baseProps} video={undefined} localParticipant={false} />,
);
expect(screen.getByRole("img", { name: "some name" })).toBeVisible();
expect(screen.getByText("video_tile.waiting_for_media")).toBeVisible();
expect(screen.getByText("Waiting for media...")).toBeVisible();
});
});
@@ -98,9 +96,7 @@ describe("MediaView", () => {
</TooltipProvider>,
);
expect(await axe(container)).toHaveNoViolations();
expect(
screen.getByRole("img", { name: "common.unencrypted" }),
).toBeTruthy();
expect(screen.getByRole("img", { name: "Not encrypted" })).toBeTruthy();
});
test("is not shown", () => {
@@ -110,7 +106,7 @@ describe("MediaView", () => {
</TooltipProvider>,
);
expect(
screen.queryAllByRole("img", { name: "common.unencrypted" }).length,
screen.queryAllByRole("img", { name: "Not encrypted" }).length,
).toBe(0);
});
});

View File

@@ -64,14 +64,12 @@ test("SpotlightTile is accessible", async () => {
// Bob should be out of the spotlight, and therefore invisible
expect(isInaccessible(screen.getByText("Bob"))).toBe(true);
// Now navigate to Bob
await user.click(screen.getByRole("button", { name: "common.next" }));
await user.click(screen.getByRole("button", { name: "Next" }));
screen.getByText("Bob");
expect(screen.getByRole("img")).not.toBe(aliceAvatar);
expect(isInaccessible(screen.getByText("Alice"))).toBe(true);
// Can toggle whether the tile is expanded
await user.click(
screen.getByRole("button", { name: "video_tile.expand" }),
);
await user.click(screen.getByRole("button", { name: "Expand" }));
expect(toggleExpanded).toHaveBeenCalled();
},
);