Files
FileCodeBoxFronted2026/tests
orion 614b9a2104 ✨ feat(core): 实现回收站条目展示逻辑及UI组件
* 新增 TrashItemInfo 组件以优化回收站列表项展示
* 封装 trashPresentation 工具类处理时间显示逻辑
* 调整 TrashView 布局,重构列表项渲染逻辑
* 新增回收站功能相关的集成测试与单元测试
* 更新测试文档以说明回收站日期格式化测试规则
* 更新 package.json 依赖配置
2026-09-16 18:01:23 +08:00
..

Detail motion regression checks

Requires Node 22.6+ for the TypeScript unit tests (no extra test dependencies).

  • npm run test:motion: animation completion, cancellation, reversal and reduced motion.
  • npm run test:motion:coverage: coverage of src/utils/detailMotion.ts only.

Browser integration uses the actual Vue file-detail view and backend data. Start Vite with the desired test backend, sign in, and open a file with more than three lifecycle rows and at least one retrieval event. In that page's DevTools console:

await (await import('/theme-assets/tests/detailMotion.browser.mjs')).runDetailMotionChecks()

Run again at 390px width, then with prefers-reduced-motion: reduce emulated:

await (await import('/theme-assets/tests/detailMotion.browser.mjs')).runDetailMotionChecks({ reducedMotion: true })

Checks three expand/collapse cycles, nonidentical height endpoints, return to natural height, visible retrieval records, no vertical record transform, rapid reversals and final collapsed layout. It only toggles presentation and never uploads, deletes, restores or changes file data. These checks do not measure whole-project coverage or validate the storage implementation.

Recycle bin information

  • npm run test:trash: relative-time boundary tests and Vue SSR integration checks for normal, urgent, permanent, purged and incomplete records.
  • npm run test:trash:coverage: coverage of src/utils/trashPresentation.ts only.

Seven days is inclusive in both directions; older or more distant dates use exact local date/time. Relative labels refresh every minute. Native title text retains the exact date/time. The three-day cleanup warning is independent of the seven-day formatting boundary. These tests do not modify backend data.