From ef3adaf8d635b5ef50e094bf841de83cc40baeb0 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 Oct 2021 13:16:29 +0200 Subject: [PATCH] catalog-import: switch tests back to sync to be sure it works Signed-off-by: Patrik Oldsberg --- .../PreviewCatalogInfoComponent.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx index ea3ea3e96f..fe5e76c968 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx @@ -45,7 +45,7 @@ const entities: Entity[] = [ ]; describe('', () => { - it('renders without exploding', async () => { + it('renders without exploding', () => { render( ', () => { const repositoryUrl = screen.getByText( 'http://my-repository/a/catalog-info.yaml', ); - const kindText = await screen.findByText('Kind_2'); + const kindText = screen.getByText(/Kind_2/); expect(repositoryUrl).toBeInTheDocument(); expect(repositoryUrl).toBeVisible(); expect(kindText).toBeInTheDocument(); expect(kindText).toBeVisible(); }); - it('renders card with custom styles', async () => { + it('renders card with custom styles', () => { const { result } = renderHook(() => useStyles()); render( @@ -77,14 +77,14 @@ describe('', () => { const repositoryUrl = screen.getByText( 'http://my-repository/a/catalog-info.yaml', ); - const kindText = await screen.findByText('Kind_2'); + const kindText = screen.getByText(/Kind_2/); expect(repositoryUrl).toBeInTheDocument(); expect(repositoryUrl).not.toBeVisible(); expect(kindText).toBeInTheDocument(); expect(kindText).not.toBeVisible(); }); - it('renders with custom styles', async () => { + it('renders with custom styles', () => { const { result } = renderHook(() => useStyles()); render( @@ -98,7 +98,7 @@ describe('', () => { const repositoryUrl = screen.getByText( 'http://my-repository/a/catalog-info.yaml', ); - const kindText = await screen.findByText('Kind_2'); + const kindText = screen.getByText(/Kind_2/); expect(repositoryUrl).toBeInTheDocument(); expect(repositoryUrl).toBeVisible(); expect(kindText).toBeInTheDocument();