1
This commit is contained in:
@@ -129,6 +129,20 @@ describe('FinanceCustomerArapView G2 operations', () => {
|
||||
expect(adjustFinanceFeeSource).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('uses sourceSystem to suppress Firstleg editing when the source type is not in the legacy fallback list', async () => {
|
||||
const firstlegOtherType = { ...feeSummary, sourceType: 'ORDER_FEE', reviewStatus: 'DRAFT' as const }
|
||||
vi.mocked(listFinanceFeeSources).mockResolvedValue({ records: [firstlegOtherType], total: 1, pages: 1 })
|
||||
const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:finance:fee-source:edit'])
|
||||
await loadRows(wrapper)
|
||||
|
||||
const buttonLabels = wrapper.findAll('button').map((button) => button.text())
|
||||
expect(buttonLabels).not.toContain('缂栬緫')
|
||||
const vm = wrapper.vm as unknown as { openMutation(row: Record<string, unknown>, mode: 'EDIT'): Promise<void> }
|
||||
await vm.openMutation(firstlegOtherType as unknown as Record<string, unknown>, 'EDIT')
|
||||
expect(getFinanceFeeSource).not.toHaveBeenCalled()
|
||||
expect(editFinanceFeeSource).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('loads all customers by default and keeps explicit customer filtering', async () => {
|
||||
const wrapper = await mountView(['platform:finance:customer-arap:list', 'platform:customer:list'])
|
||||
expect(listFinanceFeeSources).toHaveBeenCalledWith(expect.objectContaining({ page: 1, size: 20, customerId: undefined, direction: undefined }))
|
||||
|
||||
Reference in New Issue
Block a user