| 123456789101112131415161718192021222324252627282930 |
- /**
- * 独立功能测试配置(不带 globalSetup)
- *
- * 目的:规避 tests/playwright.config.js 的 globalSetup(db.js)去连
- * 192.168.16.251 重置/种子库 —— 本环境对该库 Access denied,会导致整套 e2e 无法启动。
- * 本配置仅用于「自包含」规格(如 assessment-appointment-functional.spec.js),
- * 其种子数据由测试自身通过 API 写入(direct-register 自注册等)。
- *
- * 运行:
- * cd d:/cfc/tests
- * npx playwright test tests/e2e/assessment-appointment-functional.spec.js -c playwright.config.func.js --project=api
- */
- module.exports = {
- testDir: require('path').join(__dirname, 'e2e'),
- timeout: 60000,
- // 关键:不配置 globalSetup,避免重置/种子库
- use: {
- baseURL: process.env.PW_BASE_URL || 'http://127.0.0.1:9082',
- headless: true,
- ignoreHTTPSErrors: true,
- },
- projects: [
- {
- name: 'api',
- use: { browserName: 'chromium' },
- },
- ],
- reporter: [['list']],
- };
|