优化
This commit is contained in:
@@ -17,6 +17,7 @@ const truckAttachmentDialog = read(`${adminRoot}trucking/components/TruckAttachm
|
||||
const truckList = read(`${adminRoot}trucking/pages/TruckAppointmentsView.vue`)
|
||||
const truckForm = read(`${adminRoot}trucking/components/TruckAppointmentForm.vue`)
|
||||
const containerList = read(`${adminRoot}container-loading/pages/ContainersView.vue`)
|
||||
const containerOverviewPanel = read(`${adminRoot}container-loading/components/ContainerOverviewPanel.vue`)
|
||||
const containerLoadingAcceptance = read('phase3-container-loading.mjs')
|
||||
const truckAcceptance = read('truck-appointments.mjs')
|
||||
const matrix = read('../../../docs/三期/货柜管理全链验收矩阵-2026-08-13.md')
|
||||
@@ -41,23 +42,27 @@ test('overview regression requires workflowStatus and distinguishes 100 percent
|
||||
test('every overview photo uses its server-provided controlled downloadPath', () => {
|
||||
assert.match(overviewOpenApi, /\/api\/platform\/v1\/containers\/\{id\}\/pda\/photos\/\{fileId\}\/download/)
|
||||
assert.match(overviewAcceptance, /context\.requestBinary\('GET', downloadPath\)/)
|
||||
assert.equal(controlledPhotoDownload('/api/platform/v1/files/1', {
|
||||
assert.equal(controlledPhotoDownload('/api/platform/v1/containers/7/pda/photos/23/download', {
|
||||
http: 200, bytes: new Uint8Array([1]), contentType: 'image/png',
|
||||
}), true)
|
||||
for (const [path, response] of [
|
||||
['https://example.test/file', { http: 200, bytes: new Uint8Array([1]), contentType: 'image/png' }],
|
||||
['/api/platform/v1/files/1', { http: 200, bytes: new Uint8Array([1]), contentType: 'application/json' }],
|
||||
['/api/platform/v1/files/1', { http: 404, bytes: new Uint8Array(), contentType: 'image/png' }],
|
||||
['/api/platform/v1/files/loading-evidence/21/22/23', { http: 200, bytes: new Uint8Array([1]), contentType: 'image/png' }],
|
||||
['/api/platform/v1/containers/7/pda/photos/23/download', { http: 200, bytes: new Uint8Array([1]), contentType: 'application/json' }],
|
||||
['/api/platform/v1/containers/7/pda/photos/23/download', { http: 404, bytes: new Uint8Array(), contentType: 'image/png' }],
|
||||
]) assert.equal(controlledPhotoDownload(path, response), false)
|
||||
})
|
||||
|
||||
test('truck attachment API is frozen while Admin add-reference entry remains blocked', () => {
|
||||
test('truck attachment API and Admin upload-reference-delete flow are frozen', () => {
|
||||
assert.match(truckApi, /referenceTruckAppointmentAttachment/)
|
||||
assert.match(truckApi, /uploadTruckAppointmentAttachment/)
|
||||
assert.match(truckApi, /deleteTruckAppointmentAttachment/)
|
||||
assert.doesNotMatch(truckAttachmentDialog, /referenceTruckAppointmentAttachment/)
|
||||
assert.match(truckAttachmentDialog, /uploadTruckAppointmentAttachment/)
|
||||
assert.match(truckAttachmentDialog, /上传并关联/)
|
||||
assert.match(truckAttachmentDialog, /confirmButtonText: '确认', cancelButtonText: '取消'/)
|
||||
assert.match(truckAcceptance, /删除后回查拖车预约附件列表/)
|
||||
assert.match(truckAcceptance, /!remainingAttachments\.some/)
|
||||
assert.match(matrix, /拖车附件新增入口缺失[\s\S]*BLOCKED_CONTRACT/)
|
||||
assert.match(matrix, /拖车附件闭环[\s\S]*`LANDED`/)
|
||||
})
|
||||
|
||||
test('existing container number replacement keeps container plan and PDA identities stable', () => {
|
||||
@@ -78,6 +83,10 @@ test('customer public display uses tenantName without a legalName fallback', ()
|
||||
assert.match(matrix, /客户公开名称一致性[\s\S]*已统一 `tenantName`[\s\S]*`LANDED`/)
|
||||
})
|
||||
|
||||
test('Chinese status dialogs and 390px layout remain explicit Admin contract blockers', () => {
|
||||
assert.match(matrix, /中文状态、弹框与 390px 布局[\s\S]*BLOCKED_CONTRACT/)
|
||||
test('Chinese status dialogs and 390px layout are landed', () => {
|
||||
assert.match(releaseView, /确认放舱/)
|
||||
assert.match(containerOverviewPanel, /AWAITING_REVIEW: '待人工复核'/)
|
||||
assert.match(containerOverviewPanel, /PHOTO_STEP_EMPTY_CONTAINER: '空柜照片'/)
|
||||
assert.match(matrix, /中文状态、弹框与 390px 布局[\s\S]*`LANDED`/)
|
||||
assert.doesNotMatch(matrix, /拖车附件新增入口缺失|中文状态、弹框与 390px 布局[^\n]*BLOCKED_CONTRACT/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user