diff --git a/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.test.tsx b/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.test.tsx index ef36486f..d22a9195 100644 --- a/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.test.tsx +++ b/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.test.tsx @@ -1,13 +1,37 @@ import { act, fireEvent, render, screen, waitFor, within } from '@testing-library/react' import BomCostingWorkbenchClient, { formatBomCategorySkillVersionHint, + getHistoryStatusDotClass, + getHistoryStatusLabel, } from './BomCostingWorkbenchClient' +import type { BomCostingCaseSummary } from '@/lib/bom-costing/client-types' jest.mock('@/components/platform/AssetWorkbenchEmptyBackdrop', () => ({ AssetWorkbenchEmptyBackdrop: () =>
, })) describe('BomCostingWorkbenchClient', () => { + it('整件预估完成但结构待复核时,历史状态点仍表示完成', () => { + const item: BomCostingCaseSummary = { + id: 'case-structure-review', + title: '结构待复核但预估完成的案例', + status: 'READY', + progress: 100, + statusMessage: '整件预估已生成,结构差异待复核', + needsPriceReview: true, + sourceCacheHit: true, + storedImageCount: 79, + failedImageCount: 0, + createdById: 'user-1', + createdAt: '2026-08-18T00:00:00.000Z', + skuCount: 15, + estimatedCostRange: { min: 432.9, max: 930.38 }, + } + + expect(getHistoryStatusLabel(item)).toBe('预估完成(结构待复核)') + expect(getHistoryStatusDotClass(item)).toBe('bg-[#3f8a68]') + }) + it('旧结果 Skill 与当前版本不同时分别标明,且不把旧结果冒充为新版本', () => { expect(formatBomCategorySkillVersionHint({ resultVersion: 'bom-category-skill/cabinet-bookshelf/v1', diff --git a/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.tsx b/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.tsx index 401e5e1b..210d1ccb 100644 --- a/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.tsx +++ b/furniture-3d-system/src/app/bom-costing/BomCostingWorkbenchClient.tsx @@ -129,7 +129,7 @@ const STATUS_DOT_CLASSES: Record