fix(platform): prioritize mobile vehicle service content
This commit is contained in:
@@ -223,7 +223,7 @@ export function AppShell({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="vp-app">
|
<div className="vp-app">
|
||||||
<div className="vp-shell">
|
<div className="vp-shell" data-testid="vehicle-platform-shell" data-mobile-layout="content-first">
|
||||||
<aside className="vp-sidebar">
|
<aside className="vp-sidebar">
|
||||||
<div className="vp-brand">
|
<div className="vp-brand">
|
||||||
<span className="vp-brand-mark" />
|
<span className="vp-brand-mark" />
|
||||||
|
|||||||
@@ -12510,10 +12510,19 @@ button.vp-realtime-command-item:focus-visible {
|
|||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vp-main {
|
||||||
|
order: -1;
|
||||||
|
}
|
||||||
|
|
||||||
.vp-sidebar {
|
.vp-sidebar {
|
||||||
|
order: 2;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
max-height: 340px;
|
||||||
|
overflow-y: auto;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
border-right: 0;
|
||||||
|
border-top: 1px solid var(--vp-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vp-topbar {
|
.vp-topbar {
|
||||||
|
|||||||
@@ -11,6 +11,20 @@ afterEach(() => {
|
|||||||
vi.restoreAllMocks();
|
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', () => {
|
test('renders vehicle platform shell', () => {
|
||||||
vi.spyOn(globalThis, 'fetch').mockImplementation(async () => ({
|
vi.spyOn(globalThis, 'fetch').mockImplementation(async () => ({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user