feat(platform): refine navigation around vehicle statistics

This commit is contained in:
lingniu
2026-07-05 15:12:51 +08:00
parent d6ae2688a8
commit dd6c63b72b
2 changed files with 6 additions and 6 deletions

View File

@@ -21,12 +21,12 @@ test('renders vehicle platform shell', () => {
render(<App />);
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('按 VIN、车牌、手机号管理车辆')).toBeInTheDocument();
expect(screen.getByText('轨迹里程')).toBeInTheDocument();
expect(screen.getByText('轨迹统计')).toBeInTheDocument();
expect(screen.getByText('回放轨迹、统计查询、导出数据')).toBeInTheDocument();
expect(screen.getAllByText('告警通知').length).toBeGreaterThanOrEqual(1);
expect(screen.getByText('接入运维')).toBeInTheDocument();
@@ -211,7 +211,7 @@ test('exposes AMap operations shortcuts when map key is configured', async () =>
expect(await screen.findByRole('heading', { name: '历史查询导出' })).toBeInTheDocument();
expect(screen.getByText('默认查询最近一天,不预置任何车辆;输入 VIN、车牌或手机号后进入单车查询导出。')).toBeInTheDocument();
expect(screen.queryByDisplayValue('LB9A32A24R0LS1426')).not.toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: '顶部里程统计' }));
fireEvent.click(screen.getByRole('button', { name: '顶部统计查询' }));
expect(window.location.hash.startsWith('#/mileage')).toBe(true);
fireEvent.click(await screen.findByRole('button', { name: '顶部告警事件正常' }));
expect(window.location.hash).toBe('#/alert-events');