优化
This commit is contained in:
@@ -7,6 +7,7 @@ const openapi = read('../../firstleg/src/main/resources/openapi/firstleg-v1.yaml
|
||||
const service = read('../../firstleg/src/main/java/com/baiyue/firstleg/service/SmartLoadingService.java')
|
||||
const outbox = read('../../firstleg/src/main/java/com/baiyue/firstleg/service/LoadingCompletedOutboxService.java')
|
||||
const event = read('../../common-event-contract/src/main/java/com/baiyue/common/event/FirstLegLoadingPlanCompletedV2.java')
|
||||
const eventV3 = read('../../common-event-contract/src/main/java/com/baiyue/common/event/FirstLegLoadingPlanCompletedV3.java')
|
||||
const admin = read('../../../apps/admin-web/src/modules/loading-lists/components/LoadingListDetailDrawer.vue')
|
||||
|
||||
test('fixture locks customer and latest internal note sources without cargoRemark leakage', () => {
|
||||
@@ -34,16 +35,18 @@ test('warehouse remark PATCH covers save clear stale version and source preserva
|
||||
assert.match(loading, /preservedRemarkItem\?\.warehouseRemark === warehouseRemark/)
|
||||
})
|
||||
|
||||
test('completed event V2 carries all three remarks with stable event payload', () => {
|
||||
test('completed event V3 retains V2 order remarks with stable event payload', () => {
|
||||
assert.match(outbox, /FirstLegLoadingPlanCompletedV2/)
|
||||
assert.match(outbox, /FirstLegLoadingPlanCompletedV3/)
|
||||
assert.match(eventV3, /List<FirstLegLoadingPlanCompletedV2\.Order> orders/)
|
||||
for (const field of ['customerRemark', 'internalRemark', 'warehouseRemark']) assert.match(event, new RegExp(field))
|
||||
assert.match(outbox, /row\.getCustomerRemark\(\)/)
|
||||
assert.match(outbox, /row\.getInternalRemark\(\)/)
|
||||
assert.match(outbox, /row\.getWarehouseRemark\(\)/)
|
||||
assert.match(outbox, /HANDOVER_VERSION = 2L/)
|
||||
assert.match(outbox, /HANDOVER_VERSION = 3L/)
|
||||
assert.match(outbox, /EventPayloadCanonicalizer\.canonicalize\(payloadNode\)/)
|
||||
assert.match(outbox, /FIRSTLEG_LOADING_COMPLETED:[^\n]*HANDOVER_VERSION/)
|
||||
assert.match(outbox, /EventTypes\.FIRST_LEG_LOADING_PLAN_COMPLETED, 2/)
|
||||
assert.match(outbox, /EventTypes\.FIRST_LEG_LOADING_PLAN_COMPLETED, 3/)
|
||||
})
|
||||
|
||||
test('Admin exposes only warehouse remark editing and keeps completed rows read-only', () => {
|
||||
|
||||
Reference in New Issue
Block a user