1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Add Harness::debug_open_snapshot helper (#7590)

Adds a helper to quickly see whats going on in a kittest test.

Not all test have snapshots, but when debugging tests it might still be
useful to see whats actually going on, so this adds a helper fn that
renders a snapshot image to a temporary file and opens it with the
default image viewer:



https://github.com/user-attachments/assets/08785850-0a12-4572-b9b5-cea36951081c
This commit is contained in:
Lucas Meurer
2025-10-07 14:39:22 +02:00
committed by GitHub
parent ab461f4115
commit d83f4500a3
6 changed files with 97 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ wgpu = [
]
## Adds a dify-based image snapshot utility.
snapshot = ["dep:dify", "dep:image", "image/png"]
snapshot = ["dep:dify", "dep:image", "dep:open", "dep:tempfile", "image/png"]
## Allows testing eframe::App
eframe = ["dep:eframe", "eframe/accesskit"]
@@ -61,6 +61,8 @@ wgpu = { workspace = true, features = [
# snapshot dependencies
dify = { workspace = true, optional = true }
open = { workspace = true, optional = true }
tempfile = { workspace = true, optional = true }
# Enable this when generating docs.
document-features = { workspace = true, optional = true }