24 lines
1023 B
TypeScript
24 lines
1023 B
TypeScript
import { readFileSync } from 'node:fs'
|
|||
|
|
import { resolve } from 'node:path'
|
||
|
|
import { describe, expect, it } from 'vitest'
|
||
|
|
|
||
|
|
const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/components/OrderFulfillmentTreePanel.vue'), 'utf8')
|
||
|
|
|
||
|
|
describe('OrderFulfillmentTreePanel contract', () => {
|
||
|
|
it('shows root conservation fields and fragment picking quantities', () => {
|
||
|
|
for (const label of ['原始总量', '累计已装', '当前余量', '本单计划', '已拣', '未拣']) {
|
||
|
|
expect(source).toContain(label)
|
||
|
|
}
|
||
|
|
expect(source).toContain('历史双子单模型')
|
||
|
|
expect(source).toContain('新拆分不会再生成已装子单')
|
||
|
|
})
|
||
|
|
|
||
|
|
it('covers loading, error, empty and responsive states', () => {
|
||
|
|
expect(source).toContain('正在加载拆分履约')
|
||
|
|
expect(source).toContain('拆分履约暂时无法加载')
|
||
|
|
expect(source).toContain('<ApiErrorMeta')
|
||
|
|
expect(source).toContain('暂无拆分分片')
|
||
|
|
expect(source).toContain('@media (max-width: 720px)')
|
||
|
|
})
|
||
|
|
})
|