From e460cbb02735bb82a9b9878c7577def04d99cf46 Mon Sep 17 00:00:00 2001 From: Rik Claessens Date: Sat, 13 Jul 2024 11:42:38 +0200 Subject: [PATCH] Replace renderWithEffects with renderInTestApp to fix all existing tests Signed-off-by: Rik Claessens --- .../SearchAutocomplete.test.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.test.tsx b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.test.tsx index d9da187541..cc1e6c486c 100644 --- a/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.test.tsx +++ b/plugins/search-react/src/components/SearchAutocomplete/SearchAutocomplete.test.tsx @@ -22,7 +22,7 @@ import LabelIcon from '@material-ui/icons/Label'; import { configApiRef } from '@backstage/core-plugin-api'; import { ConfigReader } from '@backstage/core-app-api'; -import { TestApiProvider, renderWithEffects } from '@backstage/test-utils'; +import { TestApiProvider, renderInTestApp } from '@backstage/test-utils'; import { searchApiRef } from '../../api'; import { SearchAutocomplete } from './SearchAutocomplete'; @@ -44,7 +44,7 @@ describe('SearchAutocomplete', () => { }); it('Renders without exploding', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Show all options by default when focused', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Updates context with the initial value', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Updates context when value is cleared', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Updates context when an option is select', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Shows a circular progress when loading options', async () => { - await renderWithEffects( + await renderInTestApp( { }); it('Uses the default search autocomplete option component', async () => { - await renderWithEffects( + await renderInTestApp(