feat(platform): add customer fleet command center

This commit is contained in:
lingniu
2026-07-06 06:10:06 +08:00
parent 00d416964b
commit e847e1c7e8
3 changed files with 190 additions and 0 deletions

View File

@@ -1228,6 +1228,18 @@ test('dashboard prioritizes customer vehicle service command over data sources',
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆地图http://localhost:3000/#/map?online=online'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('里程报表http://localhost:3000/#/mileage'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('历史导出http://localhost:3000/#/history-query?tab=raw&includeFields=true'));
expect(screen.getByText('客户车队运营总控')).toBeInTheDocument();
expect(screen.getByText('客户首屏只保留车辆地图、在线状态、轨迹回放、里程统计、数据导出和告警通知,协议来源退到证据层。')).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车队运营总控 实时地图 208 在线 打开地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车队运营总控 轨迹回放 4 活跃 回放轨迹' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车队运营总控 里程统计 1 天窗口 核对里程' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车队运营总控 数据导出 1,286,320 今日数据 导出报表' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '客户车队运营总控 告警通知 7 告警 闭环处理' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /复制运营总控包/ })).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /复制运营总控包/ }));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【客户车队运营总控包】'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('首屏能力:实时地图 / 轨迹回放 / 里程统计 / 数据导出 / 告警通知'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('协议来源:仅作为证据层,不作为客户主入口'));
expect(screen.getByRole('button', { name: '车辆服务指挥台优先队列 告警待处理 7 辆 告警事件' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务指挥台优先队列 无有效定位 208 辆 打开地图' })).toBeInTheDocument();
expect(screen.getAllByText('车辆服务指挥台')[0].compareDocumentPosition(screen.getByText('车辆地图态势')) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();