优化
This commit is contained in:
@@ -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" />删除')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user