From 269aba5b36e940a49bd683290e5f35b5c60d3961 Mon Sep 17 00:00:00 2001 From: Deepak Bhardwaj Date: Mon, 23 Aug 2021 20:03:53 +0530 Subject: [PATCH] Fixed test case Signed-off-by: Deepak Bhardwaj --- .../AllureReportComponent/AllureReportComponent.test.tsx | 2 +- .../components/AllureReportComponent/AllureReportComponent.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx index 38fa4c0923..19c7796e55 100644 --- a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx +++ b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.test.tsx @@ -39,6 +39,6 @@ describe('ExampleComponent', () => { , ); - expect(rendered.getByText('Welcome to allure!')).toBeInTheDocument(); + expect(rendered.getByText('Missing Annotation')).toBeInTheDocument(); }); }); diff --git a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx index c59284b3ef..fd46fa0361 100644 --- a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx +++ b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx @@ -61,7 +61,7 @@ const AllureReport = (props: { entity: Entity }) => { export const AllureReportComponent = () => { const { entity } = useEntity(); - const isReportAvailable = isAllureReportAvailable(entity); + const isReportAvailable = entity && isAllureReportAvailable(entity); if (isReportAvailable) return ; return (