Skip to content

Commit

Permalink
Revert "fix: Only show GH config banner when no welcome banner (#3680)"
Browse files Browse the repository at this point in the history
This reverts commit dfb4df6.
  • Loading branch information
calvin-codecov committed Jan 24, 2025
1 parent dfb4df6 commit 0cd73f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/shared/ListRepo/ListRepo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ function ListRepo({ canRefetch, hasGhApp }) {

return (
<>
{/* we only want one of these two banners to show at a time */}
{!hasGhApp && !showDemoAlert && <GithubConfigBanner />}
{!hasGhApp && <GithubConfigBanner />}
<OrgControlTable
searchValue={params.search}
repoDisplay={repoDisplay}
Expand Down
18 changes: 3 additions & 15 deletions src/shared/ListRepo/ListRepo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ describe('ListRepo', () => {
})

describe('user does not have gh app installed', () => {
it('displays github app config banner if showDemoAlert is false', async () => {
it('displays github app config banner', async () => {
setup({})
render(<ListRepo canRefetch hasGhApp={false} />, {
wrapper: wrapper({
Expand All @@ -312,21 +312,9 @@ describe('ListRepo', () => {
}),
})

const banner = await screen.findByText("Codecov's GitHub app")
return expect(banner).toBeInTheDocument()
})
it('does not display github app config banner if showDemoAlert is true', async () => {
setup({})
render(<ListRepo canRefetch hasGhApp={false} />, {
wrapper: wrapper({
url: '/gh/janedoe?source=onboarding',
path: '/:provider/:owner',
}),
})

await waitFor(() => {
const banner = screen.queryByText("Codecov's GitHub app")
expect(banner).not.toBeInTheDocument()
const banner = screen.getByText("Codecov's GitHub app")
return expect(banner).toBeInTheDocument()
})
})
})
Expand Down

0 comments on commit 0cd73f1

Please sign in to comment.