Box the optional exact State menu target to bound message size
This commit is contained in:
@@ -1016,7 +1016,7 @@ async fn state_actions_trigger_captures_exact_row_without_owner_placement_and_st
|
||||
};
|
||||
assert_eq!(request.object, relation);
|
||||
assert_eq!(request.placement, None);
|
||||
assert_eq!(request.selection_target, Some(row.clone()));
|
||||
assert_eq!(request.selection_target.as_deref(), Some(&row));
|
||||
assert_eq!(request.canvas, f.app.state_context());
|
||||
let mut wrong = request.clone();
|
||||
wrong.placement = Some(f.a);
|
||||
@@ -1028,7 +1028,7 @@ async fn state_actions_trigger_captures_exact_row_without_owner_placement_and_st
|
||||
.app
|
||||
.update(Message::Menu(MenuEvent::Open(request.clone())));
|
||||
let opened = f.app.model_menu.as_ref().unwrap();
|
||||
assert_eq!(opened.request.selection_target, Some(row.clone()));
|
||||
assert_eq!(opened.request.selection_target.as_deref(), Some(&row));
|
||||
assert_eq!(opened.request.placement, None);
|
||||
assert_eq!(
|
||||
f.app.multiselect_snapshot().unwrap().targets(),
|
||||
@@ -1080,10 +1080,10 @@ async fn state_actions_trigger_captures_exact_row_without_owner_placement_and_st
|
||||
model_menu::Opened::new(&f.app, stale_row.clone(), 2).is_none(),
|
||||
"a fresh envelope cannot rebind the old row occurrence"
|
||||
);
|
||||
stale_row.selection_target = Some(Target::StateRow {
|
||||
stale_row.selection_target = Some(Box::new(Target::StateRow {
|
||||
placement: f.b,
|
||||
relation,
|
||||
});
|
||||
}));
|
||||
assert!(
|
||||
model_menu::Opened::new(&f.app, stale_row, 2).is_some(),
|
||||
"the replacement occurrence is independently visible"
|
||||
|
||||
Reference in New Issue
Block a user