fix: 回调配置, 调整信用位置, 套餐
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m55s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m55s
This commit is contained in:
@@ -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()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user