/** * Playwright 远程环境测试配置 * ================================================================ * 用途:针对远程部署环境(http://cfc.iwintrue.com)的只读测试。 * - 移除 globalSetup(db.js 会执行 bash reset-db.sh 重置远程数据库——绝对禁止) * - 只运行指定 spec:npx playwright test --config=playwright.remote.config.js * ================================================================ */ var path = require('path'); module.exports = { testDir: path.join(__dirname, 'e2e'), timeout: 120000, retries: 0, workers: 1, use: { baseURL: 'http://cfc.iwintrue.com', headless: true, ignoreHTTPSErrors: true, actionTimeout: 15000, navigationTimeout: 60000, screenshot: 'only-on-failure', trace: 'retain-on-failure', }, projects: [ { name: 'desktop', use: { browserName: 'chromium', viewport: { width: 1440, height: 900 }, }, }, ], reporter: [ ['html', { outputFolder: 'playwright-report' }], ['list'], ], }