fix: collapse upcoming task subtasks by default
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m23s

This commit is contained in:
2026-09-09 14:38:10 +08:00
parent bc4c281658
commit 9771c3ab68
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -209,10 +209,10 @@ 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', () => {
it('starts parent tasks collapsed when entering a task list or upcoming view', () => {
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("else if (isTaskView(activeView.value)) {\n await loadAll()\n if (activeView.value === 'tasks' || activeView.value === 'upcoming') collapseLoadedTaskChildren()")
expect(app).toContain("else {\n await loadAll()\n if (view === 'tasks' || view === 'upcoming') collapseLoadedTaskChildren()")
expect(app).toContain('tasks.value.filter((task) => task.subtasks?.length).map((task) => task.id)')
})