feat: simplify today into plain list
This commit is contained in:
@@ -29,6 +29,10 @@ describe('Today independent collapsible sections', () => {
|
||||
expect(app).toContain(`aria-labelledby="today-${section}-heading"`)
|
||||
}
|
||||
}
|
||||
expect(app).toContain('<span class="today-section-title">逾期</span>')
|
||||
expect(app).toContain('<span class="today-section-title">今天</span>')
|
||||
expect(app).toContain('<span class="today-section-title">习惯</span>')
|
||||
expect(app).not.toMatch(/today-section-title"><(?:CalendarDays|ListTodo|Repeat2)\/>/)
|
||||
expect(app.match(/class="today-section-toggle(?: today-section-anchor)?"/g)).toHaveLength(3)
|
||||
expect(app).toContain('<span class="today-section-summary">{{totalTasks}} 项</span>')
|
||||
expect(app).not.toContain('<span class="today-section-summary">{{taskTree.length}} 项</span>')
|
||||
@@ -45,14 +49,9 @@ describe('Today independent collapsible sections', () => {
|
||||
expect(habits).not.toContain('v-if="!todaySectionCollapse.habits"')
|
||||
})
|
||||
|
||||
it('expands a collapsed destination before next-tick scrolling and focus, respecting reduced motion', () => {
|
||||
expect(app).toContain("async function navigateTodaySection(section: 'tasks' | 'habits')")
|
||||
expect(app).toContain('todaySectionCollapse.value[section] = false')
|
||||
expect(app).toContain('await nextTick()')
|
||||
expect(app).toContain('await new Promise<void>((resolve) => requestAnimationFrame(() => resolve()))')
|
||||
expect(app).toContain('heading?.focus({ preventScroll: true })')
|
||||
expect(app).toContain("window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth'")
|
||||
expect(app).toContain("@click=\"navigateTodaySection('tasks')\"")
|
||||
expect(app).toContain("@click=\"navigateTodaySection('habits')\"")
|
||||
it('keeps section navigation local to each collapse toggle', () => {
|
||||
expect(app).not.toContain("async function navigateTodaySection(section: 'tasks' | 'habits')")
|
||||
expect(app).toContain("@click=\"toggleTodaySection('tasks')\"")
|
||||
expect(app).toContain("@click=\"toggleTodaySection('habits')\"")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user