This commit is contained in:
2026-10-22 11:56:47 +08:00
parent 5d71af1ac9
commit de96e47d74
71 changed files with 1296 additions and 332 deletions
@@ -7,6 +7,21 @@ import { run, selectCurrentInboundPlan } from './phase4-overseas-finance-cross-r
const source = readFileSync(fileURLToPath(new URL('./phase4-overseas-finance-cross-region.mjs', import.meta.url)), 'utf8')
test('current plan on second page is used instead of historical first-page plans', async () => {
const context = fixture(), request = context.request.bind(context), pages = []
context.request = async (method, path, ...args) => {
if (path.startsWith('/api/platform/v1/last-leg/inbound-plans?')) {
pages.push(path)
if (path.includes('page=1&')) return response({ records: [{ planId: '9999', planNo: 'OLD', customerId: '2001' }], size: 200, total: 201 })
}
return request(method, path, ...args)
}
await run(context)
assert.equal(pages.length, 2)
assert.ok(context.steps.find(step => step.name === '海外入仓费用关联真实计划')?.passed)
assert.equal(context.calls.some(call => call.method === 'POST' && call.body?.businessId === '9999'), false)
})
test('inbound fees cannot select historical plans or another customer under a fixed account', () => {
const current = { planId: '4001', planNo: 'CURRENT', customerId: '2001' }
const old = { planId: '3999', planNo: 'OLD', customerId: '2001' }