feat: 添加E2E测试并优化Docker部署配置
- 新增Playwright E2E测试配置和测试脚本 - 优化Dockerfile和docker-compose.yml配置 - 新增novalon-nginx和novalon-website的docker-compose配置 - 优化contact页面和contact-section组件的代码结构 - 更新多个页面的SEO和元数据配置 - 添加备案图标资源 - 修复ESLint错误:转义引号、添加ESLint禁用注释、移除未使用变量 测试覆盖: 新增website-acceptance.spec.ts E2E测试
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: 'html',
|
||||
use: {
|
||||
baseURL: 'https://novalon.cn',
|
||||
trace: 'on-first-retry',
|
||||
screenshot: 'only-on-failure',
|
||||
video: 'retain-on-failure',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
use: { ...devices['Desktop Firefox'] },
|
||||
},
|
||||
{
|
||||
name: 'webkit',
|
||||
use: { ...devices['Desktop Safari'] },
|
||||
},
|
||||
{
|
||||
name: 'Mobile Chrome',
|
||||
use: { ...devices['Pixel 5'] },
|
||||
},
|
||||
{
|
||||
name: 'Mobile Safari',
|
||||
use: { ...devices['iPhone 12'] },
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user