fix: collapse subtasks when opening lists
This commit is contained in:
@@ -90,6 +90,13 @@ describe('task and habit row decoration', () => {
|
||||
expect(app).toContain(':aria-expanded="!collapsedTaskIds.has(node.task.id)"')
|
||||
})
|
||||
|
||||
it('starts parent tasks collapsed when entering a task list', () => {
|
||||
expect(app).toContain('function collapseLoadedTaskChildren()')
|
||||
expect(app).toContain("else if (isTaskView(activeView.value)) {\n await loadAll()\n if (activeView.value === 'tasks') collapseLoadedTaskChildren()")
|
||||
expect(app).toContain("else {\n await loadAll()\n if (view === 'tasks') collapseLoadedTaskChildren()")
|
||||
expect(app).toContain('tasks.value.filter((task) => task.subtasks?.length).map((task) => 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')
|
||||
|
||||
Reference in New Issue
Block a user