refactor: simplify today progress summary
This commit is contained in:
@@ -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{')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user