fix: smooth habit row edge and add hide completed
ci / docker (push) Successful in 5m50s

This commit is contained in:
2026-09-07 16:07:38 +08:00
parent 3827e14a83
commit c94a914e99
3 changed files with 30 additions and 8 deletions
+20 -2
View File
@@ -85,9 +85,27 @@ describe('task and habit row decoration', () => {
expect(toggleBlock).not.toContain('await loadHabits()')
})
it('does not draw a left border on task or habit rows', () => {
it('can hide completed habits in both Today and full habit views', () => {
expect(mvpPanel).toContain('const hideCompletedHabits = ref(false)')
expect(mvpPanel).toContain('const visibleTodayHabits = computed')
expect(mvpPanel).toContain('const visibleHabits = computed')
expect(mvpPanel).toContain('v-model="hideCompletedHabits"')
expect(mvpPanel).toContain('隐藏已完成')
expect(mvpPanel).toContain('v-for="h in visibleTodayHabits"')
expect(mvpPanel).toContain('v-for="h in visibleHabits"')
expect(css).toContain('.habit-toolbar{')
})
it('keeps habit cards borderless so the rounded left edge has no visual gap', () => {
expect(css).toMatch(/\.habit-row\{border:0;/)
expect(css).not.toMatch(/\.habit-row\{[^}]*border-top:/)
expect(css).not.toMatch(/\.habit-row\{[^}]*border-right:/)
expect(css).not.toMatch(/\.habit-row\{[^}]*border-bottom:/)
})
it('keeps task rows borderless on the left and habit rows fully borderless', () => {
expect(css).toContain('.task-row{border-left:0;')
expect(css).toContain('.habit-row{border-left:0;')
expect(css).toContain('.habit-row{border:0;')
})
})