fix: refresh tasks after completion
This commit is contained in:
@@ -101,6 +101,15 @@ describe('task and habit row decoration', () => {
|
||||
expect(css).toContain('.task-check:focus-visible{')
|
||||
})
|
||||
|
||||
it('refreshes the current task data after toggling completion', () => {
|
||||
const toggleBlock = app.slice(app.indexOf('async function toggle(task: Task)'), app.indexOf('function isInteractiveTarget'))
|
||||
expect(toggleBlock).toContain('await patchTask(task, { completed: !task.completed })')
|
||||
expect(toggleBlock).toContain('await loadTasksPage()')
|
||||
expect(toggleBlock).toContain("if (activeView.value === 'today')")
|
||||
expect(toggleBlock).toContain('await loadOverdueTasks()')
|
||||
expect(toggleBlock).toContain('void loadTodayTaskSummary()')
|
||||
})
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user