Skip to content

test: Playwright 三引擎+手机视口冒烟进 CI - #174

Merged
makewheels merged 2 commits into
masterfrom
feat-e2e-smoke
Aug 23, 2026
Merged

makewheels merged 2 commits into
masterfrom
feat-e2e-smoke

Conversation

@makewheels

Copy link
Copy Markdown
Owner

目的

用户要求确保各种浏览器/手机的兼容性。CI 引入 Playwright 冒烟:Chromium / Firefox / WebKit(≈Safari/iOS 渲染引擎)桌面引擎 + iPhone 13、Pixel 7 手机视口(触屏+移动 UA),每次 PR 自动跑,deploy 需等它通过。

用例(不依赖后端)

  • 登录页渲染且无未捕获异常
  • 手机号输入过滤非数字交互正常
  • 未知分享链接优雅降级不白屏

本地 15/15 通过(5 个项目 × 3 用例)。

兼容性审计结论

  • JS 风险 API 均有守卫:navigator.share typeof 检查+复制回退、getUserMedia/MediaRecorder try-catch+提示、matchMedia 可选链+旧版 addListener 回退
  • CSS 用了 oklch/color-mix/aspect-ratio:基线为 2023 年春季后浏览器(iOS ≥16.4、Android Chrome ≥111、Firefox ≥113),更老的设备颜色会退化,属产品可接受基线
  • 真机硬件级差异(微信内置浏览器、老旧安卓 WebView)CI 无法覆盖,如需可后续接 BrowserStack 类真机云

集成细节

  • vitest include 限定 src 与 scripts,避免误跑 e2e
  • eslint 为 e2e/playwright.config 增加 node globals 覆盖块
  • pnpm test:e2e 本地可跑

@makewheels
makewheels merged commit c89ac52 into master Aug 23, 2026
4 checks passed
@makewheels
makewheels deleted the feat-e2e-smoke branch August 23, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant