feat: unify task and habit pages with Today
This commit is contained in:
@@ -47,7 +47,7 @@ describe('Today environment integration', () => {
|
||||
})
|
||||
|
||||
it('renders the approved plain-list composition without a board or progress tracks', () => {
|
||||
expect(app).toContain('<main :class="{\'today-main\':activeView===\'today\'}"')
|
||||
expect(app).toContain("<main :class=\"{'today-main':activeView==='today','list-main':activeView==='tasks'||activeView==='habits'}\"")
|
||||
expect(app).toContain('<section v-if="activeView===\'today\'" class="today-context" aria-label="今日概览">')
|
||||
expect(app).toContain('<p class="today-remaining">还有 {{ todayTaskRemaining + todayHabitRemaining }} 项待完成</p>')
|
||||
expect(app).not.toContain('class="today-board"')
|
||||
@@ -84,9 +84,9 @@ describe('Today environment integration', () => {
|
||||
expect(filter).toBeGreaterThan(remaining)
|
||||
expect(overdue).toBeGreaterThan(filter)
|
||||
expect(main.match(/>今天<\/h1>/g)).toHaveLength(1)
|
||||
expect(main).toContain("<div v-if=\"activeView!=='today'\" class=\"topbar-title\"><h1")
|
||||
expect(main).toContain("<div v-if=\"!['today','tasks','habits'].includes(activeView)\" class=\"topbar-title\"><h1")
|
||||
expect(main).toContain("<div v-if=\"['today', 'tasks', 'upcoming', 'habits'].includes(activeView)\" class=\"topbar-actions\">")
|
||||
expect(main).toContain('<CompletedFilterPill v-if="activeView!==\'today\'" v-model="showCompleted" class="topbar-filter" />')
|
||||
expect(main).toContain('<CompletedFilterPill v-if="activeView===\'upcoming\'" v-model="showCompleted" class="topbar-filter" />')
|
||||
expect(main).toContain('aria-label="刷新当前页面"')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user