Files
honeyDueWeb/tests/responsive.spec.ts
Trey t 7884ebbfd4 feat: Phase 4-5 — demo mode, polish, deploy, and bug fixes
Add demo mode with mock data provider, Docker deployment, Playwright
tests, PostHog analytics, error boundaries, and SEO metadata. Fix
residences API response unwrapping, kanban drag-and-drop with optimistic
updates, trailing slash proxy redirects, and column name mismatches with
Go API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:37:41 -06:00

41 lines
1.4 KiB
TypeScript

import { test, expect, devices } from "@playwright/test";
test.describe("Responsive Design", () => {
test("shows sidebar on desktop", async ({ browser }) => {
const context = await browser.newContext({
viewport: { width: 1280, height: 720 },
});
const page = await context.newPage();
await page.goto("/demo/app/residences");
const sidebar = page.locator('nav[aria-label="Main navigation"]').first();
await expect(sidebar).toBeVisible();
await context.close();
});
test("shows bottom nav on mobile", async ({ browser }) => {
const context = await browser.newContext({
...devices["iPhone 14"],
});
const page = await context.newPage();
await page.goto("/demo/app/residences");
// Bottom nav should be visible on mobile
const bottomNav = page.locator('nav[aria-label="Main navigation"]').last();
await expect(bottomNav).toBeVisible();
await context.close();
});
test("kanban board scrolls horizontally on mobile", async ({ browser }) => {
const context = await browser.newContext({
...devices["iPhone 14"],
});
const page = await context.newPage();
await page.goto("/demo/app/tasks");
// The kanban container should have overflow-x-auto
const kanban = page.locator(".snap-x").first();
if (await kanban.isVisible()) {
await expect(kanban).toHaveCSS("overflow-x", "auto");
}
await context.close();
});
});