fix(kanban): include archived tasks in board counts (#619)
This commit is contained in:
@@ -28,12 +28,12 @@ describe('Kanban API', () => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
it('serializes board and list filters into query params', async () => {
|
||||
it('serializes board, list filters, and archived inclusion into query params', async () => {
|
||||
mockRequest.mockResolvedValue({ tasks: [{ id: 'task-1' }] })
|
||||
|
||||
const result = await listTasks({ board: 'default', status: 'blocked', assignee: 'alice', tenant: 'ops' })
|
||||
const result = await listTasks({ board: 'default', status: 'blocked', assignee: 'alice', tenant: 'ops', includeArchived: true })
|
||||
|
||||
expect(mockRequest).toHaveBeenCalledWith('/api/hermes/kanban?board=default&status=blocked&assignee=alice&tenant=ops')
|
||||
expect(mockRequest).toHaveBeenCalledWith('/api/hermes/kanban?board=default&status=blocked&assignee=alice&tenant=ops&includeArchived=true')
|
||||
expect(result).toEqual([{ id: 'task-1' }])
|
||||
})
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('Kanban store', () => {
|
||||
expect(store.loading).toBe(true)
|
||||
await promise
|
||||
|
||||
expect(mockKanbanApi.listTasks).toHaveBeenCalledWith({ board: 'project-a', status: 'blocked', assignee: 'alice' })
|
||||
expect(mockKanbanApi.listTasks).toHaveBeenCalledWith({ board: 'project-a', status: 'blocked', assignee: 'alice', includeArchived: true })
|
||||
expect(store.tasks).toEqual([{ id: 'task-1', status: 'todo' }])
|
||||
expect(store.loading).toBe(false)
|
||||
})
|
||||
@@ -128,7 +128,7 @@ describe('Kanban store', () => {
|
||||
store.setSelectedBoard('project-a')
|
||||
await store.refreshAll()
|
||||
|
||||
expect(mockKanbanApi.listTasks).toHaveBeenCalledWith({ board: 'project-a', status: undefined, assignee: undefined })
|
||||
expect(mockKanbanApi.listTasks).toHaveBeenCalledWith({ board: 'project-a', status: undefined, assignee: undefined, includeArchived: true })
|
||||
expect(mockKanbanApi.getStats).toHaveBeenCalledWith({ board: 'project-a' })
|
||||
expect(mockKanbanApi.getAssignees).toHaveBeenCalledWith({ board: 'project-a' })
|
||||
expect(mockKanbanApi.listBoards).toHaveBeenCalledWith({ includeArchived: false })
|
||||
|
||||
Reference in New Issue
Block a user