This commit is contained in:
2026-08-11 19:59:15 +08:00
parent c690a30422
commit 41618847b7
19 changed files with 117 additions and 142 deletions
@@ -0,0 +1,21 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
const source = readFileSync(resolve(process.cwd(), 'src/modules/trucking/components/TruckAttachmentDialog.vue'), 'utf8')
describe('TruckAttachmentDialog interaction governance', () => {
it('shows existing attachments without exposing file-service internals', () => {
expect(source).toContain('预约附件')
expect(source).toContain('attachmentTypeLabel(item.attachmentType)')
expect(source).not.toContain('文件 ID')
expect(source).not.toContain('item.objectKey')
})
it('hides the unavailable manual reference flow but keeps deletion', () => {
expect(source).not.toContain('referenceTruckAppointmentAttachment')
expect(source).not.toContain('输入文件服务 ID')
expect(source).toContain('deleteTruckAppointmentAttachment')
expect(source).toContain('<Trash2 :size="15" />删除')
})
})