chore: moving smaller components over from the next package
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
+2
-2
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
jest.mock('./TemplateCard', () => ({ TemplateCard: jest.fn(() => null) }));
|
||||
jest.mock('../TemplateCard', () => ({ TemplateCard: jest.fn(() => null) }));
|
||||
|
||||
import React from 'react';
|
||||
import { TemplateGroup } from './TemplateGroup';
|
||||
import { render } from '@testing-library/react';
|
||||
import { TemplateCard } from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateCard } from '../TemplateCard';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
|
||||
describe('TemplateGroup', () => {
|
||||
+1
-4
@@ -22,11 +22,8 @@ import {
|
||||
Link,
|
||||
} from '@backstage/core-components';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import {
|
||||
TemplateCard,
|
||||
TemplateCardProps,
|
||||
} from '@backstage/plugin-scaffolder-react';
|
||||
import { stringifyEntityRef } from '@backstage/catalog-model';
|
||||
import { TemplateCardProps, TemplateCard } from '../TemplateCard';
|
||||
|
||||
export interface TemplateGroupProps {
|
||||
templates: TemplateEntityV1beta3[];
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { TemplateGroup } from './TemplateGroup';
|
||||
@@ -16,3 +16,4 @@
|
||||
export * from './Stepper';
|
||||
export * from './TemplateCard';
|
||||
export * from './ReviewState';
|
||||
export * from './TemplateGroup';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@testing-library/jest-dom';
|
||||
@@ -18,7 +18,7 @@ jest.mock('@backstage/plugin-catalog-react', () => ({
|
||||
useEntityList: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('./TemplateGroup', () => ({
|
||||
jest.mock('@backstage/plugin-scaffolder-react', () => ({
|
||||
TemplateGroup: jest.fn(() => null),
|
||||
}));
|
||||
|
||||
@@ -28,7 +28,7 @@ import { useEntityList } from '@backstage/plugin-catalog-react';
|
||||
import { TemplateGroups } from './TemplateGroups';
|
||||
import { TestApiProvider } from '@backstage/test-utils';
|
||||
import { errorApiRef } from '@backstage/core-plugin-api';
|
||||
import { TemplateGroup } from './TemplateGroup';
|
||||
import { TemplateGroup } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
describe('TemplateGroups', () => {
|
||||
it('should return progress if the hook is loading', async () => {
|
||||
|
||||
@@ -14,13 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { TemplateGroup } from './TemplateGroup';
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { useEntityList } from '@backstage/plugin-catalog-react';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { Progress, Link } from '@backstage/core-components';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { errorApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
import { TemplateGroup } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
|
||||
@@ -34,19 +34,17 @@ import {
|
||||
import { scaffolderApiRef } from '../../api';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import {
|
||||
Stepper,
|
||||
NextFieldExtensionOptions,
|
||||
} from '@backstage/plugin-scaffolder-react';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import {
|
||||
nextRouteRef,
|
||||
scaffolderTaskRouteRef,
|
||||
selectedTemplateRouteRef,
|
||||
Stepper,
|
||||
NextFieldExtensionOptions,
|
||||
type FormProps,
|
||||
} from '@backstage/plugin-scaffolder-react';
|
||||
import { SecretsContext } from '../../components/secrets/SecretsContext';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import type { FormProps } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
export type TemplateWizardPageProps = {
|
||||
customFieldExtensions: NextFieldExtensionOptions<any, any>[];
|
||||
|
||||
Reference in New Issue
Block a user