update tests to be more robust against catalog-client changes

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-14 16:50:17 +01:00
parent 68360a5fc6
commit 9bafcfc209
13 changed files with 269 additions and 224 deletions
@@ -15,21 +15,16 @@
*/
import { Entity } from '@backstage/catalog-model';
import {
CatalogApi,
catalogApiRef,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react';
import { renderInTestApp, TestApiProvider } from '@backstage/test-utils';
import React from 'react';
import { FossaApi, fossaApiRef } from '../../api';
import { FossaPage } from './FossaPage';
describe('<FossaPage />', () => {
const catalogApi: jest.Mocked<CatalogApi> = {
const catalogApi = {
addLocation: jest.fn(),
getEntities: jest.fn(),
getEntityByRef: jest.fn(),
getLocationByRef: jest.fn(),
getLocationById: jest.fn(),
removeEntityByUid: jest.fn(),