Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

test(camera-raw): settle() fails when the proxy worker's develop fails

fjamespricec57947d6d833
diff --git a/crates/ui-egui/tests/camera_raw_scope.rs b/crates/ui-egui/tests/camera_raw_scope.rs
index 7ff123607..418d59c6e 100644
--- a/crates/ui-egui/tests/camera_raw_scope.rs
+++ b/crates/ui-egui/tests/camera_raw_scope.rs
@@ -51,6 +51,9 @@ fn settle(h: &mut Harness<'_, PhotocraftApp>) {
std::thread::sleep(std::time::Duration::from_millis(2));
h.run_steps(1);
}
+ // A failed worker develop also clears `previewPending`, without a new frame.
+ let app = control::inspect(h.state(), &h.ctx);
+ assert_ne!(app["statusError"], true, "the Camera Raw preview worker failed: {}", app["status"]);
// The frame that picked up the result also rebuilt the scope; let it go quiet.
h.run_steps(2);
}