Add rootRouteRef to test app options to fix component tests

Signed-off-by: tudi2d <phugenroth@googlemail.com>
This commit is contained in:
tudi2d
2021-03-12 15:30:39 +01:00
parent 634577d887
commit 50be5c09aa
@@ -18,6 +18,7 @@ import { TechDocsPageHeader } from './TechDocsPageHeader';
import { act } from '@testing-library/react';
import { renderInTestApp } from '@backstage/test-utils';
import { entityRouteRef } from '@backstage/plugin-catalog-react';
import { rootRouteRef } from '../../plugin';
describe('<TechDocsPageHeader />', () => {
it('should render a techdocs page header', async () => {
@@ -54,6 +55,7 @@ describe('<TechDocsPageHeader />', () => {
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name/*': entityRouteRef,
'/docs': rootRouteRef,
},
},
);
@@ -85,6 +87,7 @@ describe('<TechDocsPageHeader />', () => {
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name/*': entityRouteRef,
'/docs': rootRouteRef,
},
},
);
@@ -118,6 +121,7 @@ describe('<TechDocsPageHeader />', () => {
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name/*': entityRouteRef,
'/docs': rootRouteRef,
},
},
);