mirror of
https://github.com/saltbo/zpan.git
synced 2026-09-21 13:20:33 +08:00
Toolbar buttons collapse to icon-only on mobile with sr-only text. Table columns (size, modified, email, quota, etc.) progressively hide at sm/md/lg breakpoints. Admin and trash pages get matching treatment. Playwright config gains tablet (768×1024) and mobile (390×844) projects with 38 E2E tests covering overflow, column visibility, and sidebar behavior across all three viewports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
const isCF = process.env.E2E_RUNTIME === 'cf'
|
|
|
|
const nodeServers = [
|
|
{
|
|
command: 'node --env-file=.dev.vars node_modules/.bin/tsx watch server/entry-node.ts',
|
|
port: 8222,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
{
|
|
command: 'node --env-file=.dev.vars node_modules/.bin/vite --mode node',
|
|
port: 5173,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
]
|
|
|
|
const cfServers = [
|
|
{
|
|
command: 'vite dev',
|
|
port: 5173,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
]
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
timeout: 30000,
|
|
retries: process.env.CI ? 2 : 0,
|
|
reporter: process.env.CI ? 'github' : 'list',
|
|
use: {
|
|
baseURL: 'http://localhost:5173',
|
|
headless: true,
|
|
trace: 'on-first-retry',
|
|
},
|
|
projects: [
|
|
{ name: 'desktop', use: { ...devices['Desktop Chrome'] } },
|
|
{
|
|
name: 'tablet',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 768, height: 1024 },
|
|
},
|
|
},
|
|
{
|
|
name: 'mobile',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 390, height: 844 },
|
|
isMobile: true,
|
|
},
|
|
},
|
|
],
|
|
webServer: isCF ? cfServers : nodeServers,
|
|
})
|