Add tests for subtask handling
This commit is contained in:
parent
c90be27b4a
commit
1848abd113
1 changed files with 7 additions and 9 deletions
|
|
@ -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.
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue