mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-04 19:42:12 -05:00
Cover Open alignment with a document tab
(cherry picked from commit 538d72b04e)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user