feat(ai-character): Mock Preview 모드 구현

This commit is contained in:
Yu Sung
2026-07-27 23:23:36 +09:00
parent b4841ff579
commit 2a5efb0f3e
38 changed files with 4763 additions and 289 deletions

View File

@@ -1,15 +1,27 @@
import { defineConfig, devices } from "@playwright/test";
const apiMode = process.env.VITE_API_MODE === "mock" ? "mock" : "server";
const webServerPort = apiMode === "mock" ? 8889 : 8888;
const serverTestMatch = [
"**/server-mode-boundary.spec.ts",
"**/smoke.spec.ts",
"**/auth.spec.ts",
"**/accessibility-shell.spec.ts",
] as const;
const mockTestMatch = ["**/mock-preview-shell.spec.ts", "**/mock-mode-boundary.spec.ts"] as const;
export default defineConfig({
testDir: "./tests/e2e",
webServer: {
command: "npm run dev",
url: "http://127.0.0.1:8888",
reuseExistingServer: !process.env.CI,
command: apiMode === "mock" ? "npm run dev:mock" : "npm run dev",
env: { VITE_API_MODE: apiMode },
url: `http://127.0.0.1:${webServerPort}`,
reuseExistingServer: !process.env.CI && apiMode === "server",
},
use: {
baseURL: "http://127.0.0.1:8888",
baseURL: `http://127.0.0.1:${webServerPort}`,
},
testMatch: apiMode === "mock" ? [...mockTestMatch] : [...serverTestMatch],
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{ name: "webkit", use: { ...devices["Desktop Safari"] } },