refactor: simplify today progress summary
ci / gitleaks (push) Successful in 39s
ci / docker (push) Successful in 5m24s

This commit is contained in:
2026-09-08 18:27:33 +08:00
parent ba08a2fd34
commit bbb797c411
3 changed files with 15 additions and 19 deletions
+9 -2
View File
@@ -197,9 +197,14 @@ describe('task and habit row decoration', () => {
expect(app).toContain('role="progressbar"')
expect(app).toContain(':aria-valuemax="todayTaskTotal"')
expect(app).toContain(':aria-valuenow="todayHabitCompleted"')
expect(app).toContain('还有 ${Math.max(todayHabitTotal.value - todayHabitCompleted.value, 0)} 项未完成')
expect(app).toContain('任务 {{ todayTaskCompleted }} / {{ todayTaskTotal }}')
expect(app).toContain('习惯 {{ todayHabitProgress }}')
expect(app).not.toContain('const todayProgressText = computed')
expect(app).not.toContain('const todayTaskProgressHint = computed')
expect(app).not.toContain('const todayHabitProgressHint = computed')
expect(app).not.toContain('<p v-if="activeView===\'today\'">')
expect(app).not.toContain('class="paper today-summary"')
expect(app).not.toContain('today-summary-grid')
expect(app).toContain("scrollTodaySection('today-tasks')")
expect(app).toContain("scrollTodaySection('today-habits')")
expect(app).not.toContain('<div class="today-stat"')
@@ -217,7 +222,9 @@ describe('task and habit row decoration', () => {
expect(css).toContain('.today-track-fill{')
expect(css).toContain('.today-habit-track .today-track-fill{')
expect(css).not.toContain('.today-stat{')
expect(css).toContain('.today-summary-grid{')
expect(css).not.toContain('.today-summary{')
expect(css).not.toContain('.today-summary-grid{')
expect(css).not.toContain('.today-track-head small{')
expect(css).toContain('.empty-action{')
})