优化
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user