fix: harden today progress summary
ci / gitleaks (push) Successful in 1m7s
ci / docker (push) Successful in 7m5s

This commit is contained in:
2026-09-08 14:58:09 +08:00
parent 32c0400d27
commit d9c16908e9
2 changed files with 34 additions and 24 deletions
+7 -1
View File
@@ -165,7 +165,13 @@ describe('task and habit row decoration', () => {
expect(app).toContain('const token = ++todaySummaryLoadToken')
expect(app).toContain("params.set('completed', String(completed))")
expect(app).toContain('await Promise.all([summaryTotal(false), summaryTotal(true)])')
expect(app).toContain("if (activeView.value === 'today') await loadTodayTaskSummary()")
expect(app).toContain("if (activeView.value === 'today') void loadTodayTaskSummary()")
expect(app).toContain('aria-controls="today-tasks"')
expect(app).toContain('aria-controls="today-habits"')
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).toContain("scrollTodaySection('today-tasks')")