Files
FileCodeBoxFronted2026/tests/README.md
T
orion af009cf3c5 ✨ feat(core): 实现详情面板动画逻辑并完善相关测试
* 新增 detailMotion 工具类以支持更精细的动画控制
* 优化 FileManageView 面板渲染逻辑,改用 v-show 提升交互性能
* 调整 Transition 组件为手动控制模式以适配自定义动画
* 在 package.json 中配置自动化测试脚本
* 补充 detailMotion 相关的单元测试与测试说明文档
2026-09-15 11:25:43 +08:00

27 lines
1.2 KiB
Markdown

# 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:
```js
await (await import('/theme-assets/tests/detailMotion.browser.mjs')).runDetailMotionChecks()
```
Run again at 390px width, then with `prefers-reduced-motion: reduce` emulated:
```js
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.