fix: hide past countdown heading
This commit is contained in:
@@ -71,6 +71,16 @@ describe('countdown modal accessibility', () => {
|
||||
expect(source).not.toContain("`${formatDate(item.display_date)} · ${item.lunar_text}${suffix}`")
|
||||
})
|
||||
|
||||
it('hides only the past group heading while keeping every group and its rows', () => {
|
||||
expect(source).toContain("{ key:'recent', title:'最近', items:recent }")
|
||||
expect(source).toContain("{ key:'later', title:'稍后', items:later }")
|
||||
expect(source).toContain("{ key:'past', title:'', items:past }")
|
||||
expect(source).toContain('<section v-for="group in countdownGroups"')
|
||||
expect(source).toContain('<h3 v-if="group.title">{{group.title}}</h3>')
|
||||
expect(source).toContain('<button v-for="item in group.items"')
|
||||
expect(source).not.toContain('<h3>{{group.title}}</h3>')
|
||||
})
|
||||
|
||||
it('keeps the empty state directly actionable', () => {
|
||||
expect(source).toContain('添加第一个重要日子')
|
||||
expect(source).toContain('@click="openFromEmpty"')
|
||||
|
||||
Reference in New Issue
Block a user