mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-26 03:06:56 -06:00
Integration: Control bar tests find the bar's own button when Properties has one with the same name (#524 × object controls)
This commit is contained in:
@@ -765,8 +765,11 @@ mod tests {
|
||||
h.ctx.read_response(egui::Id::new(("object_control", id))).unwrap().rect
|
||||
}
|
||||
|
||||
/// The rect of the node with this label, preferring the one in the Control bar's row: the
|
||||
/// Properties panel has buttons with the same names.
|
||||
fn rect(h: &egui_kittest::Harness<'static, test_window::Window>, label: &str) -> egui::Rect {
|
||||
h.get_by_label(label).rect()
|
||||
let bar = test_window::panel_rect(h, "control_bar");
|
||||
h.query_all_by_label(label).map(|n| n.rect()).find(|r| bar.y_range().contains(r.center().y)).unwrap_or_else(|| h.get_by_label(label).rect())
|
||||
}
|
||||
|
||||
/// The application bar's search field (German interface).
|
||||
|
||||
Reference in New Issue
Block a user