优化
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import test from 'node:test'
|
||||
|
||||
const entry = new URL('../admin-test-env-acceptance.mjs', import.meta.url)
|
||||
const moduleFile = new URL('./inbound-fees.mjs', import.meta.url)
|
||||
|
||||
test('admin full acceptance registers inbound fee lifecycle after measurement', async () => {
|
||||
const source = await readFile(entry, 'utf8')
|
||||
assert.match(source, /'inbound-measurement', 'inbound-fees', 'phase3-container-loading'/)
|
||||
assert.match(source, /normalized\.includes\('inbound-fees'\)/)
|
||||
assert.match(source, /\['merchant-qualification-fixture', 'orders', 'inbound-measurement'\]/)
|
||||
})
|
||||
|
||||
test('inbound fee lifecycle covers frozen source, version, publication and WAIT_SPLIT contracts', async () => {
|
||||
const source = await readFile(moduleFile, 'utf8')
|
||||
for (const token of [
|
||||
'/fees/latest', '/fees/published', '/fees/confirm', '/fees/send', '/fee-details',
|
||||
'FBA_PRICING', 'MANUAL', 'CALCULATED', 'CONFIRMED', 'SENT', 'PUBLISHED',
|
||||
'sourceFeeVersion', 'reviewStatus', 'publicationStatus', 'settlementIncluded', 'WAIT_SPLIT',
|
||||
]) assert.match(source, new RegExp(token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')))
|
||||
assert.match(source, /人工发布头程费用并触发 Finance Outbox/)
|
||||
assert.match(source, /对客合计仅含已发布头程与已审核其他应收且其他应付单列/)
|
||||
})
|
||||
Reference in New Issue
Block a user