test: align container flow acceptance identities

This commit is contained in:
2026-08-14 22:30:28 +08:00
parent 8aa58a4f72
commit 011c30cc09
5 changed files with 29 additions and 10 deletions
@@ -39,9 +39,14 @@ test('overview regression requires workflowStatus and distinguishes 100 percent
assert.doesNotMatch(matrix, /PDA overview `workflowStatus` 缺失[\s\S]*BLOCKED_CONTRACT/)
})
test('every overview photo uses its server-provided controlled downloadPath', () => {
test('active overview photos download through controlled paths while void history has no download entry', () => {
assert.match(overviewOpenApi, /\/api\/platform\/v1\/containers\/\{id\}\/pda\/photos\/\{fileId\}\/download/)
assert.match(overviewAcceptance, /context\.requestBinary\('GET', downloadPath\)/)
assert.match(overviewAcceptance, /photo\.status === 'VOID'/)
assert.match(overviewAcceptance, /overview PDA 作废照片 \$\{index \+ 1\} 无下载入口/)
assert.match(overviewAcceptance, /photo\.status !== 'ACTIVE' \|\| !controlledPath/)
assert.match(overviewOpenApi, /status: \{type: string, enum: \[ACTIVE, VOID\]\}/)
assert.match(overviewOpenApi, /downloadPath: \{type: string, nullable: true, description: '仅 ACTIVE 照片提供鉴权下载路径;VOID 历史照片为空'\}/)
assert.equal(controlledPhotoDownload('/api/platform/v1/containers/7/pda/photos/23/download', {
http: 200, bytes: new Uint8Array([1]), contentType: 'image/png',
}), true)