chore: 配置与基础设施更新

- 开发服务器端口从 3002 改为 5174
- vitest 配置从 vue plugin 改为 react plugin
- playwright 新增 uat 项目配置,修正 baseURL
- 添加 less 依赖支持
- 修复各页面 catch 块空语句为注释标记
This commit is contained in:
张翔
2026-05-06 14:17:31 +08:00
committed by zhangxiang
parent 2c468ace98
commit 9e635b1483
11 changed files with 227 additions and 23 deletions
+17 -2
View File
@@ -6,7 +6,7 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const isHeadless = process.env.PLAYWRIGHT_HEADLESS === 'true' || process.env.CI === 'true';
const baseURL = process.env.TEST_BASE_URL || process.env.VITE_BASE_URL || 'http://localhost:3002';
const baseURL = process.env.TEST_BASE_URL || process.env.VITE_BASE_URL || 'http://localhost:5174';
export default defineConfig({
testDir: './e2e',
@@ -106,11 +106,26 @@ export default defineConfig({
}
},
},
{
name: 'uat',
testDir: './e2e/uat',
testMatch: /.*\.spec\.ts/,
use: {
...devices['Desktop Chrome'],
launchOptions: {
args: [
'--disable-blink-features=AutomationControlled',
'--disable-dev-shm-usage',
'--no-sandbox'
]
}
},
},
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3002',
url: 'http://localhost:5174',
reuseExistingServer: !process.env.CI,
timeout: 180000,
stdout: 'pipe',