Add tests for subtask handling

This commit is contained in:
Chris Veleris 2025-11-17 13:11:28 +02:00
parent c90be27b4a
commit 1848abd113

View file

@ -325,15 +325,13 @@ describe('Subtask Ordering', () => {
// Add subtasks in multiple concurrent requests
const promises = [
agent
.patch(`/api/task/${createResponse.body.id}`)
.send({
name: 'Parent Task',
subtasks: [
{ name: 'Batch 1 - Task 1', isNew: true },
{ name: 'Batch 1 - Task 2', isNew: true },
],
}),
agent.patch(`/api/task/${createResponse.body.id}`).send({
name: 'Parent Task',
subtasks: [
{ name: 'Batch 1 - Task 1', isNew: true },
{ name: 'Batch 1 - Task 2', isNew: true },
],
}),
// Note: This test demonstrates the limitation - concurrent updates
// may result in inconsistent state. In practice, the UI prevents this.
];