End-to-end tests of the admin on Firefox and WebKit, nightly (A-56)

未关闭
#3,462 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp, github-actions, playwright
领域
backend, ci-cd, testing

调研方向

Read sections 7 and 10.8 of docs/planning/admin-technical-spec.md, then inspect admin/tests/FluentCMS.Admin.EndToEnd/Chromium.cs, SlowMode.cs, AdminBrowser.cs, Ui.cs, and .github/workflows/ci.yml. Start by tracing how the current Chromium harness and nightly workflow are selected and run. Done means Firefox and WebKit can run the end-to-end suite, nightly jobs report failures, and browser-specific exclusions or admin defects are documented as the acceptance criteria require.

由索引模型根据 Issue 内容生成。

描述

area:admin area:testing type:feature

Problem

AQ12 supports the last two versions of Chrome, Edge, Firefox and Safari, and AQ9 with section 7 runs the end-to-end tests in Chromium in full CI and in Firefox and WebKit nightly. The nightly run exists (.github/workflows/ci.yml, line 9), and it runs Chromium like every other run:

  • The harness launches Chromium only. Chromium.LaunchAsync starts headless Chromium and has it accept the run's certificate by the hash of its key, with a flag only Chromium has (admin/tests/FluentCMS.Admin.EndToEnd/Chromium.cs, lines 13 to 26). The job installs the headless shell of Chromium and no other browser (ci.yml, line 166).
  • Slow mode is Chromium's. It throttles the CPU and adds latency through the DevTools protocol (SlowMode.cs, line 49).
  • The helpers know Chromium's habits. Comments in AdminBrowser.cs (lines 223 and 310) and Ui.cs (line 109) describe what they work around: a response body Chromium drops, and the role a fluent-button takes from ElementInternals. What Firefox and WebKit do there is not known.
  • No case has run on either. How many of the cases pass is not known. The rich text cases send clipboard events, and the block and relation cases drag by pointer; these are where the engines differ most.

Safari is where the manual screen reader pass runs (VoiceOver), so a page that does not work in WebKit also stops that pass.

Proposal

  • The browser is a setting. FLUENTCMS_E2E_BROWSER is chromium, firefox or webkit; unset, it is Chromium and nothing changes. Each has its launch, and a browser that is not installed skips with the command that installs it, as today.
  • The certificate. Firefox and WebKit have no flag to accept one key, so their contexts ignore certificate errors. The context visits the run's host on the loopback address and nothing else; the preview case's front end is answered by the test itself. Section 7 records the difference.
  • Slow mode stays Chromium's. With another browser the variable is refused with a message, not ignored.
  • A nightly job for each of the two: it installs the browser with the system libraries it needs, and runs the whole project through run-with-retry.ps1 against the publish. A failure opens the nightly issue, as for the other jobs. It runs on the schedule and on a manual run that asks for it, not on a push or a pull request.
  • A case that fails on one browser is fixed in the harness when the wait or the selector was Chromium's, fixed in the admin when the page is at fault, or left out for that browser in one list, with the reason and an issue. A case left out is not run there, so the job's rule that a skip fails still holds.
  • Not run: the image on Firefox and WebKit. The image is covered in Chromium (A-45) and the engines against the publish.

Acceptance

  • FLUENTCMS_E2E_BROWSER=firefox and =webkit run the project, and unset it runs as before
  • The nightly run has a job for each, and a failed job opens the nightly issue
  • Every case passes on both, or is in the list with its reason and an open issue; the list is in the specification
  • A fault of the admin found on the way is fixed or filed as a bug, with the browser named
  • Slow mode with another browser than Chromium is refused with a message
  • CONTRIBUTING.md says how to install and run each browser, and the pull request states the time of each job

Design: docs/planning/admin-technical-spec.md, sections 7 and 10.8 (A-56, split from A-45); AQ9, AQ12. Row 3.19. Needs A-45, which changes the same files of the harness. The browser downloads need the maintainer's word. Size: M.

主要语言
C#
星标
567
派生
107
平均合并
1 小时 19 分钟
30 天内合并 PR
353

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。