This commit is contained in:
2026-08-15 12:12:38 +08:00
parent e000f8bed2
commit e214672779
4 changed files with 87 additions and 16 deletions
@@ -95,6 +95,34 @@ describe('GlobalSmartLoadingView', () => {
expect(wrapper.text()).not.toContain('LP-99')
})
it('explains simulated empty cabinets instead of presenting an internal id as a container number', async () => {
vi.mocked(listContainers).mockResolvedValue({
records: [{
...container,
cabinetNo: '2088475410134773762',
containerNo: null,
channelName: '美森正班海卡包税',
warehouseName: '义乌国内仓',
containerType: '40HQ',
}],
page: 1,
size: 100,
total: 1,
pages: 1,
})
const wrapper = mount(GlobalSmartLoadingView, { global: { plugins: [ElementPlus] } })
await flushPromises()
const option = wrapper.find('.container-option')
expect(option.text()).toContain('模拟柜次')
expect(option.text()).toContain('模拟柜次:真实柜号待录入')
expect(option.text()).toContain('真实柜号:待录入')
expect(option.text()).toContain('渠道:美森正班海卡包税')
expect(option.text()).toContain('仓库:义乌国内仓')
expect(option.text()).toContain('柜型:40HQ')
expect(option.text()).not.toContain('2088475410134773762')
})
it('groups containers by channel and reloads candidates when the channel changes', async () => {
const other = {
...container,
@@ -318,6 +346,8 @@ describe('GlobalSmartLoadingView', () => {
expect(source).toContain('overflow-wrap: anywhere;')
expect(source).toContain('.candidate-pane,.plan-pane { height: min(68vh, 560px); min-height: 420px; }')
expect(source).toContain('.container-pane { max-height: min(58vh, 460px); }')
expect(source).toContain('grid-template-columns: minmax(390px, 1.1fr) minmax(320px, .9fr) minmax(460px, 1.35fr)')
expect(source).toContain('min-height: 112px')
})
it('uses overflow-aware channel tabs with a compact right-aligned summary', () => {