feat(test): 添加dotenv支持并重构测试配置

在.gitignore中添加.env文件
添加dotenv依赖管理环境变量
重构测试用例使用环境变量代替硬编码URL
在playwright配置中加载dotenv并设置baseURL
This commit is contained in:
yourname
2025-05-06 06:46:10 +00:00
parent f158ff6ff5
commit 213ffcb109
5 changed files with 22 additions and 5 deletions

View File

@@ -6,7 +6,8 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@playwright/test":"1.51.1"
"@playwright/test": "^1.51.1",
"dotenv": "^16.5.0"
},
"author": "",
"license": "ISC",