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

Aperta
#3,462 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, github-actions, playwright
Ambito
backend, ci-cd, testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
567
Fork
107
Merge medio
1h 19m
PR unite (30g)
353

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.