Compose saved Scenario authoring with current Text and input authority

This commit is contained in:
2026-09-23 00:25:20 -07:00
parent 5960563b23
commit 6f4dfc67b3
78 changed files with 14097 additions and 318 deletions
@@ -49,11 +49,28 @@ fn fixture(layer: Layer, kind: Kind) -> (App, Id, Id, Id) {
p.diagrams.get_mut(&view).unwrap().name = "Unrelated architecture".into();
p.place(view, reused, Position { x: 873., y: 421. });
let mut app = App::with_project(p);
app.layer = layer;
app.page = Page::Behavior;
app.selected = root;
app.behavior.active_owner = Some(root);
app.refresh_draft();
let accepted = app.document.snapshot();
// Enter through the actual navigation path: assigning Page/owner alone does
// not create the representation and live visit required by canvas events.
send(&mut app, Message::Select(root));
send(&mut app, Message::Page(Page::Behavior));
assert_eq!(app.layer, layer);
assert_eq!(app.page, Page::Behavior);
assert_eq!(app.selected, root);
assert_eq!(app.behavior.active_owner, Some(root));
if kind == Kind::Scenario {
let context = app.scenario_context().unwrap();
assert_eq!(context.document, app.canvas_document);
assert_eq!(context.scenario, root);
assert_eq!(
context.representation,
crate::behavior::scenario_layout::Representation::Derived { owner: root }
);
assert!(!context.visit.is_nil());
}
assert!(Arc::ptr_eq(&accepted, &app.document.snapshot()));
assert_eq!(app.source_workspace.bundle(), accepted.bundle);
assert!(!app.document.can_undo() && !app.document.can_redo());
(app, root, work, reused)
}