feat(platform): refine vehicle detail evidence wording
This commit is contained in:
@@ -11016,18 +11016,18 @@ test('switches vehicle detail to a source from the source matrix', async () => {
|
||||
expect(screen.getAllByText('GB32960 在线').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('JT808 在线').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('YUTONG_MQTT 未接入').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('多源归并矩阵')).toBeInTheDocument();
|
||||
expect(screen.getByText('主实时来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('多证据归并矩阵')).toBeInTheDocument();
|
||||
expect(screen.getByText('主实时证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('定位证据').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('统计口径').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('无实时字段')).toBeInTheDocument();
|
||||
expect(screen.getByText('无原始记录')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制归并矩阵' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【单车多源归并矩阵】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. GB32960 / 主来源'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('贡献:主实时来源、在线心跳、实时字段、定位证据、轨迹回放、原始记录、统计口径'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【单车多证据归并矩阵】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. GB32960 / 主证据'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('贡献:主实时证据、在线心跳、实时字段、定位证据、轨迹回放、原始记录、统计口径'));
|
||||
expect(screen.getByText('车辆服务角色')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('主来源').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('主证据').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('在线证据').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('暂无来源').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('最新位置')).toBeInTheDocument();
|
||||
@@ -11382,8 +11382,8 @@ test('shows vehicle service evidence chain before source details', async () => {
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('车辆服务证据链')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('2/3 来源在线').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('2 个来源有位置').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('2/3 在线').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('2 个证据有位置').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('1.4 km').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('125 秒').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('MQTT 离线,32960 与 808 仍可支撑车辆服务').length).toBeGreaterThan(0);
|
||||
@@ -11635,7 +11635,7 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(await screen.findByText('车辆运营总览')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: /复制归一摘要/ })).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆身份')).toBeInTheDocument();
|
||||
expect(screen.getByText('实时主来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('实时主证据来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('业务可用性')).toBeInTheDocument();
|
||||
expect(await screen.findByText('车辆服务结论')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆服务档案总览')).toBeInTheDocument();
|
||||
@@ -11656,8 +11656,8 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(unifiedCopied).toContain('当前范围:单一来源:JT808');
|
||||
expect(unifiedCopied).toContain('车辆身份:VIN-SUMMARY-001');
|
||||
expect(unifiedCopied).toContain('服务状态:来源不完整');
|
||||
expect(unifiedCopied).toContain('实时主来源:JT808');
|
||||
expect(unifiedCopied).toContain('来源在线:1/2');
|
||||
expect(unifiedCopied).toContain('实时主证据来源:JT808');
|
||||
expect(unifiedCopied).toContain('证据在线:1/2');
|
||||
expect(unifiedCopied).toContain('业务可用性:在线可用');
|
||||
expect(unifiedCopied).toContain('服务数据:实时 2 / 轨迹 12 / 原始记录 34 / 里程 3 / 告警 1');
|
||||
expect(unifiedCopied).toContain('车辆服务:http://localhost:3000/#/detail?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
@@ -11669,8 +11669,8 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(dossierCopied).toContain('【车辆服务档案】');
|
||||
expect(dossierCopied).toContain('车辆:粤A诊断1 / VIN-SUMMARY-001');
|
||||
expect(dossierCopied).toContain('当前范围:单一来源:JT808');
|
||||
expect(dossierCopied).toContain('主来源:JT808');
|
||||
expect(dossierCopied).toContain('来源在线:1/2');
|
||||
expect(dossierCopied).toContain('主证据来源:JT808');
|
||||
expect(dossierCopied).toContain('证据在线:1/2');
|
||||
expect(dossierCopied).toContain('资产概览:实时 2 / 轨迹 12 / 原始记录 34 / 里程 3 / 告警 1');
|
||||
expect(dossierCopied).toContain('车辆服务:http://localhost:3000/#/detail?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
fireEvent.click(screen.getByRole('button', { name: /复制交付包/ }));
|
||||
@@ -11697,8 +11697,8 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(copied).toContain('车辆:粤A诊断1 / VIN-SUMMARY-001');
|
||||
expect(copied).toContain('当前范围:单一来源:JT808');
|
||||
expect(copied).toContain('服务状态:来源不完整');
|
||||
expect(copied).toContain('来源证据:1/2 来源在线');
|
||||
expect(copied).toContain('定位证据:2 个来源有位置');
|
||||
expect(copied).toContain('证据来源:1/2 在线');
|
||||
expect(copied).toContain('定位证据:2 个证据有位置');
|
||||
expect(copied).toContain('里程差异:12.6 km');
|
||||
expect(copied).toContain('时间差异:90 秒');
|
||||
expect(copied).toContain('服务数据:实时 2 / 轨迹 12 / 原始记录 34 / 里程 3 / 告警 1');
|
||||
@@ -11719,11 +11719,11 @@ test('copies vehicle service diagnostic summary', async () => {
|
||||
expect(operationsCopied).toContain('车辆:粤A诊断1 / VIN-SUMMARY-001');
|
||||
expect(operationsCopied).toContain('当前范围:单一来源:JT808');
|
||||
expect(operationsCopied).toContain('服务状态:来源不完整');
|
||||
expect(operationsCopied).toContain('在线来源:1/2');
|
||||
expect(operationsCopied).toContain('定位来源:2');
|
||||
expect(operationsCopied).toContain('在线证据:1/2');
|
||||
expect(operationsCopied).toContain('定位证据:2');
|
||||
expect(operationsCopied).toContain('质量问题:1 项');
|
||||
expect(operationsCopied).toContain('下一步清单:');
|
||||
expect(operationsCopied).toContain('补齐 YUTONG_MQTT 来源');
|
||||
expect(operationsCopied).toContain('补齐 YUTONG_MQTT 证据');
|
||||
expect(operationsCopied).toContain('排查 GB32960 离线');
|
||||
expect(operationsCopied).toContain('处理质量问题 1 项');
|
||||
expect(operationsCopied).toContain('车辆服务:http://localhost:3000/#/detail?keyword=VIN-SUMMARY-001&protocol=JT808');
|
||||
@@ -12442,13 +12442,13 @@ test('shows cross-source consistency for one vehicle service', async () => {
|
||||
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('跨来源一致性')).toBeInTheDocument();
|
||||
expect(await screen.findByText('跨证据一致性')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('来源不完整').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('2/3 个来源在线,车辆服务可用但缺少 YUTONG_MQTT 来源。').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('3 个来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('2/3 在线')).toBeInTheDocument();
|
||||
expect(screen.getByText('缺失来源')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('3 个来源有位置').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('3 个证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('2/3 在线').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('缺失证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('3 个证据有位置').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('0.4 km').length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText('35 秒').length).toBeGreaterThan(0);
|
||||
fireEvent.click(screen.getByRole('button', { name: '查看缺 YUTONG_MQTT 车辆' }));
|
||||
@@ -12553,11 +12553,11 @@ test('shows actionable vehicle service recommendations on detail', async () => {
|
||||
expect(screen.getByText('3 项质量问题影响可信度')).toBeInTheDocument();
|
||||
expect(screen.getByText('先处理质量问题,再将该车用于 BI、告警或对外查询。')).toBeInTheDocument();
|
||||
expect(await screen.findByText('服务处置建议')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '补齐 YUTONG_MQTT 来源' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '补齐 YUTONG_MQTT 证据' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '处理质量问题 3 项' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '排查 YUTONG_MQTT 离线' })).toBeInTheDocument();
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '补齐 YUTONG_MQTT 来源' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '补齐 YUTONG_MQTT 证据' }));
|
||||
expect(window.location.hash).toBe('#/vehicles?serviceStatus=degraded&missingProtocol=YUTONG_MQTT');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user