Skip to content

Commit d7d2546

Browse files
committed
run pnpm run test:unit
1 parent 87036e9 commit d7d2546

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

frontend/__tests__/unit/components/CardDetailsPage.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,8 @@ describe('CardDetailsPage', () => {
891891
expect(mainContainer).toHaveClass(
892892
'min-h-screen',
893893
'bg-white',
894-
'p-8',
894+
'px-4',
895+
'py-6',
895896
'text-gray-600',
896897
'dark:bg-[#212529]',
897898
'dark:text-gray-300'
@@ -902,7 +903,7 @@ describe('CardDetailsPage', () => {
902903
render(<CardDetailsPage {...defaultProps} />)
903904

904905
const title = screen.getByRole('heading', { level: 1 })
905-
expect(title).toHaveClass('text-4xl', 'font-bold')
906+
expect(title).toHaveClass('text-2xl', 'font-bold', 'sm:text-3xl', 'md:text-4xl')
906907
})
907908

908909
it('applies correct CSS classes to description', () => {

frontend/__tests__/unit/components/ContributionHeatmap.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ describe('ContributionHeatmap', () => {
138138

139139
await waitFor(() => {
140140
const chart = screen.getByTestId('contribution-heatmap-chart')
141-
expect(chart).toHaveAttribute('data-height', '200')
142-
expect(chart).toHaveAttribute('data-width', '1200px')
141+
expect(chart).toHaveAttribute('data-height', '220')
142+
expect(chart).toHaveAttribute('data-width', '100%')
143143
})
144144
})
145145

@@ -148,7 +148,7 @@ describe('ContributionHeatmap', () => {
148148

149149
await waitFor(() => {
150150
const chart = screen.getByTestId('contribution-heatmap-chart')
151-
expect(chart).toHaveAttribute('data-height', '100%')
151+
expect(chart).toHaveAttribute('data-height', '180')
152152
expect(chart).toHaveAttribute('data-width', '100%')
153153
})
154154
})
@@ -158,8 +158,8 @@ describe('ContributionHeatmap', () => {
158158

159159
await waitFor(() => {
160160
const chart = screen.getByTestId('contribution-heatmap-chart')
161-
expect(chart).toHaveAttribute('data-height', '200')
162-
expect(chart).toHaveAttribute('data-width', '1200px')
161+
expect(chart).toHaveAttribute('data-height', '220')
162+
expect(chart).toHaveAttribute('data-width', '100%')
163163
})
164164
})
165165
})
@@ -556,7 +556,7 @@ describe('ContributionHeatmap', () => {
556556

557557
const container = screen.getByTestId('contribution-heatmap-chart').parentElement
558558
?.parentElement
559-
expect(container).toHaveClass('max-w-5xl')
559+
expect(container).toHaveClass('w-full', 'overflow-x-auto')
560560
})
561561
})
562562

@@ -567,7 +567,7 @@ describe('ContributionHeatmap', () => {
567567
await waitFor(() => {
568568
const chart = screen.getByTestId('contribution-heatmap-chart')
569569
const container = chart.parentElement
570-
expect(container).toHaveClass('heatmap-container-default')
570+
expect(container).toHaveClass('inline-block', 'min-w-[640px]', 'md:min-w-full')
571571
})
572572
})
573573

@@ -577,7 +577,7 @@ describe('ContributionHeatmap', () => {
577577
await waitFor(() => {
578578
const chart = screen.getByTestId('contribution-heatmap-chart')
579579
const container = chart.parentElement
580-
expect(container).toHaveClass('heatmap-container-compact')
580+
expect(container).toHaveClass('inline-block', 'min-w-full')
581581
})
582582
})
583583
})

0 commit comments

Comments
 (0)