| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- /**
- * Playwright API 级测试配置(本地 feature 分支实例)
- * ================================================================
- * 用途:针对 feature 分支代码启动的本地后端(默认 http://127.0.0.1:18082)
- * 运行 SC-P-10 等「实现未部署到远端」的 API 级 e2e,验证本分支新行为。
- * 与 playwright.config.api.js 唯一差异:baseURL 指向本地实例(可用 CFC_BASE_URL 覆盖)。
- *
- * 运行:CFC_BASE_URL=http://127.0.0.1:18082 npx playwright test \
- * api/task-create-scp10.spec.js -c playwright.config.api.local.js --project=desktop
- */
- var path = require('path');
- module.exports = {
- testDir: path.join(__dirname, 'e2e'),
- testMatch: /api[\\/].*\.spec\.js$/,
- timeout: 180000,
- retries: 0,
- workers: 1,
- outputDir: path.join(__dirname, '.api-artifacts-local'),
- reporter: [['list']],
- use: {
- baseURL: process.env.CFC_BASE_URL || 'http://127.0.0.1:18082',
- headless: true,
- ignoreHTTPSErrors: true,
- actionTimeout: 15000,
- navigationTimeout: 60000,
- screenshot: 'off',
- trace: 'off',
- video: 'off',
- },
- projects: [
- {
- name: 'desktop',
- use: {
- browserName: 'chromium',
- viewport: { width: 1440, height: 900 },
- },
- },
- ],
- };
|