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
@@ -21,8 +21,8 @@ import React from 'react';
import { DefaultExplorePage } from './DefaultExplorePage';
describe('<DefaultExplorePage />', () => {
const catalogApi: jest.Mocked<typeof catalogApiRef.T> = {
addLocation: jest.fn(_a => new Promise(() => {})),
const catalogApi = {
addLocation: jest.fn(),
getEntities: jest.fn(),
getLocationByRef: jest.fn(),
getLocationById: jest.fn(),
@@ -22,8 +22,8 @@ import React from 'react';
import { DomainExplorerContent } from './DomainExplorerContent';
describe('<DomainExplorerContent />', () => {
const catalogApi: jest.Mocked<typeof catalogApiRef.T> = {
addLocation: jest.fn(_a => new Promise(() => {})),
const catalogApi = {
addLocation: jest.fn(),
getEntities: jest.fn(),
getLocationByRef: jest.fn(),
getLocationById: jest.fn(),
@@ -22,8 +22,8 @@ import React from 'react';
import { GroupsExplorerContent } from '../GroupsExplorerContent';
describe('<GroupsExplorerContent />', () => {
const catalogApi: jest.Mocked<typeof catalogApiRef.T> = {
addLocation: jest.fn(_a => new Promise(() => {})),
const catalogApi = {
addLocation: jest.fn(),
getEntities: jest.fn(),
getLocationByRef: jest.fn(),
getLocationById: jest.fn(),