fix: collapse upcoming task subtasks by default
This commit is contained in:
@@ -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)')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user