5d5b7feb0a
添加Playwright测试框架配置和基础页面对象 实现冒烟测试用例覆盖首页和联系页面核心功能 更新导航组件以支持滚动高亮功能 添加BackButton组件统一返回按钮行为 配置Woodpecker CI集成和测试报告生成
149 lines
2.8 KiB
YAML
149 lines
2.8 KiB
YAML
pipeline:
|
|
e2e-tests:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npx playwright install --with-deps firefox
|
|
- npx playwright install --with-deps webkit
|
|
- npm run test:ci
|
|
when:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
branch:
|
|
- main
|
|
- develop
|
|
|
|
e2e-tests-smoke:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:smoke
|
|
when:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
e2e-tests-regression:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:regression
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-performance:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:performance
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-responsive:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:responsive
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-visual:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:visual
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-a11y:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:a11y
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-report:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium
|
|
- npm run test:report
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
|
|
e2e-tests-all-browsers:
|
|
image: node:18-alpine
|
|
environment:
|
|
NODE_ENV: test
|
|
CI: true
|
|
commands:
|
|
- cd e2e
|
|
- npm ci
|
|
- npx playwright install --with-deps chromium firefox webkit
|
|
- npm run test:all-browsers
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
- develop
|