@@ -121,28 +121,3 @@ fn arrows_move_the_selection_when_the_strip_has_focus() {
|
||||
vec![Filter::Popular, Filter::Recent, Filter::All, Filter::Recent]
|
||||
);
|
||||
}
|
||||
|
||||
/// The selected plate exists after a choice and settles on the chosen
|
||||
/// segment's slot; without it the active background disappears entirely.
|
||||
#[test]
|
||||
fn the_plate_settles_on_the_chosen_segment() {
|
||||
let (_cx, mut visual, changes) = filter_window();
|
||||
|
||||
click(&mut visual, point(px(70.), px(27.)));
|
||||
assert_eq!(*changes.borrow(), vec![Filter::Popular]);
|
||||
|
||||
// Let the spring settle in real time (it steps on Instant::now()), then
|
||||
// check the plate landed in Popular's slot (~58..124).
|
||||
std::thread::sleep(std::time::Duration::from_millis(600));
|
||||
visual.update(|window, cx| {
|
||||
window.draw(cx).clear(cx);
|
||||
});
|
||||
let plate = visual
|
||||
.debug_bounds("segmented-plate")
|
||||
.expect("plate missing");
|
||||
assert!(
|
||||
plate.left() >= px(44.) && plate.left() <= px(94.),
|
||||
"plate settled at x {:?}",
|
||||
plate.origin
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user