补齐海外出库状态展示
This commit is contained in:
@@ -12,7 +12,7 @@ vi.mock('../api/outbounds', () => ({ getOutbound: vi.fn(), cancelOutbound: vi.fn
|
||||
|
||||
describe('OutboundDetailView', () => {
|
||||
it.each([
|
||||
['WAIT_OUTBOUND', '待出库', 'warning'], ['PICKING', '拣货中', 'info'],
|
||||
['WAIT_PICK', '待拣货', 'warning'], ['WAIT_OUTBOUND', '待出库', 'warning'], ['PICKING', '拣货中', 'info'],
|
||||
['PICKED', '已拣货', 'warning'], ['OUTBOUNDED', '已出库', 'success'], ['CANCELLED', '已取消', 'danger'],
|
||||
])('uses the same shared status tone as the list for %s', async (status, label, tone) => {
|
||||
vi.mocked(getOutbound).mockResolvedValueOnce({ outbound: { id: '1', outboundNo: 'OUT/1', status }, pallets: [], deliveries: [] })
|
||||
@@ -78,8 +78,9 @@ describe('OutboundDetailView', () => {
|
||||
emptyWrapper.unmount()
|
||||
})
|
||||
|
||||
it('shows cancellation only for PICKED with the independent permission', async () => {
|
||||
it('shows cancellation only before picking with the independent permission', async () => {
|
||||
canPermission.mockImplementation((code: string) => code === 'platform:overseas-warehouse:outbound:cancel')
|
||||
vi.mocked(getOutbound).mockResolvedValueOnce({ outbound: { id: '1', outboundNo: 'OUT/1', status: 'WAIT_PICK' }, pallets: [], deliveries: [] })
|
||||
const wrapper = mount(OutboundDetailView, { global: { plugins: [ElementPlus] } })
|
||||
await flushPromises()
|
||||
expect(wrapper.text()).toContain('取消出库单')
|
||||
|
||||
Reference in New Issue
Block a user