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/components/InboundWorkflowWorkspace.vue'), 'utf8') const measurementDialogSource = readFileSync(resolve(process.cwd(), 'src/modules/inbounds/measurement/InboundMeasurementDialog.vue'), 'utf8') describe('InboundWorkflowWorkspace', () => { it('assembles every phase-two inbound domain behind one server-backed workspace', () => { expect(source).toContain('InboundSummaryPanel') expect(source).toContain('InboundHistoryPanel') expect(source).toContain('InboundMeasurementDialog') expect(source).toContain('MeasurementReviewPanel') expect(source).toContain('InboundFeePanel') expect(source).toContain('getPlatformInbound') expect(source).toContain('StatusBadge') expect(source).toContain('label="基本信息"') expect(source).toContain('label="货品与测量"') expect(source).toContain('label="测量审核"') expect(source).toContain('label="费用信息"') expect(source).toContain('label="状态历史"') expect(source).toContain("detail.summary.fulfillmentType === 'ONE_CLICK_DROPSHIP' ? '清点组托与其他记录' : '其他记录'") expect(source).toContain('listPlatformInboundDropshipPallets(props.customerId, props.inboundId)') }) it('opens measurement editing and review in prototype-sized centered dialogs', () => { expect(source).toContain(' { expect(source).toContain('@click="measurementDialogOpen = true"') expect(source).toContain('@click="reviewDialogOpen = true"') expect(source).toContain(':key="`review-dialog-${revision}`"') expect(source).toContain(':customer-name="detail?.summary.customerName || detail?.summary.companyName"') expect(source).toContain(':customer-name="detail?.summary.customerName || detail?.summary.companyName"') expect(source).toContain(':channel-name="detail?.summary.channelName"') expect(source).toContain('@changed="handleReviewChanged"') expect(source).not.toContain('