优化
This commit is contained in:
@@ -52,6 +52,20 @@ describe('CustomerBillingRulesPanel', () => {
|
||||
expect(document.body.textContent).toContain('标准中箱')
|
||||
})
|
||||
|
||||
it('hides permission codes in the no-access state', async () => {
|
||||
const auth = useAuthStore()
|
||||
auth.permissions = []
|
||||
useAccessPreviewStore().initializeAfterLogin()
|
||||
|
||||
mount(CustomerBillingRulesPanel, { attachTo: document.body, props: { customerId: '8', customerName: '柏悦物流' }, global: { plugins: [ElementPlus] } })
|
||||
await flushPromises()
|
||||
|
||||
expect(document.body.textContent).toContain('暂无尺寸计算规则查看权限')
|
||||
expect(document.body.textContent).toContain('请联系管理员申请尺寸计算规则查看权限')
|
||||
expect(document.body.textContent).not.toContain('firstleg:dimension-config:view')
|
||||
expect(getCustomerDimensionConfig).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('submits all four rows in one update request', async () => {
|
||||
mount(CustomerBillingRulesPanel, { attachTo: document.body, props: { customerId: '8', customerName: '柏悦物流' }, global: { plugins: [ElementPlus] } })
|
||||
await flushPromises()
|
||||
|
||||
Reference in New Issue
Block a user