Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

#323: test: holding \ in a wipe is tested with the key held, and the mutation fails it

Nathaniel Ledfordddaea580a1ab
diff --git a/crates/ui-egui/src/tests_preview_limit.rs b/crates/ui-egui/src/tests_preview_limit.rs
index a1bd224c1..4d64dca20 100644
--- a/crates/ui-egui/src/tests_preview_limit.rs
+++ b/crates/ui-egui/src/tests_preview_limit.rs
@@ -594,6 +594,10 @@ mod in_the_loupe {
modifiers: egui::Modifiers::NONE,
});
h.settle(SETTLE);
+ // (the key's own shortcut switches to the Before view; the wipe is chosen again with the
+ // key still down, which is what holding `\` in a wipe is)
+ h.app.ui.before_after = crate::state::BeforeAfter::Split;
+ h.settle(SETTLE);
h.step();
let canvas = h.app.canvas_rect.unwrap();
let window = drawn(&h, Slot::RegionBefore);