Revert everything except the test
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
@@ -150,7 +150,6 @@ describe('wrapInTestApp', () => {
|
||||
mountedRoutes: {
|
||||
'/my-a-path': aRouteRef,
|
||||
'/my-b-path/:name': bRouteRef,
|
||||
'/my-b-path/:name/:page': subRouteRef,
|
||||
'/my-e-path/:name': externalRouteRef,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,21 +14,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import privateExports, {
|
||||
attachComponentData,
|
||||
BootErrorPageProps,
|
||||
createRouteRef,
|
||||
defaultSystemIcons,
|
||||
ExternalRouteRef,
|
||||
RouteRef,
|
||||
SubRouteRef,
|
||||
} from '@backstage/core-api';
|
||||
import { renderWithEffects } from '@backstage/test-utils-core';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { RenderResult } from '@testing-library/react';
|
||||
import React, { ComponentType, ReactElement, ReactNode } from 'react';
|
||||
import React, { ComponentType, ReactNode, ReactElement } from 'react';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import privateExports, {
|
||||
defaultSystemIcons,
|
||||
BootErrorPageProps,
|
||||
RouteRef,
|
||||
ExternalRouteRef,
|
||||
attachComponentData,
|
||||
createRouteRef,
|
||||
} from '@backstage/core-api';
|
||||
import { RenderResult } from '@testing-library/react';
|
||||
import { renderWithEffects } from '@backstage/test-utils-core';
|
||||
import { mockApis } from './mockApis';
|
||||
|
||||
const { PrivateAppImpl } = privateExports;
|
||||
@@ -64,11 +63,11 @@ type TestAppOptions = {
|
||||
* // ...
|
||||
* const link = useRouteRef(myRouteRef)
|
||||
*/
|
||||
mountedRoutes?: { [path: string]: RouteRef | SubRouteRef | ExternalRouteRef };
|
||||
mountedRoutes?: { [path: string]: RouteRef | ExternalRouteRef };
|
||||
};
|
||||
|
||||
function isExternalRouteRef(
|
||||
routeRef: RouteRef | SubRouteRef | ExternalRouteRef,
|
||||
routeRef: RouteRef | ExternalRouteRef,
|
||||
): routeRef is ExternalRouteRef {
|
||||
// TODO(Rugvip): Least ugly workaround for now, but replace :D
|
||||
return String(routeRef).includes('{type=external,');
|
||||
|
||||
Reference in New Issue
Block a user