Discover custom ViewModels and validate Computed bindings in shared hosts

This commit is contained in:
2026-11-13 13:27:23 +01:00
parent 5a208d2336
commit 99d93a11fc
46 changed files with 1397 additions and 64 deletions
@@ -54,6 +54,26 @@ public final class ConnectedWorkflowContract {
&& t.property().equals("text")
&& t.status().equals("COMPATIBLE")),
"Compatible binding target discovery");
check(
bindings.viewModel().equals("fixture.components.PersonViewModel"),
"Custom ViewModel identity lost in transport");
check(
bindings.computed().stream().anyMatch(m -> m.method().equals("#greeting")),
"Computed methods lost in transport");
try (var badge =
await(host.documents().open(file.resolveSibling("BadgeCard.fxml").toUri()))) {
var metadata =
await(
workflow.bindingDetails(
false, await(badge.snapshot()), "badge", "view", "badge", "text"));
check(
metadata.controller().equals("fixture.components.BadgeCard"),
"Captured resource did not select Component Controller");
check(
metadata.viewModel().equals("fixture.components.BadgeViewModel"),
"Component ViewModel not selected");
check(metadata.problems().isEmpty(), "Component metadata rejected: " + metadata.problems());
}
var complex = await(workflow.bindings(false, initial, "home", "both"));
check(
complex.targets().stream()