Fixed test case
Signed-off-by: Deepak Bhardwaj <deepak.bhardwaj@outlook.com>
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user