131ecdbbe6
Complete merchant dashboard upgrade:
Next.js 16 compatibility:
- Fix params/searchParams typed as Promise<{}> throughout App Router
- Replace middleware.ts with proxy.ts (Next.js 16 convention)
- Remove unused @ts-expect-error directives caught by stricter TS
- Cast dynamic next-intl t() keys to fix TranslateArgs type errors
Offline POS:
- IndexedDB queue (meezi_pos_offline) for orders created while offline
- Zustand sync store tracking queueCount, isSyncing, isOnline
- useOfflineSync hook: auto-syncs on reconnect/visibility-change
- SyncStatusIndicator chip in topbar (amber=offline, blue=syncing)
- submitOrderToApi falls back to local order on network failure
- Local orders skip payment flow; sync on reconnect
PWA (installable):
- @ducanh2912/next-pwa with Workbox runtime caching rules
- Web App Manifest (manifest.ts) — RTL/Farsi, theme #0F6E56
- PWA icons: 192px, 512px, maskable 512px
- next.config.ts replaces next.config.mjs
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
30 lines
770 B
TypeScript
30 lines
770 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:3101";
|
|
const apiURL = process.env.PLAYWRIGHT_API_URL ?? "http://localhost:5080";
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: "list",
|
|
use: {
|
|
baseURL,
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
|
|
webServer: process.env.CI
|
|
? undefined
|
|
: {
|
|
command: "npm run dev",
|
|
url: baseURL,
|
|
reuseExistingServer: true,
|
|
timeout: 120_000,
|
|
},
|
|
globalSetup: undefined,
|
|
});
|
|
|
|
export { apiURL };
|