From fe6f431a039bfa3ec00b095c348e629603a7d57d Mon Sep 17 00:00:00 2001 From: sanyamsingh001 <314051937+sanyamsingh001@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:47:16 +1000 Subject: [PATCH] LRC-DEV-AUTOSYNC: separate UI fixture changes Restore the original UI tests so this PR contains only the camera local-tone Auto Sync fix and its two engine regressions. Keep the independently prepared fixture correction in its separate review scope. Co-authored-by: Codex --- crates/ui-egui/src/tests_menubar.rs | 1 - crates/ui-egui/src/tests_sync.rs | 14 +------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/crates/ui-egui/src/tests_menubar.rs b/crates/ui-egui/src/tests_menubar.rs index 758ac595a..8fbc13608 100644 --- a/crates/ui-egui/src/tests_menubar.rs +++ b/crates/ui-egui/src/tests_menubar.rs @@ -116,7 +116,6 @@ fn hovering_another_title_switches_the_open_menu() { #[test] fn clicking_another_title_opens_it_in_one_click() { let mut h = app([1280.0, 703.0]); - assert!(h.step_until(SETTLE, |h| widget(h, "menu:Edit").is_some()), "Edit menu title was not registered"); go(&mut h, "ui.clickWidget", "menu:Edit"); assert_eq!(open_menu(&h).as_deref(), Some("menu:Edit")); // move away from the titles first so only the click can be what switches diff --git a/crates/ui-egui/src/tests_sync.rs b/crates/ui-egui/src/tests_sync.rs index 105e90db3..9e0db5297 100644 --- a/crates/ui-egui/src/tests_sync.rs +++ b/crates/ui-egui/src/tests_sync.rs @@ -84,20 +84,8 @@ fn open_and_scan(h: &mut Headless, folder: &str) { // the rows above it hold one folder each and open by themselves let row = format!("source:libfolder:{folder}"); assert!(h.step_until(T, |h| h.app.widgets.iter().any(|(w, _)| *w == row)), "no row {row}"); - let before = h.app.widgets.iter().find(|(w, _)| *w == row).map(|(_, r)| *r).unwrap_or_else(|| panic!("no row {row}")); - let panel = h.app.widgets.iter().find(|(w, _)| w == "panel:left_panel").map(|(_, r)| *r).expect("left panel"); - // Off-screen rows are registered too. Bring this row into view before the real right-click. - crate::tests_panels::scroll_sidebar(h, panel.center().y - before.center().y); let rect = h.app.widgets.iter().find(|(w, _)| *w == row).map(|(_, r)| *r).unwrap_or_else(|| panic!("no row {row}")); - let panel = h.app.widgets.iter().find(|(w, _)| w == "panel:left_panel").map(|(_, r)| *r).expect("left panel"); - let visible = rect.intersect(panel); - let c = visible.center(); - let drawn = h.app.widgets.iter().any(|(w, _)| *w == format!("label:libfolder:{folder}")); - let clips: Vec<_> = h.view.shapes.iter().filter(|s| s.shape.visual_bounding_rect().intersects(rect)).map(|s| s.clip_rect).collect(); - eprintln!( - "sync row geometry: before={before:?} row={rect:?} panel={panel:?} visible={visible:?} click={c:?} drawn={drawn} paint_clips={clips:?}" - ); - assert!(drawn && visible.is_positive() && visible.height() >= rect.height() - 0.5, "folder row must be drawn and vertically in view"); + let c = rect.center(); let r = h.request("ui.click", json!({"x": c.x, "y": c.y, "button": "right"}), T); assert_eq!(r["ok"], true, "{r}"); h.step();