Responsive design testing across different devices and viewports to ensure optimal user experiences.

iPhone 14 Pro Max

Popular
Viewport: 430 × 932
DPR: 3x
Category: Mobile

iPhone 14 Pro

Popular
Viewport: 393 × 852
DPR: 3x
Category: Mobile

Samsung Galaxy S23

Popular
Viewport: 360 × 780
DPR: 3x
Category: Mobile

iPad Pro 12.9"

Popular
Viewport: 1024 × 1366
DPR: 2x
Category: Tablet

iPad Air

Popular
Viewport: 820 × 1180
DPR: 2x
Category: Tablet

Desktop FHD

Popular
Viewport: 1920 × 1080
DPR: 1x
Category: Desktop

MacBook Pro 16"

Popular
Viewport: 1728 × 1117
DPR: 2x
Category: Laptop

MacBook Air 13"

Popular
Viewport: 1470 × 956
DPR: 2x
Category: Laptop

iPhone 14 Pro Max

Popular
Viewport: 430 × 932
DPR: 3x
Category: Mobile

iPhone 14 Pro

Popular
Viewport: 393 × 852
DPR: 3x
Category: Mobile

iPhone SE

Viewport: 375 × 667
DPR: 2x
Category: Mobile

Samsung Galaxy S23

Popular
Viewport: 360 × 780
DPR: 3x
Category: Mobile

Pixel 7

Viewport: 412 × 915
DPR: 2.625x
Category: Mobile

iPad Pro 12.9"

Popular
Viewport: 1024 × 1366
DPR: 2x
Category: Tablet

iPad Air

Popular
Viewport: 820 × 1180
DPR: 2x
Category: Tablet

iPad Mini

Viewport: 768 × 1024
DPR: 2x
Category: Tablet

Samsung Tab S8

Viewport: 800 × 1280
DPR: 2x
Category: Tablet

Desktop FHD

Popular
Viewport: 1920 × 1080
DPR: 1x
Category: Desktop

Desktop 4K

Viewport: 3840 × 2160
DPR: 2x
Category: Desktop

MacBook Pro 16"

Popular
Viewport: 1728 × 1117
DPR: 2x
Category: Laptop

MacBook Air 13"

Popular
Viewport: 1470 × 956
DPR: 2x
Category: Laptop

Mobile

≤767px

Small screen mobile devices in portrait and landscape orientations.

TYPICAL DEVICES

iPhone SEGalaxy S23Pixel 7

Tablet

768px+≤1023px

Tablet devices and large mobile phones in landscape mode.

TYPICAL DEVICES

iPad AiriPad MiniGalaxy Tab

Desktop

1024px+≤1439px

Laptop screens and small desktop monitors.

TYPICAL DEVICES

MacBook AirSurface Laptop13" screens

Large Desktop

1440px+

Large desktop monitors and high-resolution displays.

TYPICAL DEVICES

27" monitors4K displaysiMac Pro

Device Configuration

// playwright.config.ts
import { devices } from '@playwright/test'

export default defineConfig({
  projects: [
    // Desktop
    { name: 'Desktop Chrome', use: { ...devices['Desktop Chrome'] } },
    { name: 'Desktop Safari', use: { ...devices['Desktop Safari'] } },

    // Mobile
    { name: 'Mobile Chrome', use: { ...devices['Pixel 5'] } },
    { name: 'Mobile Safari', use: { ...devices['iPhone 12'] } },

    // Tablet
    { name: 'iPad', use: { ...devices['iPad Pro'] } },

    // Custom viewport
    {
      name: 'Custom Mobile',
      use: {
        ...devices['iPhone 12'],
        viewport: { width: 375, height: 812 },
        deviceScaleFactor: 3,
      }
    }
  ]
})

Responsive Test

test('navigation adapts to device', async ({ page }) => {
  await page.goto('/')

  const viewport = page.viewportSize()!

  if (viewport.width < 768) {
    // Mobile: hamburger menu should be visible
    await expect(page.locator('[data-testid="mobile-menu"]')).toBeVisible()
    await expect(page.locator('[data-testid="desktop-nav"]')).toBeHidden()
  } else {
    // Desktop: full navigation should be visible
    await expect(page.locator('[data-testid="desktop-nav"]')).toBeVisible()
    await expect(page.locator('[data-testid="mobile-menu"]')).toBeHidden()
  }
})

Breakpoint System

/* Mobile First Approach */
.container {
  padding: 1rem; /* Mobile default */
}

@media (min-width: 768px) {
  .container {
    padding: 2rem; /* Tablet */
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 3rem; /* Desktop */
  }
}

@media (min-width: 1440px) {
  .container {
    padding: 4rem; /* Large Desktop */
  }
}

Orientation Queries

@media (orientation: landscape) {
  .mobile-nav {
    flex-direction: row;
  }
}

@media (orientation: portrait) {
  .mobile-nav {
    flex-direction: column;
  }
}

Touch Targets

Minimum 44px × 44px for all interactive elements

Spacing

8px minimum spacing between touch targets

Hover States

Use @media (hover: hover) for hover-only interactions

Gestures

Support swipe, pinch-to-zoom where appropriate

Mobile Testing

Portrait and landscape orientations
Touch targets are 44px minimum
Text is readable without zooming
Navigation works with thumbs
Forms are easy to complete
Performance on slower devices

Tablet Testing

Layout adapts to larger screen
Content uses available space well
Touch interactions work smoothly
Keyboard support for external keyboards
Multi-tasking scenarios
Both orientations supported

Desktop Testing

Layout scales to large screens
Mouse hover states work
Keyboard navigation functions
High DPI displays render clearly
Multi-monitor setups
Window resizing behavior