mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-09 09:42:30 +08:00
- Add Vitest for unit tests (39 tests) - cached-responses.test.ts - ai-providers.test.ts - chat-helpers.test.ts - utils.test.ts - Add Playwright for E2E tests (3 smoke tests) - Homepage load - Japanese locale - Settings dialog - Add CI workflow (.github/workflows/test.yml) - Add vitest.config.mts and playwright.config.ts - Update .gitignore for test artifacts
31 lines
804 B
TypeScript
31 lines
804 B
TypeScript
import { defineConfig } from "@playwright/test"
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests/e2e",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: "html",
|
|
webServer: {
|
|
command: process.env.CI
|
|
? "npm run build && npm run start"
|
|
: "npm run dev",
|
|
port: process.env.CI ? 6001 : 6002,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120 * 1000,
|
|
},
|
|
use: {
|
|
baseURL: process.env.CI
|
|
? "http://localhost:6001"
|
|
: "http://localhost:6002",
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { browserName: "chromium" },
|
|
},
|
|
],
|
|
})
|