test(ui): add iced interaction harness - #219
Conversation
Exercise the real HonkHonk view/update loop headlessly for sort persistence and staged settings search behavior. Co-Authored-By: Codex <noreply@openai.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (14)
📝 WalkthroughWalkthroughAdds an ChangesHeadless GUI test harness
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GuiTest
participant GuiHarness
participant iced_test_Simulator
participant HonkHonk
GuiTest->>GuiHarness: Simulate clicks, typing, and key presses
GuiHarness->>iced_test_Simulator: Create simulator over app view
iced_test_Simulator-->>GuiHarness: Emit Message values
GuiHarness->>HonkHonk: Apply messages through update
HonkHonk-->>GuiTest: Return updated widget tree and settings state
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
|
New dependency justification: iced_test 0.14.0 is the official Simulator/selector harness released alongside Iced 0.14. It is pinned to the application’s Iced line, licensed MIT, introduces no system dependencies, and passes cargo deny check. Reimplementing its headless widget traversal and synthetic event machinery would duplicate upstream and be less reliable. |
Install DejaVu fonts in the unit-test job and declare the Arch package as a source-package check dependency so iced_test can shape styled and monospace settings text in minimal environments. Co-Authored-By: Codex <noreply@openai.com>
Why
Important Iced interactions still depended on manual “launch and click” verification. That made the sort flow from #211 and staged settings search from #213 easy to regress without a compositor-free check in ordinary
cargo test.What
Adds a small
iced_testSimulator harness around the real persistence-disabledHonkHonkstate,view(), andupdate()boundaries. It drives visible-text and stable-ID selectors through real click/key/typewrite events and covers:The Flatpak Cargo source manifest is regenerated for the new lockfile entries. No pixel snapshots or application runtime dependencies are added. Unit-test environments install DejaVu fonts so styled and monospace settings text shapes deterministically; Arch source packages declare this as a test-only
checkdepends.New dependency justification
iced_test = 0.14.0is the official headless interaction crate shipped alongside Iced and matches HonkHonk’s Iced 0.14 line. Recreating its Simulator, widget traversal, focus, and synthetic event machinery would be brittle and would duplicate upstream. License: MIT.cargo deny checkpasses with advisories, licenses, bans, and sources green.Known limits
Layer A validates update/view logic and widget-tree behavior only. It does not exercise winit, wgpu, the compositor, ksni tray integration, desktop portals, or PipeWire audio.
Testing
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test(703 library tests plus binary/integration/doc suites)cargo deny check🤖 Co-authored by Codex. Closes #215.
Summary by CodeRabbit
Bug Fixes
Tests