Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov committed May 8, 2024
1 parent f242d4b commit afca865
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/pages/RepoPage/CoverageOnboarding/NewRepoTab.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ describe('NewRepoTab', () => {
})
render(<NewRepoTab />, { wrapper: wrapper() })

await waitFor(() => queryClient.isFetching)
await waitFor(() => !queryClient.isFetching)
// Wait for full render
expect(await screen.findByText(/GitHubActions/)).toBeInTheDocument()

const banner = screen.queryByText(/ActivationBanner/)
expect(banner).not.toBeInTheDocument()
Expand All @@ -366,12 +366,13 @@ describe('NewRepoTab', () => {
})
render(<NewRepoTab />, { wrapper: wrapper() })

await waitFor(() => queryClient.isFetching)
await waitFor(() => !queryClient.isFetching)
// Wait for full render
expect(await screen.findByText(/GitHubActions/)).toBeInTheDocument()

const banner = screen.queryByText(/ActivationBanner/)
expect(banner).not.toBeInTheDocument()
})
})

describe('when user is not activated and is private repo', () => {
it('renders ActivationBanner', async () => {
Expand All @@ -381,13 +382,9 @@ describe('NewRepoTab', () => {
})
render(<NewRepoTab />, { wrapper: wrapper() })

await waitFor(() => queryClient.isFetching)
await waitFor(() => !queryClient.isFetching)

const banner = screen.queryByText(/ActivationBanner/)
const banner = await screen.findByText(/ActivationBanner/)
expect(banner).toBeInTheDocument()
})
})
})
})
})

0 comments on commit afca865

Please sign in to comment.