Task 24: Screenshot test harness and golden images #24

Closed
opened 2026-11-11 08:01:28 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-ui/tests/screenshots.rs, crates/fluxer-ui/src/testing/{mod.rs,offscreen.rs}, fixtures/golden/{login.png,main-general.png,settings-appearance.png}, docs/screenshots/README.md (how to capture the Electron side-by-side)
  • Modify: xtask/src/main.rs (run these when FLUXER_SCREENSHOT_TESTS=1), .forgejo/workflows/ci.yaml (set the var on Linux; install mesa-vulkan-drivers lavapipe; WGPU_BACKEND=vulkan, VK_ICD_FILENAMES for lavapipe)

Interfaces:

  • Produces: testing::render(view: Element<UiMessage>, size: (u32,u32)) -> RgbaImage using iced's renderer against an offscreen wgpu texture; testing::assert_matches_golden(name, image, tolerance = 0.5 % differing pixels); UPDATE_GOLDEN=1 rewrites goldens.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 24")

**Files:** - Create: `crates/fluxer-ui/tests/screenshots.rs`, `crates/fluxer-ui/src/testing/{mod.rs,offscreen.rs}`, `fixtures/golden/{login.png,main-general.png,settings-appearance.png}`, `docs/screenshots/README.md` (how to capture the Electron side-by-side) - Modify: `xtask/src/main.rs` (run these when `FLUXER_SCREENSHOT_TESTS=1`), `.forgejo/workflows/ci.yaml` (set the var on Linux; install `mesa-vulkan-drivers` lavapipe; `WGPU_BACKEND=vulkan`, `VK_ICD_FILENAMES` for lavapipe) **Interfaces:** - Produces: `testing::render(view: Element<UiMessage>, size: (u32,u32)) -> RgbaImage` using iced's renderer against an offscreen `wgpu` texture; `testing::assert_matches_golden(name, image, tolerance = 0.5 % differing pixels)`; `UPDATE_GOLDEN=1` rewrites goldens. --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 24")
charles added this to the Foundation milestone 2026-11-11 08:01:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#24
No description provided.