Discover Model paths and compatible binding targets in both hosts
Add non-constructing target metadata and a shared read-only browser for the Person fixtures. Negotiate binding discovery independently, preserve FXML, and explain direction/type mismatches. Record remaining manual navigation checks as explicitly skipped.
This commit is contained in:
+33
@@ -60,6 +60,39 @@ public final class PreviewChecks {
|
||||
System.out.println("PASS discovery " + checks);
|
||||
return;
|
||||
}
|
||||
if (mode.equals("bindings")) {
|
||||
String xml;
|
||||
try (var in = loader.getResourceAsStream("fixture/components/Person.fxml")) {
|
||||
xml = new String(in.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8);
|
||||
}
|
||||
var metadata = BindingDiscovery.inspect(xml, "home", "both", loader);
|
||||
check(
|
||||
metadata.attributes().stream().anyMatch(a -> a.path().equals("home.street")),
|
||||
"Nested metadata");
|
||||
check(
|
||||
metadata.attributes().stream()
|
||||
.anyMatch(
|
||||
a ->
|
||||
a.path().equals("visits") && a.elementType().equals("fixture.model.Address")),
|
||||
"Collection element metadata");
|
||||
check(
|
||||
metadata.targets().stream()
|
||||
.anyMatch(
|
||||
t ->
|
||||
t.control().equals("card")
|
||||
&& t.property().equals("model")
|
||||
&& t.status().equals("COMPATIBLE")),
|
||||
"Component Model target metadata");
|
||||
check(
|
||||
System.getProperty("fixture.person.initialized") == null, "Discovery initialized Person");
|
||||
check(System.getProperty("fixture.models") == null, "Discovery constructed Model");
|
||||
check(System.getProperty("fixture.controllers") == null, "Discovery constructed Controller");
|
||||
check(
|
||||
System.getProperty("fixture.provider.initialized") == null,
|
||||
"Discovery initialized provider");
|
||||
System.out.println("PASS bindings " + checks);
|
||||
return;
|
||||
}
|
||||
var started = new CountDownLatch(1);
|
||||
Platform.startup(
|
||||
() -> {
|
||||
|
||||
Reference in New Issue
Block a user