This commit is contained in:
2026-08-18 16:09:43 +08:00
parent f9ae2d94cb
commit 21249d1dde
52 changed files with 980 additions and 698 deletions
@@ -87,6 +87,18 @@ describe('InboundFeeDetailManager', () => {
expect(document.body.textContent).toContain('没有查看费用明细的权限')
})
it.each(['', ' ', 'null', 'undefined'])('does not request fee rows for invalid inboundId %j', async (inboundId) => {
const pinia = createPinia(); setActivePinia(pinia)
const auth = useAuthStore(); auth.token = 'token'; auth.permissions = ['firstleg:inbound:fee-detail:view']
useAccessPreviewStore().initializeAfterLogin()
mount(InboundFeeDetailManager, {
props: { accountId: '100', inboundId },
global: { plugins: [pinia, ElementPlus] },
})
await flushPromises()
expect(listInboundFeeDetails).not.toHaveBeenCalled()
})
it('approves a pending fee then refreshes rows and emits changed', async () => {
const wrapper = mountManager(['firstleg:inbound:fee-detail:view', 'firstleg:inbound:fee-detail:review'])
await flushPromises()