fix(admin): polish phase five overseas pages

This commit is contained in:
2026-09-03 17:17:11 +08:00
parent a9bfa69e67
commit 393d32bcd9
6 changed files with 71 additions and 11 deletions
@@ -26,6 +26,28 @@ describe('ExceptionOrdersView permissions and creation', () => {
wrapper.unmount()
})
it('keeps the detail action available and hides numeric operator identifiers', async () => {
vi.mocked(listExceptionOrders).mockResolvedValue({
records: [{
id: '19', exceptionNo: 'EXC-1', exceptionType: 'DAMAGED', status: 'PROCESSING', reason: '包装破损',
customerId: '100', customerName: '示例客户', overseasWarehouseName: '洛杉矶仓', handlerName: '1000001',
exceptionAt: '2026-09-03T09:00:00', updatedAt: '2026-09-03T10:00:00',
}],
page: 1, size: 10, total: 1, pages: 1,
})
const wrapper = mountView()
await flushPromises()
const table = wrapper.find('[data-testid="data-table"]')
expect(table.text()).toContain('查看')
await table.find('button').trigger('click')
await flushPromises()
const detail = wrapper.find('[data-dialog="异常订单详情"]')
expect(detail.text()).toContain('示例客户')
expect(detail.text()).toContain('包装破损')
expect(detail.text()).not.toContain('1000001')
wrapper.unmount()
})
it('validates the required relation before submitting', async () => {
canPermission.mockImplementation(code => code.endsWith(':create'))
const wrapper = mountView()