feat: added some more steps towards rewriting the scaffodler-frontend

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-02-07 17:17:21 +01:00
parent 8db4dc297a
commit df0d2e7d97
6 changed files with 36 additions and 2 deletions
+3
View File
@@ -283,6 +283,9 @@ catalog:
# Backstage end-to-end tests of TechDocs
- type: file
target: ../../cypress/e2e-fixture.catalog.info.yaml
- type: url
target: https://github.com/benjdlambert/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
scaffolder:
# Use to customize default commit author info used when new components are created
# defaultAuthor:
+2 -2
View File
@@ -59,7 +59,7 @@ import { LighthousePage } from '@backstage/plugin-lighthouse';
import { NewRelicPage } from '@backstage/plugin-newrelic';
import {
ScaffolderFieldExtensions,
ScaffolderPage,
NextScaffolderPage,
scaffolderPlugin,
} from '@backstage/plugin-scaffolder';
import { SearchPage } from '@backstage/plugin-search';
@@ -178,7 +178,7 @@ const routes = (
<Route
path="/create"
element={
<ScaffolderPage
<NextScaffolderPage
groups={[
{
title: 'Recommended',
@@ -69,6 +69,7 @@ export const EntitySearchBar = () => {
<Toolbar className={classes.searchToolbar}>
<FormControl>
<Input
aria-label="search"
id="input-with-icon-adornment"
className={classes.input}
placeholder="Search"
+1
View File
@@ -55,6 +55,7 @@ export {
RepoUrlPickerFieldExtension,
ScaffolderPage,
scaffolderPlugin,
NextScaffolderPage,
} from './plugin';
export * from './components';
export type { TaskPageProps } from './components/TaskPage';
@@ -70,4 +70,25 @@ describe('TemplateListPage', () => {
expect(getByRole('menuitem', { name: 'All' })).toBeInTheDocument();
expect(getByRole('menuitem', { name: 'Starred' })).toBeInTheDocument();
});
it('should render the category picker', () => {
const { getByText } = await renderInTestApp(
<TestApiProvider
apis={[
[catalogApiRef, {}],
[
starredEntitiesApiRef,
new DefaultStarredEntitiesApi({
storageApi: MockStorageApi.create(),
}),
],
[permissionApiRef, {}],
]}
>
<TemplateListPage />
</TestApiProvider>,
);
expect(getByText('Categories')).toBeInTheDocument();
});
});
+8
View File
@@ -150,3 +150,11 @@ export const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(
name: 'EntityTagsPicker',
}),
);
export const NextScaffolderPage = scaffolderPlugin.provide(
createRoutableExtension({
name: 'NextScaffolderPage',
component: () => import('./next/Router').then(m => m.Router),
mountPoint: rootRouteRef,
}),
);