feat: show habit history in details
ci / gitleaks (push) Successful in 53s
ci / docker (push) Successful in 4m59s

This commit is contained in:
2026-09-15 16:32:53 +08:00
parent a6c12ee01f
commit e857506bf6
5 changed files with 159 additions and 9 deletions
+10 -1
View File
@@ -454,7 +454,16 @@ describe('mobile list row language', () => {
expect(mvpPanel).toContain('v-if="selectedHabit.archived_at"')
expect(mvpPanel).toContain('@click="deleteHabit(selectedHabit)"')
expect(mvpPanel).toContain("request(`/habits/${h.id}/permanent`, { method: 'DELETE' })")
expect(mvpPanel).toContain('v-if="!selectedHabit.archived_at"')
expect(mvpPanel).toContain("request(`/habits/${habit.id}/logs?from=${window.from}&to=${window.to}`)")
expect(mvpPanel).toContain('aria-labelledby="habit-history-title"')
expect(mvpPanel).toContain('历史记录加载失败')
expect(mvpPanel).toContain('加载更早记录')
expect(mvpPanel).toContain('mergeHabitHistory(reset ? [] : habitHistory.value')
expect(css).toContain('.habit-history__row{min-height:48px')
expect(css).toContain('.habit-detail-sheet{width:min(500px,100%);max-height:min(88dvh,760px);overflow:hidden')
expect(mvpPanel).toContain("habitHistoryNextTo.value = ''")
expect(mvpPanel).toContain('habitHistoryHasMore.value = false')
expect(mvpPanel).toContain('syncHabitHistoryToday(h)')
expect(mvpPanel).toContain('@click="openHabitDetail(h, $event.currentTarget as HTMLElement)"')
expect(mvpPanel).toContain('@keydown.enter.prevent="openHabitDetail(h, $event.currentTarget as HTMLElement)"')
expect(mvpPanel).toContain('ref="habitDetailSheet"')