diff --git a/packages/frontend-test-utils/package.json b/packages/frontend-test-utils/package.json index 33b1f41a8c..7f157cdc4f 100644 --- a/packages/frontend-test-utils/package.json +++ b/packages/frontend-test-utils/package.json @@ -31,7 +31,6 @@ "dist" ], "dependencies": { - "@backstage/core-components": "workspace:^", "@backstage/frontend-app-api": "workspace:^", "@backstage/frontend-plugin-api": "workspace:^", "@backstage/test-utils": "workspace:^", diff --git a/packages/frontend-test-utils/src/app/createExtensionTester.test.tsx b/packages/frontend-test-utils/src/app/createExtensionTester.test.tsx index de52ca52de..04da2b7e89 100644 --- a/packages/frontend-test-utils/src/app/createExtensionTester.test.tsx +++ b/packages/frontend-test-utils/src/app/createExtensionTester.test.tsx @@ -15,6 +15,7 @@ */ import React, { useCallback } from 'react'; +import { Link } from 'react-router-dom'; import { fireEvent, screen, waitFor } from '@testing-library/react'; import { analyticsApiRef, @@ -27,7 +28,6 @@ import { useAnalytics, useApi, } from '@backstage/frontend-plugin-api'; -import { Link } from '@backstage/core-components'; import { MockAnalyticsApi } from '../apis'; import { createExtensionTester } from './createExtensionTester'; @@ -175,7 +175,7 @@ describe('createExtensionTester', () => { ).resolves.toBeInTheDocument(); }); - it('should capture click events in anylitics', async () => { + it('should capture click events in analytics', async () => { // Mocking the analytics api implementation const analyticsApiMock = new MockAnalyticsApi(); diff --git a/packages/frontend-test-utils/src/app/createExtensionTester.tsx b/packages/frontend-test-utils/src/app/createExtensionTester.tsx index 0404cf1ade..fdac4746d5 100644 --- a/packages/frontend-test-utils/src/app/createExtensionTester.tsx +++ b/packages/frontend-test-utils/src/app/createExtensionTester.tsx @@ -15,8 +15,7 @@ */ import React, { ComponentType, ReactNode, useContext, useState } from 'react'; -import { MemoryRouter } from 'react-router-dom'; -import { Link } from '@backstage/core-components'; +import { MemoryRouter, Link } from 'react-router-dom'; import { RenderResult, render } from '@testing-library/react'; import { createSpecializedApp } from '@backstage/frontend-app-api'; import { @@ -40,7 +39,7 @@ import { resolveExtensionDefinition } from '../../../frontend-plugin-api/src/wir // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { createSignInPageExtension } from '../../../frontend-plugin-api/src/extensions/createSignInPageExtension'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports -import { InternalExtensionDefinition } from '../../../frontend-plugin-api/src/wiring/createExtension'; +import { toInternalExtensionDefinition } from '../../../frontend-plugin-api/src/wiring/createExtension'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { InternalAppContext } from '../../../frontend-app-api/src/wiring/InternalAppContext'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports @@ -195,8 +194,7 @@ export class ExtensionTester { options?: { config?: TConfig }, ): ExtensionTester { const tester = new ExtensionTester(); - const { output, factory, ...rest } = - subject as InternalExtensionDefinition; + const { output, factory, ...rest } = toInternalExtensionDefinition(subject); // attaching to core/routes to render as index route const extension = createExtension({ ...rest, diff --git a/yarn.lock b/yarn.lock index 910432180d..aef0f13137 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4227,7 +4227,6 @@ __metadata: resolution: "@backstage/frontend-test-utils@workspace:packages/frontend-test-utils" dependencies: "@backstage/cli": "workspace:^" - "@backstage/core-components": "workspace:^" "@backstage/frontend-app-api": "workspace:^" "@backstage/frontend-plugin-api": "workspace:^" "@backstage/test-utils": "workspace:^"