test(admin): stabilize service center acceptance fixtures

This commit is contained in:
2026-08-08 20:47:26 +08:00
parent aab8e37175
commit e5c6e03033
3 changed files with 19 additions and 4 deletions
@@ -37,7 +37,7 @@ export async function run(context) {
context.apiSuccess(MODULE, '创建隔离海运订舱', createResponse, `key=${key}`, OPTIONS)
context.assert(MODULE, '订舱 DTO 字段、DRAFT 和9类关联字段完整', createResponse, Boolean(bookingId) && detail?.oceanBooking?.status === 'DRAFT' && detail?.parties?.length === 3 && detail?.containerRequirements?.length === 1, `bookingId=${bookingId || 'missing'}, parties=${detail?.parties?.length ?? 'n/a'}, requirements=${detail?.containerRequirements?.length ?? 'n/a'}`, OPTIONS)
if (!bookingId) return
context.createdResources.oceanBooking = { id: bookingId, marker: context.marker, finalStatus: 'RELEASED' }
context.createdResources.oceanBooking = { id: bookingId, customerId: '10001', marker: context.marker, finalStatus: 'RELEASED' }
const replay = await createBooking(context, suffix, key)
context.assert(MODULE, '创建 Idempotency-Key 重放返回同一订舱', replay, String(data(replay)?.oceanBooking?.id) === bookingId, `first=${bookingId}, replay=${id(data(replay)?.oceanBooking?.id)}`, OPTIONS)
const path = `${BASE}/${bookingId}`