This commit is contained in:
2026-08-17 19:13:25 +08:00
parent 28f2cd4cc5
commit d618683467
22 changed files with 263 additions and 50 deletions
@@ -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()