fix: keep today habits visible while refreshing
ci / docker (push) Successful in 5m48s

This commit is contained in:
2026-09-07 17:27:24 +08:00
parent 3772b56617
commit 5d564b0269
4 changed files with 41 additions and 8 deletions
+7
View File
@@ -110,6 +110,13 @@ describe('task and habit row decoration', () => {
expect(css).toContain('.empty-action{')
})
it('keeps cached today habits visible during background refresh', () => {
expect(mvpPanel).toContain('readHabitGridCache<Habit>(week)')
expect(mvpPanel).toContain('writeHabitGridCache(week, habits.value)')
expect(mvpPanel).toContain("view === 'today-habits' && (habits.length || !busy)")
expect(mvpPanel).not.toContain("view === 'today-habits' && busy\" class=\"empty-panel\">加载中…")
})
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:/)