front: test fixes
This commit is contained in:
@@ -3,6 +3,7 @@ import DefaultEntityPage from '../../components/DefaultEntityPage';
|
||||
import { App, AppComponentBuilder } from '../app/types';
|
||||
import BackstagePlugin from '../plugin/Plugin';
|
||||
import { EntityPageNavItem, EntityPageView } from './types';
|
||||
import { IconComponent } from '../types';
|
||||
|
||||
// type AppComponents = {
|
||||
// EntityPage: ComponentType<EntityPageProps>;
|
||||
@@ -10,8 +11,6 @@ import { EntityPageNavItem, EntityPageView } from './types';
|
||||
// EntityPageHeader: ComponentType<EntityPageHeaderProps>;
|
||||
// };
|
||||
|
||||
type IconComponent = ComponentType<{ fontSize?: number }>;
|
||||
|
||||
type EntityPageRegistration =
|
||||
| {
|
||||
type: 'page';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ComponentType } from 'react';
|
||||
import { PluginOutput, RoutePath, RouteOptions } from './types';
|
||||
import { IconComponent } from '../types';
|
||||
|
||||
export type PluginConfig = {
|
||||
id: string;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import HomePage from './HomePage';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/core';
|
||||
|
||||
describe('HomePage', () => {
|
||||
it('should render', () => {
|
||||
const rendered = render(<HomePage />);
|
||||
const rendered = render(
|
||||
<ThemeProvider theme={BackstageTheme}>
|
||||
<HomePage />
|
||||
</ThemeProvider>,
|
||||
);
|
||||
expect(rendered.baseElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user