From d0ce429b1307c429613f30911ac6a2875a54a9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 7 Oct 2024 12:40:28 +0200 Subject: [PATCH] stop using the deprecated provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../components/CatalogKindHeader/CatalogKindHeader.test.tsx | 2 +- .../catalog/src/components/CatalogTable/CatalogTable.test.tsx | 2 +- .../CatalogTable/CursorPaginatedCatalogTable.test.tsx | 3 ++- .../CatalogTable/OffsetPaginatedCatalogTable.test.tsx | 3 ++- .../components/TemplateTypePicker/TemplateTypePicker.test.tsx | 2 +- .../src/home/components/Grids/EntityListDocsGrid.test.tsx | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/catalog/src/components/CatalogKindHeader/CatalogKindHeader.test.tsx b/plugins/catalog/src/components/CatalogKindHeader/CatalogKindHeader.test.tsx index d6a1fb433a..a169e9139a 100644 --- a/plugins/catalog/src/components/CatalogKindHeader/CatalogKindHeader.test.tsx +++ b/plugins/catalog/src/components/CatalogKindHeader/CatalogKindHeader.test.tsx @@ -21,8 +21,8 @@ import { Entity } from '@backstage/catalog-model'; import { catalogApiRef, EntityKindFilter, - MockEntityListContextProvider, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; import { ApiProvider } from '@backstage/core-app-api'; import { MockErrorApi, diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx index fea2580d2f..5b7f28e26a 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx @@ -23,11 +23,11 @@ import { ApiProvider } from '@backstage/core-app-api'; import { EntityKindFilter, entityRouteRef, - MockEntityListContextProvider, MockStarredEntitiesApi, starredEntitiesApiRef, UserListFilter, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; import { act, fireEvent, screen } from '@testing-library/react'; import * as React from 'react'; diff --git a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx index be250fddbf..adc69794ae 100644 --- a/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CursorPaginatedCatalogTable.test.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React, { ReactNode } from 'react'; import { fireEvent, screen, waitFor } from '@testing-library/react'; import { CursorPaginatedCatalogTable } from './CursorPaginatedCatalogTable'; @@ -22,8 +23,8 @@ import { DefaultEntityFilters, EntityKindFilter, EntityListContextProps, - MockEntityListContextProvider, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; describe('CursorPaginatedCatalogTable', () => { const data = new Array(100).fill(0).map((_, index) => { diff --git a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx index 3c8f51a6ad..aad9b7cb3d 100644 --- a/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/OffsetPaginatedCatalogTable.test.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React, { ReactNode } from 'react'; import { fireEvent, screen } from '@testing-library/react'; import { CatalogTableRow } from './types'; @@ -20,8 +21,8 @@ import { renderInTestApp } from '@backstage/test-utils'; import { DefaultEntityFilters, EntityListContextProps, - MockEntityListContextProvider, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; import { OffsetPaginatedCatalogTable } from './OffsetPaginatedCatalogTable'; describe('OffsetPaginatedCatalogTable', () => { diff --git a/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.test.tsx b/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.test.tsx index 4c4b88e471..e7b12f42c0 100644 --- a/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.test.tsx +++ b/plugins/scaffolder/src/components/TemplateTypePicker/TemplateTypePicker.test.tsx @@ -22,8 +22,8 @@ import { TemplateTypePicker } from './TemplateTypePicker'; import { catalogApiRef, EntityKindFilter, - MockEntityListContextProvider, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; import { AlertApi, alertApiRef } from '@backstage/core-plugin-api'; import { ApiProvider } from '@backstage/core-app-api'; import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; diff --git a/plugins/techdocs/src/home/components/Grids/EntityListDocsGrid.test.tsx b/plugins/techdocs/src/home/components/Grids/EntityListDocsGrid.test.tsx index acaf01b318..1e65efb587 100644 --- a/plugins/techdocs/src/home/components/Grids/EntityListDocsGrid.test.tsx +++ b/plugins/techdocs/src/home/components/Grids/EntityListDocsGrid.test.tsx @@ -24,9 +24,9 @@ import { CatalogApi, catalogApiRef, starredEntitiesApiRef, - MockEntityListContextProvider, MockStarredEntitiesApi, } from '@backstage/plugin-catalog-react'; +import { MockEntityListContextProvider } from '@backstage/plugin-catalog-react/testUtils'; import { MockStorageApi, renderInTestApp,