use new mockApis

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-05 13:41:07 +01:00
parent d2ac2ec49d
commit 36fb574fff
15 changed files with 83 additions and 70 deletions
+1
View File
@@ -108,6 +108,7 @@
"@backstage/cli": "workspace:^",
"@backstage/core-app-api": "workspace:^",
"@backstage/dev-utils": "workspace:^",
"@backstage/frontend-test-utils": "workspace:^",
"@backstage/plugin-catalog": "workspace:^",
"@backstage/plugin-permission-common": "workspace:^",
"@backstage/plugin-techdocs": "workspace:^",
@@ -23,9 +23,10 @@ import {
EntityKindFilter,
} from '@backstage/plugin-catalog-react';
import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils';
import { AlertApi, alertApiRef } from '@backstage/core-plugin-api';
import { alertApiRef } from '@backstage/core-plugin-api';
import { ApiProvider } from '@backstage/core-app-api';
import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils';
import { mockApis } from '@backstage/frontend-test-utils';
import { GetEntityFacetsResponse } from '@backstage/catalog-client';
const entities: Entity[] = [
@@ -75,12 +76,7 @@ const apis = TestApiRegistry.from(
} as GetEntityFacetsResponse),
},
],
[
alertApiRef,
{
post: jest.fn(),
} as unknown as AlertApi,
],
[alertApiRef, mockApis.alert()],
);
describe('<TemplateTypePicker/>', () => {