diff --git a/adminfront/package.json b/adminfront/package.json index 0fdd12d0..742cba61 100644 --- a/adminfront/package.json +++ b/adminfront/package.json @@ -13,9 +13,9 @@ "lint:fix": "biome check . --write", "format": "biome format . --write", "preview": "vite preview", - "test": "npx playwright test", + "test": "node ./node_modules/playwright/cli.js test", "test:unit": "vitest run", - "test:ui": "npx playwright test --ui", + "test:ui": "node ./node_modules/playwright/cli.js test --ui", "i18n-scan": "cd .. && node tools/i18n-scanner/index.js && node tools/i18n-scanner/report.js" }, "dependencies": { diff --git a/adminfront/vite.config.ts b/adminfront/vite.config.ts index 8176399c..345eba0b 100644 --- a/adminfront/vite.config.ts +++ b/adminfront/vite.config.ts @@ -1,9 +1,15 @@ import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; +const buildOutDir = + process.env.ADMINFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-adminfront-dist"; + export default defineConfig({ plugins: [react()], envPrefix: ["VITE_", "USERFRONT_"], + build: { + outDir: buildOutDir, + }, server: { host: "127.0.0.1", allowedHosts: ["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"], diff --git a/scripts/run_adminfront_ci_tests.sh b/scripts/run_adminfront_ci_tests.sh index 56c73628..0a06997a 100755 --- a/scripts/run_adminfront_ci_tests.sh +++ b/scripts/run_adminfront_ci_tests.sh @@ -4,6 +4,7 @@ set -euo pipefail job_name="${1:-adminfront-tests}" mkdir -p reports +rm -rf adminfront/node_modules PLAYWRIGHT_BROWSERS_PATH="${HOME}/.cache/ms-playwright" PLAYWRIGHT_CHROMIUM_COMPLETE="${PLAYWRIGHT_BROWSERS_PATH}/chromium-1208/INSTALLATION_COMPLETE"