Skip to content

Commit ee59599

Browse files
committed
fix: server-side API probe, component tests, CI lint gate, docs parity
1 parent 12967b5 commit ee59599

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { render, screen, within } from '@testing-library/react';
2+
import { describe, expect, it } from 'vitest';
3+
import { BoardPreview } from './BoardPreview';
4+
5+
describe('BoardPreview', () => {
6+
it('renders the three planned columns', () => {
7+
render(<BoardPreview />);
8+
for (const title of ['Backlog', 'In progress', 'Shipped']) {
9+
expect(
10+
screen.getByRole('heading', { level: 3, name: title }),
11+
).toBeInTheDocument();
12+
}
13+
});
14+
15+
it('pairs each column with its own status pill', () => {
16+
render(<BoardPreview />);
17+
const badges = screen.getAllByTestId('status-badge');
18+
expect(badges.map((badge) => badge.textContent)).toEqual([
19+
'To do',
20+
'In progress',
21+
'Done',
22+
]);
23+
});
24+
25+
it('shows the tasks under the column they belong to', () => {
26+
render(<BoardPreview />);
27+
const shipped = screen
28+
.getByRole('heading', { name: 'Shipped' })
29+
.closest('section') as HTMLElement;
30+
const tasks = within(shipped).getAllByRole('listitem');
31+
expect(tasks.map((task) => task.textContent)).toEqual([
32+
'Health and readiness endpoints',
33+
'CI, Docker builds, smoke checks',
34+
]);
35+
});
36+
});

0 commit comments

Comments
 (0)