test: add mobile layout E2E tests for iPhone 15

- Create tests/e2e/mobile/mobile-layout.spec.ts with 8 tests covering
  AppBar/hamburger visibility, drawer open/close, mobile card rendering,
  PageHeader button layout, dialog width, card actions, and analytics overflow.
- Fix AnalyticsClient: make Autocomplete full-width on mobile, add
  overflow:hidden to outer Stack to prevent body scrollWidth growth.
- Fix WorldMapInner: remove hard-coded minWidth:400 that caused 73px
  horizontal overflow on 393px iPhone 15 viewport.
- Fix DashboardLayoutClient: add overflowX:hidden to main content area
  to contain chart library elements that exceed viewport width.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
fuomag9
2026-03-12 09:04:58 +01:00
parent bfcc24eac0
commit 6e8db4ec39
4 changed files with 122 additions and 4 deletions

View File

@@ -282,7 +282,7 @@ export default function AnalyticsClient() {
// ── Render ────────────────────────────────────────────────────────────────
return (
<Stack spacing={4}>
<Stack spacing={4} sx={{ maxWidth: '100%', overflow: 'hidden' }}>
{/* Header */}
<Stack direction={{ xs: 'column', sm: 'row' }} alignItems={{ sm: 'center' }} justifyContent="space-between" spacing={2}>
<Box>
@@ -356,7 +356,7 @@ export default function AnalyticsClient() {
onChange={(_e, v) => setSelectedHosts(v)}
disableCloseOnSelect
limitTags={2}
sx={{ width: 260, flexShrink: 0 }}
sx={{ width: { xs: '100%', sm: 260 }, flexShrink: 0 }}
ListboxProps={{
// Prevent scroll from the dropdown list leaking to the page
style: { overscrollBehavior: 'contain' },