plugins: migrate usage of deprecated IdentityApi methods

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-01-04 23:08:05 +01:00
parent 2916a83b9c
commit 51fbedc445
38 changed files with 221 additions and 195 deletions
@@ -20,24 +20,15 @@ import { TestApiRegistry, wrapInTestApp } from '@backstage/test-utils';
import { splunkOnCallApiRef } from '../../api';
import { MOCK_TEAM, MOCK_INCIDENT } from '../../api/mocks';
import {
alertApiRef,
IdentityApi,
identityApiRef,
} from '@backstage/core-plugin-api';
import { alertApiRef } from '@backstage/core-plugin-api';
import { ApiProvider } from '@backstage/core-app-api';
const mockIdentityApi: Partial<IdentityApi> = {
getUserId: () => 'test',
};
const mockSplunkOnCallApi = {
getIncidents: jest.fn(),
getTeams: jest.fn(),
};
const apis = TestApiRegistry.from(
[alertApiRef, {}],
[identityApiRef, mockIdentityApi],
[splunkOnCallApiRef, mockSplunkOnCallApi],
);