fix: separate today completion toolbar
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -440,6 +440,16 @@ describe('task and habit row decoration', () => {
|
|||||||
expect(todayHabits).not.toContain('隐藏已完成')
|
expect(todayHabits).not.toContain('隐藏已完成')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('adds top spacing only to the Today completed toolbar before mobile overrides', () => {
|
||||||
|
const todayToolbarRule = '.today-completed-toolbar{margin-top:8px}'
|
||||||
|
const todayToolbarIndex = css.indexOf(todayToolbarRule)
|
||||||
|
const mobileBreakpointIndex = css.indexOf('@media(max-width:930px)')
|
||||||
|
expect(css.match(/\.today-completed-toolbar\{/g)).toHaveLength(1)
|
||||||
|
expect(todayToolbarIndex).toBeGreaterThan(css.indexOf('.list-toolbar{'))
|
||||||
|
expect(todayToolbarIndex).toBeLessThan(mobileBreakpointIndex)
|
||||||
|
expect(css.slice(mobileBreakpointIndex)).not.toContain('.today-completed-toolbar{')
|
||||||
|
})
|
||||||
|
|
||||||
it('filters habits with the shared preference and disables sorting while completed items are hidden', () => {
|
it('filters habits with the shared preference and disables sorting while completed items are hidden', () => {
|
||||||
expect(mvpPanel).toContain('const visibleTodayHabits = computed(() => props.showCompleted ? todayHabits.value')
|
expect(mvpPanel).toContain('const visibleTodayHabits = computed(() => props.showCompleted ? todayHabits.value')
|
||||||
expect(mvpPanel).toContain('const visibleHabits = computed(() => props.showCompleted ? habits.value')
|
expect(mvpPanel).toContain('const visibleHabits = computed(() => props.showCompleted ? habits.value')
|
||||||
|
|||||||
Reference in New Issue
Block a user