Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Pin default branch to top of branch selector items #3476

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6360d0c
feat: Create metrics section for tests analytics page (#3171)
RulaKhaled Sep 10, 2024
b95af5a
Merge branch 'main' into tests-analytics-v2
RulaKhaled Sep 10, 2024
f87e980
feat: Creating new tests analytics columns / fix styles (#3177)
RulaKhaled Sep 18, 2024
ec95735
Merge branch 'main' into tests-analytics-v2
ajay-sentry Sep 18, 2024
aa8fa23
Feat: Add dummy selectors to FailedTestsPage (#3188)
ajay-sentry Sep 19, 2024
555e411
fix: Add tooltip and correct styling to flake rate column header (#3221)
ajay-sentry Sep 20, 2024
d788b78
ref: refactor page components into separate sections (#3231)
ajay-sentry Sep 24, 2024
e7c5215
Merge branch 'main' into tests-analytics-v2
ajay-sentry Sep 25, 2024
b3e3099
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 7, 2024
1a5e4ff
rebase and fix failing tests
ajay-sentry Oct 7, 2024
030012b
feat: Update FailedTests Table to use FlakeRate (#3364)
ajay-sentry Oct 8, 2024
950ded2
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 8, 2024
688cfdb
feat: Add new hook to fetch test results aggregates (#3368)
ajay-sentry Oct 9, 2024
3f23c1c
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 9, 2024
a6592b2
chore: Handle merge conflicts with graphql restructure (#3378)
suejung-sentry Oct 9, 2024
f9214bb
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 10, 2024
4a58220
feat: Link hook to metrics section, make percent badge dynamic (#3379)
ajay-sentry Oct 11, 2024
6817eb9
feat: Glue in pass/fail/skip params into tooltip via test results que…
ajay-sentry Oct 11, 2024
4419a37
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 12, 2024
1053b2e
feat: New flake aggregates hook (#3389)
RulaKhaled Oct 14, 2024
834f513
feat: Plan specific details, flake rate related stuff (#3394)
RulaKhaled Oct 15, 2024
648b250
Merge branch 'tests-analytics-v2' of https://github.com/codecov/gazeb…
ajay-sentry Oct 15, 2024
7a3df9d
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 15, 2024
5f6dcfe
feat: Add filter param onchange logic and link to test results query …
ajay-sentry Oct 15, 2024
c874493
fix: Format date for durations in TA (#3397)
RulaKhaled Oct 17, 2024
a6395f2
feat: Test Analytics Metrics buttons and small query linkages (#3400)
ajay-sentry Oct 17, 2024
2d1a191
merge conflicts
ajay-sentry Oct 17, 2024
cfa0c2b
feat: Minor Polish for Failed Tests Table (#3412)
ajay-sentry Oct 18, 2024
3109bd1
feat: Adding table header to TA (#3409)
RulaKhaled Oct 21, 2024
c839a51
fix: Type fix for Total Count (#3417)
ajay-sentry Oct 21, 2024
88f3df6
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 21, 2024
b89327e
Merge branch 'tests-analytics-v2' of https://github.com/codecov/gazeb…
ajay-sentry Oct 21, 2024
4e17b08
feat: Add new Hooks for fetching testSuites and flags on Failed Tests…
ajay-sentry Oct 21, 2024
4e14049
feat: Link Flags/Test Suites hooks to Failed Tests Table Selectors (#…
ajay-sentry Oct 22, 2024
590d5be
feat: Update with table tests header (#3421)
RulaKhaled Oct 22, 2024
f8fbf0f
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 24, 2024
0ccd8b0
fix: Pass in interval to aggregate functions, dynamic copy updates fo…
ajay-sentry Oct 24, 2024
ae18238
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 31, 2024
6e78693
feat: Remove Reset button when not on default branch + double click s…
ajay-sentry Oct 31, 2024
35ab998
Merge branch 'main' into tests-analytics-v2
ajay-sentry Oct 31, 2024
c5a9d52
Merge branch 'main' into tests-analytics-v2
ajay-sentry Nov 7, 2024
5a0cf15
feat: Change tab copy from Beta to new (#3471)
ajay-sentry Nov 7, 2024
1f648aa
fix: Responsiveness tweaks for TA Selector section (#3472)
ajay-sentry Nov 8, 2024
4281615
Merge branch 'main' into tests-analytics-v2
ajay-sentry Nov 8, 2024
f5852f8
pin default to top
ajay-sentry Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const availablePlans = [
const mockPlanDataResponse = {
baseUnitPrice: 10,
benefits: [],
billingRate: 'monthly',
billingRate: 'annual',
marketingName: 'Sentry',
monthlyUploadLimit: 250,
value: 'test-plan',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render, screen } from '@testing-library/react'
import { graphql, HttpResponse } from 'msw'
import { setupServer } from 'msw/node'
import { PropsWithChildren, Suspense } from 'react'
import { MemoryRouter, Route } from 'react-router-dom'

import FailedTestsPage from './FailedTestsPage'

vi.mock('./SelectorSection/SelectorSection', () => ({
default: () => 'Selector Section',
}))
vi.mock('./MetricsSection/MetricsSection', () => ({
default: () => 'Metrics Section',
}))
vi.mock('./FailedTestsTable/FailedTestsTable', () => ({
default: () => 'Failed Tests Table',
}))

const server = setupServer()
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
suspense: false,
},
},
})

const wrapper: (initialEntries?: string) => React.FC<PropsWithChildren> =
(initialEntries = '/gh/codecov/cool-repo/tests') =>
({ children }) => (
<QueryClientProvider client={queryClient}>
<MemoryRouter initialEntries={[initialEntries]}>
<Route
path={[
'/:provider/:owner/:repo/tests',
'/:provider/:owner/:repo/tests/new',
'/:provider/:owner/:repo/tests/new/codecov-cli',
'/:provider/:owner/:repo/tests/:branch',
]}
exact
>
<Suspense fallback={null}>{children}</Suspense>
</Route>
</MemoryRouter>
</QueryClientProvider>
)

beforeAll(() => {
server.listen()
})

afterEach(() => {
queryClient.clear()
server.resetHandlers()
})

afterAll(() => {
server.close()
})

describe('FailedTestsPage', () => {
function setup() {
server.use(
graphql.query('GetRepoOverview', (info) => {
return HttpResponse.json({})
})
)
}

it('renders sub-components', () => {
setup()
render(<FailedTestsPage />, { wrapper: wrapper() })

const selectorSection = screen.getByText(/Selector Section/)
const metricSection = screen.getByText(/Metrics Section/)
const table = screen.getByText(/Failed Tests Table/)

expect(selectorSection).toBeInTheDocument()
expect(metricSection).toBeInTheDocument()
expect(table).toBeInTheDocument()
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import FailedTestsTable from './FailedTestsTable'
import { MetricsSection } from './MetricsSection'
import { SelectorSection } from './SelectorSection'

function FailedTestsPage() {
return (
<div className="flex flex-1 flex-col gap-2">
<SelectorSection />
<MetricsSection />
<FailedTestsTable />
</div>
)
}

export default FailedTestsPage
Loading
Loading