优化
This commit is contained in:
@@ -71,6 +71,16 @@ describe('InboundFeeDetailManager', () => {
|
||||
expect(source).toMatch(/size="small" plain type="danger"[^>]+[^>]*>\s*<X/)
|
||||
})
|
||||
|
||||
it('keeps FBA_PRICING rows derived and read-only regardless of write permissions', async () => {
|
||||
vi.mocked(listInboundFeeDetails).mockResolvedValue([{ ...approved, sourceType: 'FBA_PRICING' }])
|
||||
const wrapper = mountManager(['firstleg:inbound:fee-detail:view', 'firstleg:inbound:fee-detail:edit', 'firstleg:inbound:fee-detail:delete', 'firstleg:inbound:fee-detail:review'])
|
||||
await flushPromises()
|
||||
const row = wrapper.find('.el-table__row')
|
||||
expect(row.text()).toContain('头程派生')
|
||||
const buttons = row.findAll('button').map((button) => button.text())
|
||||
for (const action of ['编辑', '审核', '驳回', '调整', '作废', '删除']) expect(buttons).not.toContain(action)
|
||||
})
|
||||
|
||||
it('does not request or expose fee rows without view permission', async () => {
|
||||
mountManager([]); await flushPromises()
|
||||
expect(listInboundFeeDetails).not.toHaveBeenCalled()
|
||||
|
||||
Reference in New Issue
Block a user