feat: support desktop habit swipe toggles
ci / docker (push) Successful in 3m27s

This commit is contained in:
2026-09-07 11:25:29 +08:00
parent e1137ca861
commit 373c038fe7
2 changed files with 49 additions and 2 deletions
+8
View File
@@ -3,6 +3,7 @@ import { describe, expect, it } from 'vitest'
const css = readFileSync('src/style.css', 'utf8')
const app = readFileSync('src/App.vue', 'utf8')
const mvpPanel = readFileSync('src/MvpPanel.vue', 'utf8')
describe('mobile navigation styles', () => {
it('keeps the mobile More sheet visible when it is rendered', () => {
@@ -20,6 +21,13 @@ describe('task and habit row decoration', () => {
expect(app.match(/@pointercancel="cancelTaskPointer/g)?.length).toBe(2)
})
it('supports pointer dragging for desktop habit rows in Today and Habits views', () => {
expect(mvpPanel.match(/@pointerdown="startHabitPointer/g)?.length).toBe(2)
expect(mvpPanel.match(/@pointermove="moveHabitPointer/g)?.length).toBe(2)
expect(mvpPanel.match(/@pointerup="finishHabitPointer/g)?.length).toBe(2)
expect(mvpPanel.match(/@pointercancel="cancelHabitPointer/g)?.length).toBe(2)
})
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;')