fix: 回调配置, 调整信用位置, 套餐
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m55s

This commit is contained in:
luo
2026-07-29 18:20:42 +08:00
parent 4394ae0f78
commit 17d2eeebc5
39 changed files with 2687 additions and 1532 deletions

View File

@@ -50,13 +50,13 @@ async function importBundledActions() {
}
}
test('pending agent recharge exposes reject action for admins with rejection permission', async () => {
test('pending offline recharge exposes reject action for admins with rejection permission', async () => {
const { module, cleanup } = await importBundledActions()
const { buildAgentRechargeActions } = module
const row = {
id: 42,
status: 1,
payment_method: 'wechat',
payment_method: 'offline',
payment_voucher_key: []
}
const handledRows = []
@@ -108,3 +108,27 @@ test('non-pending agent recharge does not expose reject action', async () => {
await cleanup()
}
})
test('pending online recharge does not expose offline reject action', async () => {
const { module, cleanup } = await importBundledActions()
const { buildAgentRechargeActions } = module
const row = {
id: 42,
status: 1,
payment_method: 'wechat',
payment_voucher_key: []
}
try {
const actions = buildAgentRechargeActions(row, {
hasAuth: (permission) => permission === 'agent_recharge:reject',
onViewPaymentVoucher: () => {},
onConfirmPayment: () => {},
onReject: () => {}
})
assert.deepEqual(actions, [])
} finally {
await cleanup()
}
})