优化
This commit is contained in:
@@ -141,6 +141,36 @@ describe('LoadingListsView', () => {
|
||||
expect(detailSource).toContain(':columns="itemColumns"\n stripe')
|
||||
})
|
||||
|
||||
it('shows every prototype detail field that is backed by the loading item contract', () => {
|
||||
const fields = [
|
||||
'chineseName',
|
||||
'englishName',
|
||||
'netWeightKg',
|
||||
'packageCount',
|
||||
'palletCount',
|
||||
'volumeCbm',
|
||||
'grossWeightKg',
|
||||
'dimensionalWeightKg',
|
||||
'productQuantity',
|
||||
'unitsPerPackage',
|
||||
'fbaTrackingNo',
|
||||
'shipmentNo',
|
||||
'shippingMark',
|
||||
'internalRemark',
|
||||
'customerRemark',
|
||||
'warehouseRemark',
|
||||
'customsDocument',
|
||||
]
|
||||
let previous = detailSource.indexOf("key: 'customerName'")
|
||||
for (const field of fields) {
|
||||
const current = detailSource.indexOf(`key: '${field}'`, previous + 1)
|
||||
expect(current, field).toBeGreaterThan(previous)
|
||||
previous = current
|
||||
}
|
||||
expect(detailSource).not.toContain("key: 'goodsImageUrl'")
|
||||
expect(detailSource).not.toContain("label: '退税资料'")
|
||||
})
|
||||
|
||||
it('does not expose unknown history action codes', () => {
|
||||
expect(detailSource).toContain("CONFIRM_PRELOAD: '确认预装'")
|
||||
expect(detailSource).toContain("[action] || '状态更新'")
|
||||
|
||||
Reference in New Issue
Block a user