Skip to content

FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust

chrome_ui test: the menu bar's automation ids (menu.*, from #454) sit in the header

Brandon Thomasadcd28b11a6f
diff --git a/crates/ui-egui/tests/chrome_ui.rs b/crates/ui-egui/tests/chrome_ui.rs
index c5efaea0d..0e65f36c0 100644
--- a/crates/ui-egui/tests/chrome_ui.rs
+++ b/crates/ui-egui/tests/chrome_ui.rs
@@ -24,10 +24,10 @@ fn harness(show_header: bool, show_status_bar: bool) -> Harness<'static, Filmcra
harness
}
-/// Top and bottom edge of every registered element outside the header.
+/// Top and bottom edge of every registered element outside the header (the menu bar, `menu.*`, is part of it).
fn body_extent(h: &Harness<'static, FilmcraftApp>) -> (f32, f32) {
let els = h.state().auto.query("");
- let body: Vec<_> = els.iter().filter(|e| !e.id.starts_with("header.")).collect();
+ let body: Vec<_> = els.iter().filter(|e| !e.id.starts_with("header.") && !e.id.starts_with("menu.")).collect();
assert!(!body.is_empty(), "no panel elements registered");
let top = body.iter().map(|e| e.rect[1]).fold(f32::INFINITY, f32::min);
let bottom = body.iter().map(|e| e.rect[1] + e.rect[3]).fold(f32::NEG_INFINITY, f32::max);