This commit is contained in:
@@ -72,6 +72,19 @@ describe('task and habit row decoration', () => {
|
||||
expect(css).toContain('.task-check:focus-visible{')
|
||||
})
|
||||
|
||||
it('shows the same visible round check control for boolean and numeric habits in both views', () => {
|
||||
expect(mvpPanel).not.toContain('class="sr-only" :aria-label="isDone(h, todayKey)')
|
||||
expect(mvpPanel.match(/class="task-check habit-check"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/class="task-check-mark"/g)?.length).toBe(2)
|
||||
expect(mvpPanel.match(/<Check v-if="isDone\(h, todayKey\)"/g)?.length).toBe(2)
|
||||
expect(css).toContain('.habit-check{')
|
||||
expect(mvpPanel).toContain('@pointerdown="startHabitPointer')
|
||||
const toggleBlock = mvpPanel.slice(mvpPanel.indexOf('async function toggleHabitFromButton'), mvpPanel.indexOf('async function addHabit'))
|
||||
expect(toggleBlock).toContain('setLocalHabitValue(h, next)')
|
||||
expect(toggleBlock).toContain('setLocalHabitValue(h, previous)')
|
||||
expect(toggleBlock).not.toContain('await loadHabits()')
|
||||
})
|
||||
|
||||
it('does not draw a left border on task or habit rows', () => {
|
||||
expect(css).toContain('.task-row{border-left:0;')
|
||||
expect(css).toContain('.habit-row{border-left:0;')
|
||||
|
||||
Reference in New Issue
Block a user