feat(platform): refocus dashboard on vehicle operations
This commit is contained in:
@@ -24,7 +24,8 @@ test('renders vehicle platform shell', () => {
|
||||
expect(screen.getByText('一车一服务 / 多源归并')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆工作台')).toBeInTheDocument();
|
||||
expect(screen.getByText('查询分析')).toBeInTheDocument();
|
||||
expect(screen.getByText('告警运维')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('告警通知').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('系统运维')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('运营驾驶舱').length).toBeGreaterThanOrEqual(1);
|
||||
});
|
||||
|
||||
@@ -593,7 +594,7 @@ test('dashboard presents one vehicle service operating posture', async () => {
|
||||
render(<App />);
|
||||
|
||||
expect(await screen.findByText('统一车辆服务入口')).toBeInTheDocument();
|
||||
expect(screen.getByText('208 / 1,033 在线')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('208 / 1,033 在线').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('181 多源覆盖')).toBeInTheDocument();
|
||||
expect(screen.getByText('7 告警事件')).toBeInTheDocument();
|
||||
});
|
||||
@@ -790,8 +791,12 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
|
||||
};
|
||||
|
||||
await renderDashboard();
|
||||
expect(screen.getByText('车辆运营监控台')).toBeInTheDocument();
|
||||
expect(screen.getByText('先看车,再看数据来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('客户常用工作流')).toBeInTheDocument();
|
||||
expect(screen.getByText('实时车辆地图')).toBeInTheDocument();
|
||||
expect(screen.getByText('历史数据导出')).toBeInTheDocument();
|
||||
expect(screen.getByText('车辆服务作业台')).toBeInTheDocument();
|
||||
expect(screen.getByText('数据源到车辆服务就绪度')).toBeInTheDocument();
|
||||
expect(screen.getByText('地图运营能力')).toBeInTheDocument();
|
||||
expect(screen.getByText('数据流转作业链')).toBeInTheDocument();
|
||||
expect(screen.getByText('车联网场景导航')).toBeInTheDocument();
|
||||
@@ -799,11 +804,6 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
|
||||
expect(screen.getByText('服务端 API')).toBeInTheDocument();
|
||||
expect(screen.getByText('安全代理')).toBeInTheDocument();
|
||||
expect(screen.getByText('安全码暴露')).toBeInTheDocument();
|
||||
expect(screen.getByText('GB32960')).toBeInTheDocument();
|
||||
expect(screen.getByText('JT808')).toBeInTheDocument();
|
||||
expect(screen.getByText('YUTONG_MQTT')).toBeInTheDocument();
|
||||
expect(screen.getByText('整车与氢能实时数据主来源')).toBeInTheDocument();
|
||||
expect(screen.getByText('在线 73/340,缺失车辆 693,Kafka Lag 0')).toBeInTheDocument();
|
||||
expect(screen.getByText('协议接入')).toBeInTheDocument();
|
||||
expect(screen.getByText('统一解析')).toBeInTheDocument();
|
||||
expect(screen.getByText('实时投影')).toBeInTheDocument();
|
||||
@@ -843,19 +843,15 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制流转图' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆数据中台数据流转图】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('03. 实时投影 / Redis KV'));
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制接入交接' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【三源接入到车辆服务交接摘要】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. GB32960 - 覆盖不足'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('RAW:http://localhost:3000/#/history-query?protocol=GB32960&tab=raw&includeFields=true'));
|
||||
|
||||
fireEvent.click(screen.getAllByRole('button', { name: '实时' })[0]);
|
||||
expect(window.location.hash).toBe('#/realtime?protocol=GB32960&online=online');
|
||||
fireEvent.click(screen.getByRole('button', { name: '客户工作流 实时车辆地图' }));
|
||||
expect(window.location.hash).toBe('#/map?online=online');
|
||||
cleanup();
|
||||
|
||||
await renderDashboard();
|
||||
fireEvent.click(screen.getAllByRole('button', { name: 'RAW' })[0]);
|
||||
fireEvent.click(screen.getByRole('button', { name: '客户工作流 历史数据导出' }));
|
||||
expect(window.location.hash.startsWith('#/history-query')).toBe(true);
|
||||
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('protocol')).toBe('GB32960');
|
||||
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('tab')).toBe('raw');
|
||||
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('includeFields')).toBe('true');
|
||||
cleanup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user