mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
egui_kittest: Allow customizing the snapshot threshold and path (#5304)
This adds `egui_kittest::try_image_snapshot_options` and `egui_kittest::image_snapshot_options`, as well as `Harness::wgpu_snapshot_options` and `Harness::try_wgpu_snapshot_options` * [X] I have followed the instructions in the PR template
This commit is contained in:
@@ -45,3 +45,9 @@ Running with `UPDATE_SNAPSHOTS=true` will still cause the tests to fail, but on
|
||||
If you want to have multiple snapshots in the same test, it makes sense to collect the results in a `Vec`
|
||||
([look here](https://github.com/emilk/egui/blob/70a01138b77f9c5724a35a6ef750b9ae1ab9f2dc/crates/egui_demo_lib/src/demo/demo_app_windows.rs#L388-L427) for an example).
|
||||
This way they can all be updated at the same time.
|
||||
|
||||
You should add the following to your `.gitignore`:
|
||||
```gitignore
|
||||
**/tests/snapshots/**/*.diff.png
|
||||
**/tests/snapshots/**/*.new.png
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user