feat(platform): add vehicle detail workbench

This commit is contained in:
lingniu
2026-07-04 19:49:24 +08:00
parent ea76ac22da
commit 9e38112ece
2 changed files with 103 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
render(<App />);
expect(await screen.findByText('地图就绪')).toBeInTheDocument();
expect(screen.getByText('版本 platform-20260704153357')).toBeInTheDocument();
expect(screen.getByText((content) => content.includes('platform-20260704153357'))).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '顶部地图态势' }));
expect(window.location.hash).toBe('#/map');
expect(await screen.findByRole('heading', { name: '实时地图' })).toBeInTheDocument();
@@ -9869,8 +9869,21 @@ test('shows unified service overview on vehicle detail', async () => {
render(<App />);
expect(await screen.findByText('车辆服务概览')).toBeInTheDocument();
expect(screen.getByText('单车服务作业台')).toBeInTheDocument();
expect(screen.getByText('实时定位')).toBeInTheDocument();
expect(screen.getAllByText('轨迹回放').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('RAW 证据')).toBeInTheDocument();
expect(screen.getByText('告警处置')).toBeInTheDocument();
expect(screen.getByText('里程复核')).toBeInTheDocument();
expect(screen.getByText('2026-07-03 20:12:10')).toBeInTheDocument();
expect(screen.getByText('12 条历史')).toBeInTheDocument();
expect(screen.getByText('34 帧')).toBeInTheDocument();
expect(screen.getAllByText('1 项').length).toBeGreaterThan(0);
expect(screen.getByText('7 条统计')).toBeInTheDocument();
expect(screen.getByText('2/3')).toBeInTheDocument();
expect(screen.getByText('历史 12 / RAW 34 / 里程 7')).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '单车作业台 RAW 证据 查看 RAW' }));
expect(window.location.hash).toBe('#/history-query?keyword=VIN001&tab=raw');
});
test('opens quality governance from vehicle detail overview', async () => {
@@ -10103,7 +10116,7 @@ test('shows vehicle service evidence chain before source details', async () => {
render(<App />);
expect(await screen.findByText('车辆服务证据链')).toBeInTheDocument();
expect(screen.getByText('2/3 来源在线')).toBeInTheDocument();
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);
@@ -11294,7 +11307,7 @@ test('opens single vehicle quality evidence from vehicle detail', async () => {
render(<App />);
expect(await screen.findByText('单车处置建议')).toBeInTheDocument();
expect(screen.getByText('VIN 缺失')).toBeInTheDocument();
expect(screen.getAllByText('VIN 缺失').length).toBeGreaterThan(0);
expect(screen.getAllByText('详情页质量问题需要处理').length).toBeGreaterThan(0);
expect(screen.getAllByText('粤A详情告警 / VIN-DETAIL-QUALITY').length).toBeGreaterThan(0);