feat: align upcoming with list layout
ci / gitleaks (push) Successful in 1m3s
ci / docker (push) Successful in 4m48s

This commit is contained in:
2026-09-19 19:43:32 +08:00
parent 915d690397
commit 0cf1c49094
6 changed files with 124 additions and 28 deletions
+3 -3
View File
@@ -159,7 +159,7 @@ describe('approved Settings 01 paper ledger', () => {
it('moves Settings identity into the body and suppresses the duplicate shell title', () => {
expect(app).not.toContain("'settings-main':activeView==='settings'")
expect(app).toContain(":class=\"{'settings-topbar':activeView==='settings'}\"")
expect(app).toContain("v-if=\"!['today','tasks','habits','settings'].includes(activeView)\" class=\"topbar-title\"")
expect(app).toContain("v-if=\"!['today','tasks','upcoming','habits','settings'].includes(activeView)\" class=\"topbar-title\"")
expect(app).toContain('v-if="activeView===\'settings\'" class="icon topbar-refresh settings-refresh"')
expect(mvpPanel).toContain('<header class="settings-heading"><h1>设置</h1><p>管理数据、账户与登录设备</p></header>')
expect(mvpPanel).toContain('<h2>数据与恢复</h2><small>完整备份</small>')
@@ -932,8 +932,8 @@ describe('task and habit row decoration', () => {
it('uses one completed filter per supported view and keeps App as the only preference owner', () => {
expect(app).toContain("import CompletedFilterPill from './components/CompletedFilterPill.vue'")
const topbar = app.slice(app.indexOf('<header class="topbar"'), app.indexOf('</header>', app.indexOf('<header class="topbar"')))
expect(topbar.match(/<CompletedFilterPill/g)).toHaveLength(1)
expect(topbar).toContain('<CompletedFilterPill v-if="activeView===\'upcoming\'" v-model="showCompleted" class="topbar-filter" />')
expect(topbar.match(/<CompletedFilterPill/g) ?? []).toHaveLength(0)
expect(topbar).not.toContain('topbar-filter')
expect(app).toContain("v-if=\"['today', 'tasks', 'upcoming', 'habits'].includes(activeView)\"")
expect(app).toContain('class="today-inline-filter"')
expect(app).toContain('class="list-inline-filter"')