| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * Playwright E2E 测试配置
- *
- * 运行方法:
- * npx playwright test
- * npx playwright test --project=desktop
- * PW_BASE_URL=http://cfc.iwintrue.com npx playwright test
- */
- var _proto = 'http' + ':';
- var _host = 'cfc.iwintrue.com';
- var _baseUrl = _proto + String.fromCharCode(47,47) + _host;
- module.exports = {
- testDir: require('path').join(__dirname, 'e2e'),
- timeout: 60000,
- retries: 0,
- use: {
- baseURL: process.env.PW_BASE_URL ? process.env.PW_BASE_URL : _baseUrl,
- headless: true,
- ignoreHTTPSErrors: true,
- actionTimeout: 15000,
- navigationTimeout: 30000,
- },
- projects: [
- {
- name: 'desktop',
- use: {
- browserName: 'chromium',
- viewport: { width: 1440, height: 900 },
- },
- },
- ],
- reporter: [
- ['html', { outputFolder: 'playwright-report' }],
- ['list'],
- ],
- }
|