Skip to content

Commit

Permalink
chore: Remove virtual diff feature flag from pulls indirect tab file …
Browse files Browse the repository at this point in the history
…diff (#3454)
  • Loading branch information
nicholas-codecov authored Oct 30, 2024
1 parent 3303c04 commit 60b7286
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 261 deletions.
3 changes: 3 additions & 0 deletions src/pages/PullRequestPage/PullCoverage/PullCoverage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ const mockPullData = (resultType) => {
bundleAnalysisEnabled: true,
pull: {
pullId: 1,
commits: {
totalCount: 11,
},
head: {
commitid: '123',
bundleAnalysis: {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { UploadTypeEnum } from 'shared/utils/commit'

import IndirectChangedFiles from './IndirectChangedFiles'

vi.mock('../FileDiff', () => ({ default: () => 'FileDiff Component' }))
vi.mock('../PullFileDiff', () => ({ default: () => 'FileDiff Component' }))

const mockImpactedFiles = [
{
Expand Down Expand Up @@ -222,6 +222,15 @@ describe('IndirectChangedFiles', () => {
),
graphql.query('GetRepoOverview', (info) => {
return HttpResponse.json({ data: mockOverview })
}),
graphql.query('PullComponentsSelector', (info) => {
return HttpResponse.json({ data: { owner: null } })
}),
graphql.query('BackfillFlagMemberships', (info) => {
return HttpResponse.json({ data: { owner: null } })
}),
graphql.query('OwnerTier', (info) => {
return HttpResponse.json({ data: { owner: null } })
})
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import TotalsNumber from 'ui/TotalsNumber'
import { useIndirectChangedFilesTable } from './hooks'
import NameColumn from './NameColumn/NameColumn'

import FileDiff from '../FileDiff'
import PullFileDiff from '../PullFileDiff'

interface ImpactedFile {
missesCount: number | undefined
Expand Down Expand Up @@ -117,7 +117,7 @@ function RenderSubComponent({ row }: { row: Row<ImpactedFile> }) {
const nameColumn = row.original?.headName
return (
<Suspense fallback={<Loader />}>
<FileDiff path={nameColumn} />
<PullFileDiff path={nameColumn} />
</Suspense>
)
}
Expand Down
Loading

0 comments on commit 60b7286

Please sign in to comment.