feat(platform): add vehicle data flow workbench

This commit is contained in:
lingniu
2026-07-04 23:10:42 +08:00
parent ee93d149e2
commit bf106a9730
3 changed files with 178 additions and 0 deletions

View File

@@ -546,11 +546,18 @@ 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('高德 Web JS')).toBeInTheDocument();
expect(screen.getByText('服务端 API')).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.getAllByText('历史证据').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('运营闭环')).toBeInTheDocument();
expect(screen.getAllByText('已配置').length).toBeGreaterThanOrEqual(2);
expect(screen.getByText('已启用')).toBeInTheDocument();
expect(screen.getByText('未暴露')).toBeInTheDocument();
@@ -581,6 +588,9 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('高德地图Web JS 已配置;服务端 API 已配置;安全代理 已启用;安全码未暴露'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. 实时监控'));
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('SLA目标 0-1 秒内进入实时视图'));
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(window.location.hash).toBe('#/map?online=online');
@@ -592,6 +602,17 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('includeFields')).toBe('true');
cleanup();
await renderDashboard();
fireEvent.click(screen.getByRole('button', { name: '数据流转 实时投影' }));
expect(window.location.hash).toBe('#/realtime?online=online');
cleanup();
await renderDashboard();
fireEvent.click(screen.getByRole('button', { name: '数据流转 统一解析' }));
expect(window.location.hash.startsWith('#/history-query')).toBe(true);
expect(new URLSearchParams(window.location.hash.split('?')[1] ?? '').get('includeFields')).toBe('true');
cleanup();
await renderDashboard();
fireEvent.click(screen.getByRole('button', { name: '作业台 实时监控 打开实时地图' }));
expect(window.location.hash).toBe('#/map?online=online');