changesets

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-04-29 11:22:56 +02:00
parent d47ae8f6f7
commit bdbe620797
2 changed files with 26 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-react': patch
---
Removed all usages of `SearchContextProviderForStorybook` as it has been deprecated.
+21
View File
@@ -0,0 +1,21 @@
---
'@backstage/plugin-search-react': minor
---
`SearchContextProviderForStorybook` and `SearchApiProviderForStorybook` has been deleted. New mock implementation of the `SearchApi` introduced. If you need to mock the api we recommend you to do the following:
```tsx
import {
searchApiRef,
MockSearchApi,
SearchContextProvider,
} from '@backstage/plugin-search-react';
import { ApiProvider } from '@backstage/core-app-api';
import { TestApiRegistry } from '@backstage/test-utils';
<ApiProvider apis={TestApiRegistry.from([searchApiRef, new MockSearchApi()])}>
<SearchContextProvider>
<Component />
</SearchContextProvider>
</ApiProvider>;
```