From b61ddf99c4eeb01f3712e96cfc846187603676c2 Mon Sep 17 00:00:00 2001 From: Mat Jordan Date: Wed, 31 Jul 2024 13:54:42 -0400 Subject: [PATCH] Fix tests. --- src/components/Slider/Header/Header.test.tsx | 5 ++++- .../Viewer/InformationPanel/Annotation/VTT/VTT.test.tsx | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Slider/Header/Header.test.tsx b/src/components/Slider/Header/Header.test.tsx index 5986e5177..1735a1bd8 100644 --- a/src/components/Slider/Header/Header.test.tsx +++ b/src/components/Slider/Header/Header.test.tsx @@ -2,6 +2,7 @@ import { render, screen } from "@testing-library/react"; import Header from "./Header"; import React from "react"; +import { useTranslation } from "react-i18next"; const headerProps = { label: { @@ -42,7 +43,9 @@ describe("Header component", () => { expect( screen.getByRole("link", { name: /edward s. curtis/i }), ).toBeInTheDocument(); - expect(screen.getByRole("link", { name: /view all/i })).toBeInTheDocument(); + expect( + screen.getByRole("link", { name: /commonViewAll/i }), + ).toBeInTheDocument(); }); test("renders summary if present", () => { diff --git a/src/components/Viewer/InformationPanel/Annotation/VTT/VTT.test.tsx b/src/components/Viewer/InformationPanel/Annotation/VTT/VTT.test.tsx index 8d1ac8a44..9b57211c3 100644 --- a/src/components/Viewer/InformationPanel/Annotation/VTT/VTT.test.tsx +++ b/src/components/Viewer/InformationPanel/Annotation/VTT/VTT.test.tsx @@ -23,10 +23,7 @@ describe("AnnotationItemVTT", () => { , ); const el = screen.getByTestId("annotation-item-vtt"); - expect(el).toHaveAttribute( - "aria-label", - "navigate Captions in WebVTT format", - ); + expect(el).toHaveAttribute("aria-label", "Captions in WebVTT format"); }); it("should render the child Menu component", () => {