优化
This commit is contained in:
@@ -137,11 +137,11 @@ test('downloads selected carton labels with one array request', () => {
|
||||
test('exports every visible order field with normalized dates', () => {
|
||||
assert.match(source, /function formatExportDateTime\(value: string \| null \| undefined\)/)
|
||||
assert.match(source, /return `\$\{date\.getFullYear\(\)\}-\$\{pad\(date\.getMonth\(\) \+ 1\)\}-\$\{pad\(date\.getDate\(\)\)\} \$\{pad\(date\.getHours\(\)\)\}:\$\{pad\(date\.getMinutes\(\)\)\}:\$\{pad\(date\.getSeconds\(\)\)\}`/)
|
||||
for (const label of ['订单号', '入仓码', '渠道', '目的仓', '当前订单状态', '箱数', '快递公司', '快递单号', 'SKUS', '总毛重', '总净重', '总体积', '总数量', '计费单价', '计费体积', '计费重量', '备注', '货件编号', '跟踪编号', '国内仓入库时间', '业务日期', '创建时间']) {
|
||||
for (const label of ['订单号', '入仓码', '渠道', '目的仓', '当前订单状态', '箱数', '快递公司', '快递单号', 'SKUS', '总毛重', '总净重', '总体积', '总数量', '计费单价', '计费体积', '计费重量', '备注', '货件编号', '跟踪编号', '国内仓入库时间', '创建时间']) {
|
||||
assert.match(source, new RegExp(`'${label}'`))
|
||||
}
|
||||
assert.match(source, /formatExportDateTime\(order\.inboundedAt\)/)
|
||||
assert.match(source, /formatExportDateTime\(order\.businessDate\)/)
|
||||
assert.doesNotMatch(source, /formatExportDateTime\(order\.businessDate\)/)
|
||||
assert.match(source, /formatExportDateTime\(order\.createdAt\)/)
|
||||
})
|
||||
|
||||
@@ -156,7 +156,7 @@ test('matches the prototype with selectable dense order-list columns', () => {
|
||||
assert.match(source, />恢复默认<\/el-button>/)
|
||||
assert.match(source, /const visibleOrderColumns = computed/)
|
||||
assert.match(source, /:columns="visibleOrderColumns"/)
|
||||
for (const label of ['入仓码', '渠道', '目的仓', '当前订单状态', '箱数', '快递公司', '快递单号', 'SKUS', '总毛重', '总净重', '总体积', '总数量', '计费单价', '计费体积', '计费重量', '备注', '货件编号', '跟踪编号', '国内仓入库时间', '业务日期']) {
|
||||
for (const label of ['入仓码', '渠道', '目的仓', '当前订单状态', '箱数', '快递公司', '快递单号', 'SKUS', '总毛重', '总净重', '总体积', '总数量', '计费单价', '计费体积', '计费重量', '备注', '货件编号', '跟踪编号', '国内仓入库时间']) {
|
||||
assert.match(source, new RegExp(`label: '${label}'`))
|
||||
}
|
||||
assert.match(source, /order\.businessSummary\.totalPackageCount/)
|
||||
@@ -166,8 +166,8 @@ test('matches the prototype with selectable dense order-list columns', () => {
|
||||
assert.match(source, /<template #billingUnitPrice>-<\/template>/)
|
||||
assert.match(source, /<template #chargeableVolume>-<\/template>/)
|
||||
assert.match(source, /inboundedAt/)
|
||||
assert.match(source, /businessDate/)
|
||||
assert.match(source, /<template #businessDate>-<\/template>/)
|
||||
assert.doesNotMatch(source, /label: '业务日期'/)
|
||||
assert.doesNotMatch(source, /<template #businessDate>/)
|
||||
assert.match(source, /<template #createdAt="\{ row \}">\{\{ formatDateTime\(\(row as FirstLegOrder\)\.createdAt\) \}\}<\/template>/)
|
||||
assert.match(source, /order\.skuNos\.length/)
|
||||
assert.doesNotMatch(source, /pagedOrders[\s\S]{0,100}loadDetail/)
|
||||
|
||||
Reference in New Issue
Block a user