`
This commit is contained in:
@@ -10,6 +10,7 @@ test('declares the documented merchant warehouse and first-leg endpoints', () =>
|
||||
assert.match(apiSource, /url: '\/merchant\/v1\/orders\/first-leg'/)
|
||||
assert.match(apiSource, /`\/merchant\/v1\/orders\/first-leg\/\$\{id\}`/)
|
||||
assert.match(apiSource, /`\/merchant\/v1\/orders\/first-leg\/\$\{id\}\/submit`/)
|
||||
assert.match(apiSource, /`\/merchant\/v1\/warehouses\/\$\{id\}`/)
|
||||
})
|
||||
|
||||
test('maps transport and status fields instead of treating container mode as transport mode', () => {
|
||||
@@ -48,3 +49,17 @@ test('does not expose the contradictory backend rejected state in the client mod
|
||||
assert.match(storeSource, /status === 'REJECTED'\) return 'PENDING_REVIEW'/)
|
||||
assert.match(storeSource, /item\.toStatus === 'SUBMITTED' \|\| item\.toStatus === 'REJECTED' \? 'SUBMITTED'/)
|
||||
})
|
||||
|
||||
test('maps backend warehouse snapshots and fulfillment courier fields', () => {
|
||||
assert.match(storeSource, /order\.receivingWarehouseAddress/)
|
||||
assert.match(storeSource, /order\.expressCompany \?\? ''/)
|
||||
assert.match(storeSource, /order\.expressTrackingNo \?\? ''/)
|
||||
assert.match(storeSource, /getMerchantWarehouseDetail\(id\)/)
|
||||
assert.match(storeSource, /receivingCapability\.cutoffTime/)
|
||||
})
|
||||
|
||||
test('keeps failed order loads distinct from empty results', () => {
|
||||
assert.match(storeSource, /const loadError = ref\(''\)/)
|
||||
assert.match(storeSource, /loadError\.value = error instanceof Error/)
|
||||
assert.match(storeSource, /return \{ orders, warehouses, loading, loadedFromApi, loadError/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user