在.gitignore中添加.env文件 添加dotenv依赖管理环境变量 重构测试用例使用环境变量代替硬编码URL 在playwright配置中加载dotenv并设置baseURL
89 lines
2.6 KiB
JSON
89 lines
2.6 KiB
JSON
{
|
|
"name": "test",
|
|
"version": "1.0.0",
|
|
"lockfileVersion": 3,
|
|
"requires": true,
|
|
"packages": {
|
|
"": {
|
|
"name": "test",
|
|
"version": "1.0.0",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"@playwright/test": "^1.51.1",
|
|
"dotenv": "^16.5.0"
|
|
}
|
|
},
|
|
"node_modules/@playwright/test": {
|
|
"version": "1.51.1",
|
|
"resolved": "https://registry.npmmirror.com/@playwright/test/-/test-1.51.1.tgz",
|
|
"integrity": "sha512-nM+kEaTSAoVlXmMPH10017vn3FSiFqr/bh4fKg9vmAdMfd9SDqRZNvPSiAHADc/itWak+qPvMPZQOPwCBW7k7Q==",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"playwright": "1.51.1"
|
|
},
|
|
"bin": {
|
|
"playwright": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
},
|
|
"node_modules/dotenv": {
|
|
"version": "16.5.0",
|
|
"resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.5.0.tgz",
|
|
"integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",
|
|
"license": "BSD-2-Clause",
|
|
"engines": {
|
|
"node": ">=12"
|
|
},
|
|
"funding": {
|
|
"url": "https://dotenvx.com"
|
|
}
|
|
},
|
|
"node_modules/fsevents": {
|
|
"version": "2.3.2",
|
|
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
|
|
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
|
"hasInstallScript": true,
|
|
"license": "MIT",
|
|
"optional": true,
|
|
"os": [
|
|
"darwin"
|
|
],
|
|
"engines": {
|
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
|
}
|
|
},
|
|
"node_modules/playwright": {
|
|
"version": "1.51.1",
|
|
"resolved": "https://registry.npmmirror.com/playwright/-/playwright-1.51.1.tgz",
|
|
"integrity": "sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"playwright-core": "1.51.1"
|
|
},
|
|
"bin": {
|
|
"playwright": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"optionalDependencies": {
|
|
"fsevents": "2.3.2"
|
|
}
|
|
},
|
|
"node_modules/playwright-core": {
|
|
"version": "1.51.1",
|
|
"resolved": "https://registry.npmmirror.com/playwright-core/-/playwright-core-1.51.1.tgz",
|
|
"integrity": "sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw==",
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"playwright-core": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|
|
}
|
|
}
|