Add additional tests to the network interface (#4370)

* Add a network interface invariant validator and characterization tests as a refactor safety net

* Characterize stack, chain, layer move, signature edit, and preview behaviors in tests

* Sweep network interface invariants after every message in editor tests
This commit is contained in:
Keavon Chambers
2026-07-23 22:20:55 -07:00
committed by GitHub
parent 5c3982fff2
commit e00dab0dc4
4 changed files with 447 additions and 0 deletions

View File

@@ -77,6 +77,10 @@ impl EditorTestUtils {
panic!("Failed to evaluate graph: {e}");
}
// Sweep the network interface's structural invariants so any desync fails at the message that caused it
let violations = self.active_document().network_interface.validate_invariants();
assert!(violations.is_empty(), "Network interface invariant violations:\n{}", violations.join("\n"));
frontend_messages_from_msg
}