feat(short-drama-agent-front): 新增视觉风格骨架屏并优化参考图添加

This commit is contained in:
GJ committed 2026-10-11 00:01:24 +08:00
1 parent 3cc65aa056
commit 519b956808
11 files changed
+621 -242

No files matched your search

+8 -2
View File
@@ -44,11 +44,17 @@ describe('管理后台组件边界', () => {
expect(adminCss).toMatch(/html,\s*body,\s*#app,\s*\.app-provider\s*\{[^}]*overflow:\s*hidden/)
expect(adminCss).toMatch(/\.workspace-page\s*\{[^}]*min-height:\s*0;[^}]*overflow:\s*hidden/)
})
it('仅手机阅读工作区允许项目内容整体滚动,其余面板保持独立滚动', () => {
it('项目整体滚动仅用于手机阅读,弹窗素材选择保留有界滚动', () => {
const css = readAllStyles()
const mobileReading = /\.project-view:has\(\.mobile-reading-workspace\)\s*\{[^}]*\}/
expect(css.match(mobileReading)?.[0]).toContain('overflow-y: auto;')
expect(css.replace(mobileReading, '')).not.toMatch(/overflow(?:-[xy])?\s*:\s*(?:auto|scroll)\b/)
/** 素材列表是弹窗内的局部滚动容器,不改变项目工作区滚动边界。 */
const assetPicker = /\.style-asset-picker\s*\{[^}]*\}/
expect(css.match(assetPicker)?.[0]).toContain('max-height: 280px;')
expect(css.match(assetPicker)?.[0]).toContain('overflow-y: auto;')
expect(css.replace(mobileReading, '').replace(assetPicker, '')).not.toMatch(
/overflow(?:-[xy])?\s*:\s*(?:auto|scroll)\b/
)
})
it('历史缩略图尺寸在非分层样式中覆盖 Naive 按钮,原图不能撑大预览或横向条目', () => {
// happy-dom 不计算几何;专门保护此前失效的层叠和固定尺寸约束。