6d92024b63
- 修复API测试认证问题:创建全局认证设置,更新Playwright配置 - 优化回归测试稳定性:增加超时时间到15秒,修复定位器 - 创建Woodpecker CI工作流:CI、部署和质量门禁配置 - 添加Jest配置和测试脚本 - 移除登录页面的默认账号密码显示(安全问题修复)
30 lines
679 B
TypeScript
30 lines
679 B
TypeScript
import { TestConfig } from '../types';
|
|
|
|
export const environments: Record<string, TestConfig> = {
|
|
development: {
|
|
baseURL: 'http://localhost:3000',
|
|
timeout: 5000,
|
|
retries: 3,
|
|
environment: 'development',
|
|
headless: false
|
|
},
|
|
staging: {
|
|
baseURL: 'https://staging.novalon.com',
|
|
timeout: 10000,
|
|
retries: 2,
|
|
environment: 'staging',
|
|
headless: true
|
|
},
|
|
production: {
|
|
baseURL: 'https://www.novalon.com',
|
|
timeout: 10000,
|
|
retries: 1,
|
|
environment: 'production',
|
|
headless: true
|
|
}
|
|
};
|
|
|
|
export function getEnvironmentConfig(env: string = 'development'): TestConfig {
|
|
return environments[env] ?? environments.development!;
|
|
}
|