test: add X11/Preedit browser E2E foundation with Playwright and xdotool - #479
Draft
naoNao89 wants to merge 6 commits into
Draft
test: add X11/Preedit browser E2E foundation with Playwright and xdotool#479naoNao89 wants to merge 6 commits into
naoNao89 wants to merge 6 commits into
Conversation
Collaborator
|
hay |
naoNao89
force-pushed
the
test/browser-e2e-x11
branch
from
September 9, 2026 14:57
56e44b4 to
ca186f9
Compare
naoNao89
marked this pull request as ready for review
September 10, 2026 19:09
naoNao89
marked this pull request as draft
September 10, 2026 21:32
naoNao89
force-pushed
the
test/browser-e2e-x11
branch
from
September 11, 2026 00:48
b7adc54 to
c92ef91
Compare
…ction - Local HTTP server fixture with input, textarea, and contenteditable - Event instrumentation recording keydown, keyup, beforeinput, input, compositionstart/update/end - OS-level input injection via xdotool XTEST to exercise X11 -> Fcitx5 -> Lotus -> Browser DOM - Positive and negative Telex control tests (dd -> đ vs dd -> dd) - Sequential Chromium and Firefox smoke and rapid input typing test suites - Fully isolated temporary runtime environment with private D-Bus busconfig and explicit PID tracking
- Dedicated workflow triggered on PR and workflow_dispatch - Separate job from GCC/Clang core CTest matrix to preserve build optimization - Runs on ubuntu-24.04 with Xvfb, Openbox, private D-Bus, Fcitx5, Chromium, and Firefox - Exercises sequential E2E tests across both browsers - Uploads complete diagnostics, Playwright reports, and server logs on failure
naoNao89
force-pushed
the
test/browser-e2e-x11
branch
from
September 11, 2026 05:04
af91cbf to
105d23c
Compare
- Display selection moved to BROWSER_E2E_DISPLAY (default :99); the harness never inherits the host DISPLAY and fails closed when the display is occupied by a live server or stale socket instead of reusing it - Xvfb is always started unconditionally; readiness requires the process to stay alive AND xdpyinfo to succeed, so stale sockets cannot pass - D-Bus PID terminated exactly once via the PID file; dbus.pid and dbus.addr are removed on --stop so stale PIDs can never be re-killed - x11-env.sh now lives under the isolated TEST_HOME instead of global /tmp - setup-fcitx.sh requires TEST_HOME; new scripts/run-browser-e2e.sh is the local lifecycle entrypoint that creates it and traps EXIT for cleanup - fcitx5.ts: fixed 100ms settle sleeps replaced by fcitx5-remote state polling (active IM name, active/inactive state codes) - x11-input.ts: ensureActive settle sleep replaced by polling the fixture event log until the browser records the focus event for the target
The hardened Xvfb readiness check requires xdpyinfo to succeed (process alive AND display responsive); xvfb alone does not ship xdpyinfo, so the previously socket-only readiness silently passed without it.
Clicking an already-focused element fires no focus event, and clearInput resets the fixture event log beforehand, so the focus-event readiness poll could never observe a new event for the target. Blur first, then click, so a fresh genuine focus event is always recorded and the IM-context readiness poll is meaningful.
Contributor
Author
|
All round-2 review items are addressed in 766c6ec..f6a2a8e (CI green, 3/3 consecutive runs on the final SHA, retries disabled). Blocker — owned X11 display
High — D-Bus PID killed twice / stale
Medium —
Medium —
Low — fixed sleeps
Low — Xvfb readiness false positive
Validation: Browser E2E green on Chromium + Firefox, 3/3 consecutive runs (initial + 2 reruns) on |
Failed startup attempts were appended to run-xvfb.pids before readiness and killed during retry, leaving stale PIDs that cleanup would re-kill. Record ownership only for a daemon that is alive and responsive; also correct the wrapper comment: --stop tears down processes and keeps TEST_HOME for post-mortem logs.
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.
Adds browser E2E foundation tests for Lotus on X11/Xvfb using Playwright and
xdotool.Keystrokes are injected through X11 XTEST and the resulting text is asserted in the browser DOM. Lotus is built from the PR checkout and runs through a real Fcitx5 session.
Tests
dd→đkeyboard-us):dd→dddd→đ<input>,<textarea>,<div contenteditable>, committed-text continuity across blur & refocusretries: 0); no flakes observedCI & Isolation Architecture
.github/workflows/browser-e2e.yml) to preserve core CTest build graph optimization from ci: reduce CI time and redundant test compilation #475DISPLAY; it usesBROWSER_E2E_DISPLAY(default:99), fails closed when the display is occupied by a live server or a stale socket, and always starts its own Xvfbxdpyinfoto succeed; socket existence alone is not acceptedTEST_HOME/XDG_CONFIG_HOME/ privatedbus-daemonsession);setup-fcitx.shrequiresTEST_HOMEandscripts/run-browser-e2e.shis the local lifecycle entrypoint (creates it, traps EXIT for cleanup)dbus.pid/dbus.addrare removed on stop so stale PIDs are never re-killedpkillorfcitx5-remote -e), keeping developer desktop sessions safedbus-session.confomitting standard service directories to prevent D-Bus auto-activation without mutating system files under/usr/share-r(--replace) and--disable=wayland,waylandimto eliminate unconfigured Wayland socket delaysfcitx5-remotestate polling;ensureActivepolls the fixture event log for a genuine focus event (blur + click guarantees a fresh focus transition)Scope Boundaries
Mode=Preeditbrowser path on standard HTML editable elements under X11/Xvfb.uinput, Wayland/Weston compositors, and SurroundingText regressions are explicitly reserved for Phase 2.