feat(appointment): complete customer receiving and trip continuation workflows
This commit is contained in:
@@ -5,6 +5,17 @@ import { workCalendar } from './work.test-support'
|
||||
import { workTypes } from './workApi'
|
||||
function render() { return mount(WorkCalendarPanel, { props: { anchor: '2026-10-15', mode: 'month', flow: '', types: [...workTypes], calendar: workCalendar, loading: false, failed: false, reference: false, arrivals: [], referenceReady: false } }) }
|
||||
afterEach(() => vi.useRealTimers())
|
||||
it('keeps a busy day at five type summaries and consumes authoritative transport counts unchanged', async () => {
|
||||
const wrapper = render()
|
||||
const counts = { PICKUP: 300, WAREHOUSE_RECEIPT: 300, DELIVERY: 2, TRANSPORT: 1, EMPTY_RETURN: 300 }
|
||||
await wrapper.setProps({ calendar: { ...workCalendar, days: [{ ...workCalendar.days[0]!, total: 903, typeCounts: counts }] } })
|
||||
const day = wrapper.get('[data-date="2026-10-15"]')
|
||||
expect(day.findAll('.type-counts button')).toHaveLength(5)
|
||||
expect(day.get('[data-type="TRANSPORT"]').text()).toContain('1')
|
||||
expect(day.get('[data-type="DELIVERY"]').text()).toContain('2')
|
||||
await day.get('[data-type="TRANSPORT"]').trigger('click')
|
||||
expect(wrapper.emitted('day')).toEqual([['2026-10-15', 'TRANSPORT']]); wrapper.unmount()
|
||||
})
|
||||
it('offers all four flows directly and emits the original filter values with an exclusive selection', async () => {
|
||||
const wrapper = render()
|
||||
const buttons = wrapper.findAll('.flow-controls button')
|
||||
|
||||
Reference in New Issue
Block a user