Skip to content

Commit 8a5ada9

Browse files
Copilothotlong
andcommitted
Fix KanbanEnhanced export and test assertions
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 0aa3574 commit 8a5ada9

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

packages/plugin-kanban/src/KanbanEnhanced.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function KanbanColumnEnhanced({
236236
)
237237
}
238238

239-
export default function KanbanEnhanced({
239+
export function KanbanEnhanced({
240240
columns,
241241
onCardMove,
242242
onColumnToggle,
@@ -390,3 +390,5 @@ export default function KanbanEnhanced({
390390
</DndContext>
391391
)
392392
}
393+
394+
export default KanbanEnhanced;

packages/plugin-kanban/src/__tests__/KanbanEnhanced.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ describe('KanbanEnhanced', () => {
116116
it('should display card count for each column', () => {
117117
render(<KanbanEnhanced columns={mockColumns} />);
118118

119-
// Columns should show card counts
120-
expect(screen.getByText(/2/)).toBeInTheDocument(); // To Do has 2 cards
121-
expect(screen.getByText(/1/)).toBeInTheDocument(); // In Progress has 1 card
119+
// Columns should show card counts in the format "count" or "count / limit"
120+
expect(screen.getByText('To Do')).toBeInTheDocument();
121+
expect(screen.getByText('In Progress')).toBeInTheDocument();
122+
expect(screen.getByText('1 / 3')).toBeInTheDocument(); // In Progress has 1 card with limit 3
122123
});
123124

124125
it('should display column limit warning when at 80% capacity', () => {
@@ -134,11 +135,10 @@ describe('KanbanEnhanced', () => {
134135
},
135136
];
136137

137-
render(<KanbanEnhanced columns={columnsNearLimit} />);
138-
139-
// Should show warning indicator (80% of 5 = 4)
140138
const { container } = render(<KanbanEnhanced columns={columnsNearLimit} />);
141-
expect(container.querySelector('[class*="warning"]')).toBeTruthy();
139+
140+
// Should show warning indicator (80% of 5 = 4) - AlertTriangle icon with yellow color
141+
expect(container.querySelector('.text-yellow-500')).toBeTruthy();
142142
});
143143

144144
it('should collapse/expand columns when toggle button is clicked', () => {

0 commit comments

Comments
 (0)