This commit is contained in:
@@ -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;')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user