Cover Open alignment with a document tab

(cherry picked from commit 538d72b04e)
This commit is contained in:
FredApps
2026-12-01 17:33:40 +01:00
committed by FredApps
parent a8a8319350
commit 49b2780c3a
+12
View File
@@ -52,6 +52,18 @@ fn open_lines_up_with_the_document_tab_strip() {
assert!((open.center().y - strip.center().y).abs() <= 1.0, "Open {open:?} is off the strip {strip:?}");
}
#[test]
fn open_lines_up_with_the_document_tab_when_a_file_is_open() {
let h = harness(|app| {
app.open_bytes(&egui::Context::default(), "fixture.pdf", None, FIXTURE.to_vec()).unwrap();
});
let open = h.get_by_role_and_label(egui::accesskit::Role::Button, "Open…").rect();
let strip = h.get_by_label("Documents").rect();
let tab = h.get_by_role_and_label(egui::accesskit::Role::Tab, "fixture.pdf").rect();
assert!((open.center().y - strip.center().y).abs() <= 1.0, "Open {open:?} is off the strip {strip:?}");
assert!((open.center().y - tab.center().y).abs() <= 1.0, "Open {open:?} is off the tab {tab:?}");
}
/// Starting the app makes its Home and navigation rail icons available to the renderer.
#[test]
fn app_start_registers_its_icons() {