feat(web): 票据夹资产缓存接入与 AI 工作台附件流程完善
- ReceiptFolderView 删除票据后提示已关联附件副本保留,接入 useToast;fetchReceiptFolderAsset 加 no-store 避免预览缓存 - PersonalWorkbenchAiMode 附件区/对话气泡适配资产缓存,personal-workbench-ai-mode.css 调整布局 - usePersonalWorkbenchAiMode/useWorkbenchAiApplicationPreviewFlow/useWorkbenchAiAttachmentAssociationFlow/useWorkbenchAiStewardFlow 完善附件草稿选择与关联流程 - travelRequestDetailSmartEntryRecognition 智能识别增强,AppShellRouteView/PersonalWorkbenchView/useApplicationPreviewEditor/useTravelReimbursementSubmitComposer 等配套适配 - 新增 expense-attachment-draft-selection、receipt-folder-asset-cache、travel-request-detail-smart-entry-recognition 测试,更新 attachment-association-confirmation、expense-application-fast-preview、workbench-ai-mode-switch 测试
This commit is contained in:
14
web/tests/receipt-folder-asset-cache.test.mjs
Normal file
14
web/tests/receipt-folder-asset-cache.test.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import test from 'node:test'
|
||||
|
||||
const root = process.cwd()
|
||||
|
||||
test('receipt folder asset fetch bypasses stale preview cache', () => {
|
||||
const service = readFileSync(join(root, 'web/src/services/receiptFolder.js'), 'utf8')
|
||||
|
||||
assert.match(service, /export function fetchReceiptFolderAsset/)
|
||||
assert.match(service, /cache: 'no-store'/)
|
||||
assert.match(service, /responseType: 'blob'/)
|
||||
})
|
||||
Reference in New Issue
Block a user