Skip to content

Commit

Permalink
Merge branch 'main' into gh-eng-2830-seperate-org-name-from-error-ban…
Browse files Browse the repository at this point in the history
…ner-on-404-page
  • Loading branch information
nicholas-codecov authored Dec 2, 2024
2 parents 4a29705 + 67b950a commit 76a076e
Show file tree
Hide file tree
Showing 47 changed files with 881 additions and 826 deletions.
Binary file added src/assets/onboarding/env_variable_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions src/pages/PlanPage/subRoutes/CancelPlanPage/useProPlanMonth.js

This file was deleted.

210 changes: 0 additions & 210 deletions src/pages/PlanPage/subRoutes/CancelPlanPage/useProPlanMonth.test.js

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import {
QueryClientProvider as QueryClientProviderV5,
QueryClient as QueryClientV5,
} from '@tanstack/react-queryV5'
import {
render,
screen,
Expand All @@ -11,7 +15,7 @@ import { MemoryRouter, Route } from 'react-router-dom'

import PullBundleAnalysis from './PullBundleAnalysis'

import { TBundleAnalysisComparisonResult } from '../hooks'
import { TBundleAnalysisComparisonResult } from '../queries/PullPageDataQueryOpts'

vi.mock('./EmptyTable', () => ({
default: () => <div>EmptyTable</div>,
Expand Down Expand Up @@ -106,24 +110,30 @@ const mockRepoOverview = ({
const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false, suspense: true } },
})
const queryClientV5 = new QueryClientV5({
defaultOptions: { queries: { retry: false } },
})
const server = setupServer()

const wrapper: React.FC<React.PropsWithChildren> = ({ children }) => (
<QueryClientProvider client={queryClient}>
<MemoryRouter initialEntries={['/gh/test-org/test-repo/pull/12']}>
<Route path="/:provider/:owner/:repo/pull/:pullId">
<Suspense fallback={<p>Loading</p>}>{children}</Suspense>
</Route>
</MemoryRouter>
</QueryClientProvider>
<QueryClientProviderV5 client={queryClientV5}>
<QueryClientProvider client={queryClient}>
<MemoryRouter initialEntries={['/gh/test-org/test-repo/pull/12']}>
<Route path="/:provider/:owner/:repo/pull/:pullId">
<Suspense fallback={<p>Loading</p>}>{children}</Suspense>
</Route>
</MemoryRouter>
</QueryClientProvider>
</QueryClientProviderV5>
)

beforeAll(() => {
server.listen()
})
beforeEach(() => {
server.resetHandlers()
queryClient.clear()
queryClientV5.clear()
server.resetHandlers()
})
afterAll(() => {
server.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useSuspenseQuery as useSuspenseQueryV5 } from '@tanstack/react-queryV5'
import { lazy, Suspense } from 'react'
import { useParams } from 'react-router-dom'

Expand All @@ -9,7 +10,10 @@ import BundleMessage from './BundleMessage'
import EmptyTable from './EmptyTable'
import FirstPullBanner from './FirstPullBanner'

import { TBundleAnalysisComparisonResult, usePullPageData } from '../hooks'
import {
PullPageDataQueryOpts,
TBundleAnalysisComparisonResult,
} from '../queries/PullPageDataQueryOpts'

const PullBundleComparisonTable = lazy(
() => import('./PullBundleComparisonTable')
Expand Down Expand Up @@ -82,13 +86,15 @@ const PullBundleAnalysis: React.FC = () => {
const { provider, owner, repo, pullId } = useParams<URLParams>()

// we can set team plan true here because we don't care about the fields it will skip - tho we should really stop doing this and just return null on the API if they're on a team plan so we can save on requests made
const { data } = usePullPageData({
provider,
owner,
repo,
pullId,
isTeamPlan: true,
})
const { data } = useSuspenseQueryV5(
PullPageDataQueryOpts({
provider,
owner,
repo,
pullId,
isTeamPlan: true,
})
)

const bundleCompareType =
data?.pull?.bundleAnalysisCompareWithBase?.__typename
Expand Down
Loading

0 comments on commit 76a076e

Please sign in to comment.