fix(acceptance): preserve calculated dropship fees

This commit is contained in:
2026-09-09 01:09:31 +08:00
parent 0d73e185c0
commit 2abbb3cc8f
5 changed files with 37 additions and 20 deletions
@@ -24,3 +24,13 @@ test('inbound fee lifecycle covers frozen source, version, publication and WAIT_
assert.match(source, /对客合计仅含已发布头程与已审核其他应收且其他应付单列/)
assert.doesNotMatch(source, /settlementIncluded|是否结算|参与结算/)
})
test('initial fee preparation is reusable without confirming or publishing the fee', async () => {
const source = await readFile(moduleFile, 'utf8')
assert.match(source, /export async function ensureInitialCalculated/)
const helper = source.slice(source.indexOf('export async function ensureInitialCalculated'), source.indexOf('export async function run'))
assert.match(helper, /\/fees\/latest/)
assert.match(helper, /\/fees\/calculate/)
assert.match(helper, /feeStatus === 'CALCULATED'/)
assert.doesNotMatch(helper, /\/fees\/confirm|\/fees\/send/)
})