feat: 配置环境变量和Playwright配置
- 创建 .env.test 测试环境配置文件 - 更新 playwright.config.ts 添加角色测试项目 - 配置测试用户密码为 Test@123 - 添加独立的角色测试项目配置
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
# 测试环境配置
|
||||||
|
VITE_API_BASE_URL=http://localhost:8084
|
||||||
|
VITE_APP_TITLE=Novalon管理系统 - 测试环境
|
||||||
|
|
||||||
|
# 测试用户配置
|
||||||
|
TEST_USER_PASSWORD=Test@123
|
||||||
|
|
||||||
|
# Playwright配置
|
||||||
|
HEADLESS=true
|
||||||
|
SLOW_MO=0
|
||||||
@@ -53,6 +53,21 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
projects: [
|
projects: [
|
||||||
|
{
|
||||||
|
name: 'role-based-tests',
|
||||||
|
testDir: './e2e/role-based-tests/scenarios',
|
||||||
|
testMatch: /.*\.spec\.ts/,
|
||||||
|
use: {
|
||||||
|
...devices['Desktop Chrome'],
|
||||||
|
launchOptions: {
|
||||||
|
args: [
|
||||||
|
'--disable-blink-features=AutomationControlled',
|
||||||
|
'--disable-dev-shm-usage',
|
||||||
|
'--no-sandbox'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'chromium',
|
name: 'chromium',
|
||||||
use: {
|
use: {
|
||||||
|
|||||||
Reference in New Issue
Block a user