fix: keep task list open after creation
ci / docker (push) Successful in 3m57s

This commit is contained in:
2026-09-08 10:02:50 +08:00
parent 663a69341a
commit f53b40ac67
2 changed files with 6 additions and 1 deletions
-1
View File
@@ -166,7 +166,6 @@ async function submitTaskCompose() {
totalTasks.value = nextTotalAfterLocalTaskAdd(totalTasks.value)
}
taskComposeOpen.value = false
selectTask(task)
toast('任务已添加')
} catch (reason) { fail(reason) }
}
+6
View File
@@ -204,6 +204,12 @@ describe('unified floating add interaction', () => {
expect(app).toContain("composeHasTime.value ? composeTime.value : '23:59'")
})
it('keeps the current task list visible after creating a task', () => {
const submitTaskCompose = app.slice(app.indexOf('async function submitTaskCompose()'), app.indexOf('function toggleSidebar()'))
expect(submitTaskCompose).not.toContain('selectTask(task)')
expect(submitTaskCompose).toContain("toast('任务已添加')")
})
it('lets task create and detail forms configure a repeat rule', () => {
expect(app).toContain('const composeRepeat = ref')
expect(app).toContain('const selectedTaskRepeat = ref')