✅ 添加 Firefox E2E 自动化测试#1503
Draft
CodFrm wants to merge 1 commit into
Draft
Conversation
Collaborator
|
之前 AI搞的那个连接器好像有把 |
87f6b00 to
238062a
Compare
Member
Author
还是有很多问题,还得去查,先draft了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
pnpm run test:e2e:firefox,先通过PACK_FIREFOX=true pnpm run pack产出 Firefox 包,再用 Playwright Firefox 跑 E2E。playwright.firefox.config.ts,复用原 Playwright 配置,仅清空 Firefox 不支持的 Chromium clipboard permissions。chrome/browserAPI mock。chrome-extension://、moz-extension://和file://。chrome-extension://的 URL 拼接。scripts/pack.js支持通过PACK_FIREFOX=true打 Firefox 包。验证结果
pnpm run typecheck:通过pnpm exec playwright test e2e/gm-api.spec.ts --reporter=list:7 passedpnpm run test:e2e:50 passedpnpm run test:e2e:firefox:46 passed / 1 failedFirefox E2E 当前结果
hello超时已知限制
当前 Firefox E2E 采用 Firefox 内核 + Firefox 打包产物解包 +
file://页面加载 + 页面级扩展 API mock。它可以覆盖扩展页面、路由、Monaco、脚本列表管理等页面流程,但还不是真实moz-extension://扩展后台 / content script / userScripts / GM API 链路。完整失败项:
e2e/vscode-connect.spec.ts:应能通过 WebSocket 连接并接收脚本同步Timeout waiting for action: hello