This commit is contained in:
2026-09-15 09:58:15 +08:00
parent 3f998bdb88
commit 4bf66d9571
90 changed files with 1599 additions and 1388 deletions
@@ -64,6 +64,20 @@ describe('overseas master data failed writes preserve editor context', () => {
vi.mocked(api.getVehicle).mockResolvedValue(vehicle)
})
it.each([
[OverseasQuotesView, ['详情', '编辑', '停用']],
[VehiclesView, ['查看', '编辑', '状态']],
[ExchangeRatesView, ['编辑', '停用']],
])('keeps all available actions visible without an unnecessary overflow menu', async (component, labels) => {
const wrapper = mountView(component)
await flushPromises()
const actions = wrapper.get('.density-actions')
const expected = component === OverseasQuotesView ? ['详情', '编辑', '启用'] : labels
expect(actions.findAll('button').map(button => button.text().trim())).toEqual(expected)
expect(actions.findAll('button').every(button => button.classes().includes('density-action'))).toBe(true)
expect(actions.find('el-dropdown-stub').exists()).toBe(false)
})
it('keeps quote edit open, sends only update fields, and shows A0409 request ID', async () => {
vi.mocked(api.updateQuote).mockRejectedValue(new ApiResponseError('记录版本已变化', 'A0409', 200, null, 'req-quote-409'))
const wrapper = mountView(OverseasQuotesView)