diff --git a/.changeset/silent-candles-remember.md b/.changeset/silent-candles-remember.md index 99061bbc1d..51700c4582 100644 --- a/.changeset/silent-candles-remember.md +++ b/.changeset/silent-candles-remember.md @@ -1,5 +1,5 @@ --- -'@backstage/core-components': patch +'@backstage/core-components': minor --- -The syntax highlighting library used by the `CodeSnippet` component is now lazy loaded. +The syntax highlighting library used by the `CodeSnippet` component is now lazy loaded. This most likely has no effect on existing code, but may break tests as the content of the `CodeSnippet` is now rendered asynchronously. diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx index f0844c265c..2618fab57a 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx @@ -46,7 +46,7 @@ const entities: Entity[] = [ describe('', () => { it('renders without exploding', async () => { - const { getByText } = render( + const { getByText, findByText } = render( ', () => { ); const repositoryUrl = getByText('http://my-repository/a/catalog-info.yaml'); - const kindText = getByText('Kind_2'); + const kindText = await findByText('Kind_2'); expect(repositoryUrl).toBeInTheDocument(); expect(repositoryUrl).toBeVisible(); expect(kindText).toBeInTheDocument();