fix(platform): prioritize mobile vehicle service content

This commit is contained in:
lingniu
2026-07-06 00:55:24 +08:00
parent af4d721eeb
commit cd5336f353
3 changed files with 24 additions and 1 deletions

View File

@@ -11,6 +11,20 @@ afterEach(() => {
vi.restoreAllMocks();
});
test('mobile shell prioritizes customer vehicle service content before sidebar navigation', () => {
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.getByTestId('vehicle-platform-shell')).toHaveAttribute('data-mobile-layout', 'content-first');
});
test('renders vehicle platform shell', () => {
vi.spyOn(globalThis, 'fetch').mockImplementation(async () => ({
ok: true,