From 2f71e2138308003394dc867294a81aac688a5993 Mon Sep 17 00:00:00 2001 From: gabalafou Date: Mon, 4 Mar 2024 21:55:10 -0500 Subject: [PATCH] lint --- .../metadata/components/EnvBuilds.tsx | 2 +- test/metadata/EnvBuilds.test.tsx | 28 ++++++++++++++++--- test/testutils.tsx | 3 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/features/metadata/components/EnvBuilds.tsx b/src/features/metadata/components/EnvBuilds.tsx index 0f629442..ce06497e 100644 --- a/src/features/metadata/components/EnvBuilds.tsx +++ b/src/features/metadata/components/EnvBuilds.tsx @@ -91,7 +91,7 @@ export const EnvBuilds = ({ /> )) || // If the selected build is a failed build, render the link to the build log. - (showLogLink && [". ", logLink])} + (showLogLink && <>. {logLink})} diff --git a/test/metadata/EnvBuilds.test.tsx b/test/metadata/EnvBuilds.test.tsx index 3f6c8c41..6dbcba66 100644 --- a/test/metadata/EnvBuilds.test.tsx +++ b/test/metadata/EnvBuilds.test.tsx @@ -9,7 +9,12 @@ describe("", () => { it("should render component", () => { const component = render( - + ); expect(component.container).toHaveTextContent("Builds"); @@ -18,7 +23,12 @@ describe("", () => { it("should show a progress bar if builds are not available", () => { const component = render( - + ); const progressBar = component.getByRole("progressbar"); @@ -29,7 +39,12 @@ describe("", () => { const failedBuild = { ...BUILD, status: "FAILED" }; const { getByTestId, getByRole } = render( - + ); expect(getByRole("link", { name: "Log" })).toBeInTheDocument(); @@ -41,7 +56,12 @@ describe("", () => { it("should not render log link for normal build", () => { const { getByTestId, queryByRole } = render( - + ); expect(queryByRole("link", { name: "Log" })).not.toBeInTheDocument(); diff --git a/test/testutils.tsx b/test/testutils.tsx index 90630d96..3a59d347 100644 --- a/test/testutils.tsx +++ b/test/testutils.tsx @@ -86,7 +86,8 @@ export const BUILD = { scheduled_on: "2022-11-08T14:28:05.655564", started_on: "2022-11-08T14:28:05.655564", ended_on: "2022-11-08T14:28:05.655564", - build_artifacts: [] + build_artifacts: [], + status_info: null }; export const mockTheme = (children: any) => {