优化
This commit is contained in:
@@ -48,6 +48,11 @@ test('declares the final C02 row and detail contract in the API adapter', () =>
|
||||
assert.match(unifiedApiSource, /error\.status === 404 \|\| error\.code === 'A0404'/)
|
||||
})
|
||||
|
||||
test('keeps unified order pagination valid when the store omits page and size', () => {
|
||||
assert.match(unifiedApiSource, /const \{ page, size, \.\.\.filters \} = params/)
|
||||
assert.match(unifiedApiSource, /params: \{ page: page \?\? 1, size: size \?\? 200, \.\.\.filters \}/)
|
||||
})
|
||||
|
||||
test('keeps drafts on the legacy read path without assigning a unified main status', () => {
|
||||
assert.match(storeSource, /getMerchantFirstLegOrders\(legacyQuery\(query, 'DRAFT'\)\)/)
|
||||
assert.match(storeSource, /getById\(id\)\?\.status === 'DRAFT' \? loadLegacyDetail\(id\) : loadUnifiedDetail\(id\)/)
|
||||
@@ -85,8 +90,7 @@ test('sends backend-required channel, customs, destination and cargo fields', ()
|
||||
test('separates domestic receiving warehouses from public destinations', () => {
|
||||
assert.match(apiSource, /warehouseType\?: MerchantWarehouseType/)
|
||||
assert.match(apiSource, /params: \{ page: 1, size: 200, status: 'ACTIVE', \.\.\.params \}/)
|
||||
assert.match(storeSource, /getMerchantWarehouses\(\{ warehouseType: warehouseType as MerchantWarehouseType, page, size: 200 \}\)/)
|
||||
assert.match(storeSource, /while \(page <= pages\)/)
|
||||
assert.match(storeSource, /loadAllWarehouseRecords\(warehouseType, getMerchantWarehouses\)/)
|
||||
assert.match(storeSource, /loadWarehouseType\('DOMESTIC', true\)/)
|
||||
assert.match(storeSource, /warehouse\.warehouseType !== 'DOMESTIC'/)
|
||||
assert.match(storeSource, /item\.warehouseType === draft\.destinationType/)
|
||||
|
||||
Reference in New Issue
Block a user