feat(platform): add vehicle service delivery strip

This commit is contained in:
lingniu
2026-07-05 22:19:20 +08:00
parent fc86119857
commit aa286b810e
3 changed files with 133 additions and 0 deletions

View File

@@ -52,6 +52,31 @@ test('renders vehicle platform shell', () => {
expect(screen.getAllByText('运营总览').length).toBeGreaterThanOrEqual(1);
});
test('topbar frames customer work as a vehicle service delivery strip', () => {
vi.spyOn(globalThis, 'fetch').mockImplementation(async () => ({
ok: true,
json: async () => ({
data: { items: [], total: 0, limit: 20, offset: 0, linkHealth: [], runtime: { requestTimeoutMs: 5000 } },
traceId: 'trace-test',
timestamp: 1783094400000
})
}) as Response);
render(<App />);
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.getByRole('button', { name: '车辆服务交付条 地图' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务交付条 轨迹' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务交付条 统计' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务交付条 导出' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '车辆服务交付条 告警' })).toBeInTheDocument();
});
test('exposes AMap operations shortcuts when map key is configured', async () => {
window.__LINGNIU_APP_CONFIG__ = { amapWebJsKey: 'amap-web-key' };
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => {