Still broken tests

Signed-off-by: Adam Harvey <adam.harvey@dxc.com>
This commit is contained in:
Adam Harvey
2021-03-22 21:49:31 -04:00
parent 77b6161b4d
commit 7d922eb296
@@ -15,16 +15,9 @@
*/
import { ApiProvider, ApiRegistry } from '@backstage/core';
import {
catalogApiRef,
CatalogApi,
getEntityRelations,
EntityProvider,
} from '@backstage/plugin-catalog-react';
import { Entity, EntityName, RELATION_PART_OF } from '@backstage/catalog-model';
import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog-react';
import { Entity, RELATION_PART_OF } from '@backstage/catalog-model';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
import React from 'react';
import { SystemDiagram } from './SystemDiagram';
@@ -33,21 +26,23 @@ describe('<SystemDiagram />', () => {
getEntities: () =>
Promise.resolve({
items: [
// {
// apiVersion: 'backstage.io/v1alpha1',
// kind: 'System',
// metadata: {
// name: 'my-system',
// },
// spec: {
// owner: 'tools@example.com',
// },
// },
{
apiVersion: 'backstage.io/v1alpha1',
kind: 'System',
metadata: {
name: 'my-system',
namespace: 'my-namespace',
},
spec: {
owner: 'tools@example.com',
},
},
{
apiVersion: 'backstage.io/v1alpha1',
kind: 'Component',
metadata: {
name: 'Entity2',
namespace: 'my-namespace',
},
spec: {
owner: 'not-tools@example.com',
@@ -57,6 +52,11 @@ describe('<SystemDiagram />', () => {
},
] as Entity[],
}),
// need to mock this?
// getEntityRelations: (Entity, string) =>
// Promise.resolve({
// }),
};
afterEach(() => jest.resetAllMocks());
@@ -67,7 +67,6 @@ describe('<SystemDiagram />', () => {
kind: 'System',
metadata: {
name: 'my-system',
// namespace: 'my-namespace',
},
relations: [],
};
@@ -79,7 +78,7 @@ describe('<SystemDiagram />', () => {
);
expect(getByText('System Diagram')).toBeInTheDocument();
expect(getByText('my-system')).not.toBeInTheDocument();
// expect(getByText('my-system')).not.toBeInTheDocument();
});
it('shows related systems', async () => {