fix: compact today hidden tasks notice
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m32s

This commit is contained in:
2026-09-11 16:28:40 +08:00
parent 5b2f599243
commit 78ade3eed8
3 changed files with 13 additions and 3 deletions
+9
View File
@@ -727,6 +727,15 @@ describe('task and habit row decoration', () => {
expect(css).not.toContain('.habit-toolbar{')
})
it('uses a compact hidden-completed notice only on Today', () => {
expect(app).toContain("v-if=\"activeView==='today' && !query && hiddenCompletedTaskCount > 0 && !visibleTasks.length && !loading\" class=\"today-filtered-empty-note\"")
expect(app).toContain('已隐藏已完成任务')
expect(app).toContain('@click="showCompleted=true">显示</button>')
expect(app).toContain("v-else-if=\"!visibleTasks.length&&!loading\" class=\"empty\"")
expect(css).toContain('.today-filtered-empty-note{min-height:48px;')
expect(css).toContain('@media(max-width:930px){.today-filtered-empty-note{min-height:44px;')
})
it('distinguishes hidden completed items from true and search empty states', () => {
expect(app).toContain('const hiddenCompletedTaskCount = ref(0)')
expect(app).toContain("query ? '没有匹配的任务' : hiddenCompletedTaskCount > 0 ? '已完成任务已隐藏' : '这里还很安静'")