feat: collapse subtasks from parent rows
ci / docker (push) Successful in 4m16s

This commit is contained in:
2026-09-08 10:31:31 +08:00
parent 3528e880f6
commit c8abb75cf4
4 changed files with 31 additions and 4 deletions
+8
View File
@@ -82,6 +82,14 @@ describe('task and habit row decoration', () => {
expect(mvpPanel).toContain('shouldToggleRowSwipe')
})
it('collapses and expands subtasks when the parent task is clicked', () => {
expect(app).toContain('const collapsedTaskIds = ref(new Set<string>())')
expect(app).toContain('function toggleTaskChildren(task: Task)')
expect(app).toContain('selectTaskUnlessSwiped(node.task, true)')
expect(app).toContain('v-if="!collapsedTaskIds.has(node.task.id)" v-for="subtask in node.subtasks"')
expect(app).toContain(':aria-expanded="!collapsedTaskIds.has(node.task.id)"')
})
it('shows visible completion buttons for tasks and subtasks while keeping swipe shortcuts', () => {
expect(app).not.toContain('class="sr-only" :aria-label="node.task.completed')
expect(app).not.toContain('class="sr-only" :aria-label="subtask.completed')