From cb606c0d12c41858634debfd4881d70c8335d6d8 Mon Sep 17 00:00:00 2001 From: Marco Salazar Date: Fri, 26 Apr 2024 02:40:15 -0400 Subject: [PATCH] update test --- .../ReloadRepositoryLocationButton.test.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/nav/__tests__/ReloadRepositoryLocationButton.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/nav/__tests__/ReloadRepositoryLocationButton.test.tsx index 4092ed61fe438..22fd888e33106 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/nav/__tests__/ReloadRepositoryLocationButton.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/nav/__tests__/ReloadRepositoryLocationButton.test.tsx @@ -1,5 +1,6 @@ import {MockedProvider} from '@apollo/client/testing'; import {render, screen, waitFor} from '@testing-library/react'; +import {Suspense} from 'react'; import {PermissionsProvider, usePermissionsForLocation} from '../../app/Permissions'; import {TrackedSuspense} from '../../app/TrackedSuspense'; @@ -30,12 +31,14 @@ describe('ReloadRepositoryLocationButton', () => { render( - + + + , ); - const button = screen.getByRole('button', {name: /reload/i}); + const button = await waitFor(() => screen.getByRole('button', {name: /reload/i})); await waitFor(() => { expect(screen.queryByText(/loading permissions\? no/i)).not.toBeNull(); @@ -48,12 +51,14 @@ describe('ReloadRepositoryLocationButton', () => { render( - + + + , ); - const button = screen.getByRole('button', {name: /reload/i}); + const button = await waitFor(() => screen.getByRole('button', {name: /reload/i})); await waitFor(() => { expect(screen.queryByText(/loading permissions\? no/i)).not.toBeNull();