2026-08-04 21:01:39 +08:00
|
|
|
import { readFileSync } from 'node:fs'
|
|
|
|
|
import { resolve } from 'node:path'
|
|
|
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
|
|
|
|
|
|
const source = readFileSync(resolve(process.cwd(), 'src/modules/inbounds/pages/InboundOrderDetailView.vue'), 'utf8')
|
|
|
|
|
|
|
|
|
|
describe('InboundOrderDetailView', () => {
|
|
|
|
|
it('maps the compatible route parameter to customer context without a detail-page selector', () => {
|
|
|
|
|
expect(source).toContain('route.query.tenantId')
|
|
|
|
|
expect(source).toContain('const customerId = computed')
|
|
|
|
|
expect(source).toContain("name: 'inbound-orders'")
|
|
|
|
|
expect(source).toContain(':customer-id="customerId"')
|
|
|
|
|
expect(source).toContain(':inbound-id="inboundId"')
|
|
|
|
|
expect(source).toContain('缺少所属企业信息,请从入库单列表重新打开')
|
|
|
|
|
expect(source).not.toContain('PlatformTenantSelector')
|
|
|
|
|
expect(source).not.toContain('租户')
|
2026-08-10 16:24:54 +08:00
|
|
|
expect(source).toContain('<PageToolbar title="入库单详情"')
|
2026-08-06 13:56:04 +08:00
|
|
|
expect(source).toContain('货品与测量、费用信息、状态历史及其他记录')
|
2026-08-04 21:01:39 +08:00
|
|
|
expect(source).toContain('class="surface-panel detail-page"')
|
|
|
|
|
expect(source).toContain('class="detail-page-actions"')
|
|
|
|
|
expect(source).toContain('返回入库单列表')
|
|
|
|
|
})
|
|
|
|
|
})
|