fix: restore numeric habit progress bars
This commit is contained in:
@@ -921,8 +921,11 @@ describe('task and habit row decoration', () => {
|
||||
expect(mvpPanel).not.toMatch(/today-habit-list[\s\S]*?habit-drag-handle[\s\S]*?<!-- 完整习惯列表 -->/)
|
||||
})
|
||||
|
||||
it('uses the same visible text status tail in Today and full habits', () => {
|
||||
expect(mvpPanel).not.toContain('<progress v-if="h.kind === \'numeric\'" class="habit-progress-bar"')
|
||||
it('shows independently accessible progress tracks for numeric habits in Today and full habits', () => {
|
||||
expect(mvpPanel.match(/<progress v-if="h.kind === 'numeric'" class="habit-progress-bar"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/:value="habitProgressValue\(h\)"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/:max="habitProgressMax\(h\)"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/<\/div>\n\s*<progress v-if="h.kind === 'numeric'" class="habit-progress-bar"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/class="habit-row-meta"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/:aria-label="habitRowStatus\(h\)"/g)?.length).toBe(2)
|
||||
expect(mvpPanel).not.toContain('class="habit-state-note"')
|
||||
|
||||
Reference in New Issue
Block a user