PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
test(ui): the Format text narrow-pane test checks the font list against the pane's content edge (#5634)
RiceDee8f1d23d991ff
diff --git a/crates/ui-egui/tests/it/content.rs b/crates/ui-egui/tests/it/content.rsindex f7f595c2d..c4d222382 100644--- a/crates/ui-egui/tests/it/content.rs+++ b/crates/ui-egui/tests/it/content.rs@@ -739,6 +739,9 @@ fn format_text_fits_the_tools_pane_at_its_narrowest() {for (label, r) in rects {assert!(r.right() <= font.right() + 0.5, "{label} {r:?} reaches past the font list ({font:?})");}+ // The font list ends where the pane's own content does: the header's Close button is its right edge.+ let close = h.get_by_label("Close panel").rect();+ assert!((font.right() - close.right()).abs() < 1.5, "the font list {font:?} is not at the pane's content edge ({close:?})");// The rows below scroll, and the scrollbar floats over their right edge: they stop short of it.let image = h.get_by_label("Image").rect();assert!(image.right() <= font.right() - 17.0, "the Image row {image:?} runs under the scrollbar ({font:?})");