Fixed test case

Signed-off-by: Deepak Bhardwaj <deepak.bhardwaj@outlook.com>
This commit is contained in:
Deepak Bhardwaj
2021-08-23 20:03:53 +05:30
parent b5706f4b04
commit 269aba5b36
2 changed files with 2 additions and 2 deletions
@@ -39,6 +39,6 @@ describe('ExampleComponent', () => {
<AllureReportComponent />
</ThemeProvider>,
);
expect(rendered.getByText('Welcome to allure!')).toBeInTheDocument();
expect(rendered.getByText('Missing Annotation')).toBeInTheDocument();
});
});
@@ -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 <AllureReport entity={entity} />;
return (