diff --git a/crates/ui-patterns/tests/it/form_dialogs/path_row.rs b/crates/ui-patterns/tests/it/form_dialogs/path_row.rs index f0072f019b..cd05ebf265 100644 --- a/crates/ui-patterns/tests/it/form_dialogs/path_row.rs +++ b/crates/ui-patterns/tests/it/form_dialogs/path_row.rs @@ -20,13 +20,12 @@ fn row_in(width: f32) -> Fixture { fn browse_shows_its_whole_label_inside_a_narrow_column() { for width in [360.0, 260.0, 200.0] { let fixture = row_in(width); - let shown = fixture.shown(); let label = fixture.texts().iter().find(|run| run.text == "Browse…").cloned(); let label = label .unwrap_or_else(|| panic!("{width}: Browse… is painted: {:?}", fixture.texts().iter().map(|run| run.text.clone()).collect::>())); assert!(!label.elided, "{width}: the Browse label is not cut"); let button = fixture.by_label("Browse…").expect("the Browse button"); - assert!(button.rect.right() <= shown.right() + 0.5, "{width}: the button {:?} ends inside the column {shown:?}", button.rect); + assert!(button.rect.right() <= width + 0.5, "{width}: the button {:?} ends inside the column of width {width}", button.rect); assert!( label.rect.left() >= button.rect.left() - 0.5 && label.rect.right() <= button.rect.right() + 0.5, "{width}: the label {:?} lies inside the button {:?}",