feat: unify design tokens, five font weights, radius scale, restrained motion, AA contrast
This commit is contained in:
@@ -36,14 +36,14 @@ describe('Today independent collapsible sections', () => {
|
||||
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>')
|
||||
expect(app).toContain("{{ todaySectionCollapse.overdue ? '›' : '⌄' }}")
|
||||
expect(app).toContain('<span class="today-section-chevron" :class="{open: !todaySectionCollapse.overdue}" aria-hidden="true">›</span>')
|
||||
expect(app).not.toContain('<ChevronRight v-if="todaySectionCollapse.overdue"')
|
||||
expect(css).toMatch(/\.today-section-toggle\{[^}]*min-height:44px/)
|
||||
})
|
||||
|
||||
it('keeps the habit panel mounted while collapsed and omits an empty overdue section', () => {
|
||||
expect(app).toContain('<section v-if="overdueTaskTree.length" class="overdue-section today-collapsible-section">')
|
||||
expect(app).toContain('<div v-show="!todaySectionCollapse.habits" id="today-habits"')
|
||||
expect(app).toContain('<section v-if="overdueTaskTree.length" class="overdue-section today-collapsible-section" :class="{\'is-collapsed\': todaySectionCollapse.overdue}">')
|
||||
expect(app).toContain('<div id="today-habits" :class="{\'is-collapsed\': todaySectionCollapse.habits}" role="region"')
|
||||
const habits = app.slice(app.indexOf('id="today-habits-heading"'), app.indexOf('</div>', app.indexOf('<MvpPanel ref="habitComposer" view="today-habits"')) + 6)
|
||||
expect(habits).toContain('<MvpPanel ref="habitComposer" view="today-habits"')
|
||||
expect(habits).not.toContain('v-if="!todaySectionCollapse.habits"')
|
||||
|
||||
Reference in New Issue
Block a user