feat(platform): position dashboard as vehicle service center
This commit is contained in:
@@ -891,12 +891,12 @@ test('dashboard exposes vehicle data center capability matrix', async () => {
|
||||
expect(screen.getAllByText('今日帧 1,286,320').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('告警 7').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('统计车辆 1,033').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('确认车辆是否在线、位置是否可信、三类来源是否齐全。')).toBeInTheDocument();
|
||||
expect(screen.getByText('确认车辆是否在线、位置是否可信、必要接入来源是否齐全。')).toBeInTheDocument();
|
||||
expect(screen.getByText('按车辆复盘位置、速度、里程和断点,定位平台转发或车辆异常。')).toBeInTheDocument();
|
||||
expect(screen.getByText('优先返回必要字段,避免大 JSON 拖慢查询')).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制功能蓝图' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆数据中台功能蓝图】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('32960 / 808 / 宇通 MQTT 都只是车辆服务证据源'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆服务中台功能蓝图】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('32960 / 808 / 宇通 MQTT 都只是车辆接入来源'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆规模:1,033;在线:208;告警:7'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('高德地图:Web JS 已配置;服务端 API 已配置;安全代理 已启用;安全码未暴露'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('1. 实时监控'));
|
||||
@@ -1281,8 +1281,8 @@ test('dashboard shows vehicle service action queue', async () => {
|
||||
|
||||
test.each([
|
||||
{ buttonName: '查看在线车辆', expectedHash: '#/vehicles?online=online' },
|
||||
{ buttonName: '实时地图', expectedHash: '#/map?online=online' },
|
||||
{ buttonName: '查看告警事件', expectedHash: '#/alert-events' }
|
||||
{ buttonName: '打开实时地图', expectedHash: '#/map?online=online' },
|
||||
{ buttonName: '顶部告警事件', expectedHash: '#/alert-events' }
|
||||
])('dashboard posture opens %s', async ({ buttonName, expectedHash }) => {
|
||||
window.history.replaceState(null, '', '/#/dashboard');
|
||||
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => {
|
||||
@@ -1448,7 +1448,7 @@ test('dashboard exposes end-to-end operations workflow entries', async () => {
|
||||
expect(screen.getByText('今天车辆轨迹')).toBeInTheDocument();
|
||||
expect(screen.getByText('历史时间窗')).toBeInTheDocument();
|
||||
expect(screen.getByText('区间里程')).toBeInTheDocument();
|
||||
expect(screen.getByText('告警复盘')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('告警复盘').length).toBeGreaterThanOrEqual(1);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '时间监控 今天车辆轨迹' }));
|
||||
|
||||
@@ -1570,7 +1570,7 @@ test('dashboard surfaces highest priority quality issue with evidence shortcuts'
|
||||
expect(screen.getByText('实时证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('轨迹证据').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('告警证据')).toBeInTheDocument();
|
||||
expect(screen.getByText('统计证据')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('统计证据').length).toBeGreaterThanOrEqual(1);
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制处置卡' }));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【重点车辆服务处置卡】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('车辆:粤A告警1 / 13307795425'));
|
||||
@@ -1578,7 +1578,7 @@ test('dashboard surfaces highest priority quality issue with evidence shortcuts'
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('原始记录:http://localhost:3000/#/history-query?keyword=%E7%B2%A4A%E5%91%8A%E8%AD%A61&protocol=JT808&tab=raw&includeFields=true'));
|
||||
expect(await screen.findByText('最高优先级告警')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('粤A告警1 / 13307795425').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getByText('VIN 缺失')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('VIN 缺失').length).toBeGreaterThanOrEqual(1);
|
||||
expect(screen.getAllByText('JT808 数据缺少 VIN 映射').length).toBeGreaterThanOrEqual(1);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '首页告警轨迹证据' }));
|
||||
@@ -1713,7 +1713,7 @@ test('dashboard copies highest priority quality issue notification text', async
|
||||
fireEvent.click(screen.getByRole('button', { name: '复制运营交接摘要' }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆数据中台运营交接摘要】'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('【车辆服务中台运营交接摘要】'));
|
||||
});
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('在线车辆:88 / 1,033'));
|
||||
expect(writeText).toHaveBeenCalledWith(expect.stringContaining('今日活跃:96'));
|
||||
|
||||
Reference in New Issue
Block a user