From 19290074bcc5c66a851ff1a24b2add0345fb5111 Mon Sep 17 00:00:00 2001 From: Ian MacFarland Date: Tue, 28 Jun 2022 14:12:41 -0700 Subject: [PATCH] fix broken test --- spotlight-client/src/App.test.tsx | 6 ++++-- spotlight-client/src/PageTenant/PageTenant.tsx | 14 +++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/spotlight-client/src/App.test.tsx b/spotlight-client/src/App.test.tsx index fc5d5edf..ddf2939b 100644 --- a/spotlight-client/src/App.test.tsx +++ b/spotlight-client/src/App.test.tsx @@ -77,7 +77,7 @@ describe("navigation", () => { test("tenant home", () => { expect.hasAssertions(); const targetPath = "/us-nd"; - const lookupArgs = ["heading", { name: /DOCR/, level: 1 }] as const; + const lookupArgs = ["heading", { name: /DOCR/, level: 2 }] as const; return verifyWithNavigation({ targetPath, lookupArgs }); }); @@ -142,7 +142,9 @@ describe("navigation", () => { fireEvent.click(tenantLink); await waitFor(async () => - expect(await screen.findByTestId("PageTitle")).toHaveTextContent("DOCR") + expect(await screen.findByTestId("PageTitle")).toHaveTextContent( + "transform lives, influence change," + ) ); expect(screen.queryByText("Sentencing Data")).not.toBeInTheDocument(); diff --git a/spotlight-client/src/PageTenant/PageTenant.tsx b/spotlight-client/src/PageTenant/PageTenant.tsx index 57f4d6a0..5f1d540b 100644 --- a/spotlight-client/src/PageTenant/PageTenant.tsx +++ b/spotlight-client/src/PageTenant/PageTenant.tsx @@ -16,7 +16,7 @@ // ============================================================================= import { RouteComponentProps } from "@reach/router"; -import { Body19, typography } from "@recidiviz/design-system"; +import { typography } from "@recidiviz/design-system"; import HTMLReactParser from "html-react-parser"; import { observer } from "mobx-react-lite"; import { rem } from "polished"; @@ -90,6 +90,10 @@ const Title = styled.h1` } `; +const Subtitle = styled.h2` + ${typography.Body19} +`; + const PageTenant: React.FC = () => { const { tenant } = useDataStore(); const [narrativeId, setNarrativeId] = React.useState( @@ -102,8 +106,12 @@ const PageTenant: React.FC = () => { // tenant may be briefly undefined during initial page load - {HTMLReactParser(tenant.description)} - {tenant.ctaCopy && {HTMLReactParser(tenant.ctaCopy)}} + + {HTMLReactParser(tenant.description)} + + {tenant.ctaCopy && ( + {HTMLReactParser(tenant.ctaCopy)} + )}