v16: 迁移 playwright-cli → playwright Node.js 包 + AI wrapper
playwright-cli (2026-06-15 @playwright/cli 废弃):
- init.js / init.sh 移除 @playwright/cli 安装+软链步骤
- npm install -g playwright (Node.js 包) 替代 @playwright/cli
- 本地 5 行 wrapper .claude/hooks/playwright-ai-cli.js 复刻 @playwright/cli
(用 playwright-core/lib/tools/cli-client/program 入口, 零额外依赖)
- /usr/local/bin/playwright → 软链到 wrapper
- 标准 test/codegen 走 npx playwright (npm bin 仍可用)
文档/命令:
- CLAUDE.md, ssw-test.md, ssw-h5dev-flow.md, ssw-e2e-test/SKILL.md,
troubleshooting, api-test 全部 playwright-cli → playwright
- auto-push-on-stop.sh JUNK_PATTERNS 加 .playwright/ 目录过滤
验证 (per 用户"注意验证有效性"):
- node init.js / bash init.sh 幂等通过 (再跑也 OK)
- playwright --version 返 1.60.0
- playwright -s=smoke open/snapshot/click/close 全部工作
- snapshot YAML 输出含 ref (e1/e2/e3), AI 可直接用
- 标准 CLI 仍可达: npx playwright --version