()
| 223 | |
| 224 | #[test] |
| 225 | fn render_includes_scope_and_constraints() { |
| 226 | let node = CanonicalNode { |
| 227 | context: CONTEXT_URL.to_string(), |
| 228 | type_: NodeType::Intent.as_str().to_string(), |
| 229 | id: "urn:atomic:intent:render-1".to_string(), |
| 230 | human_key: "R-1".to_string(), |
| 231 | title: "Render".to_string(), |
| 232 | status: "todo".to_string(), |
| 233 | kind: default_kind(), |
| 234 | priority: None, |
| 235 | view: None, |
| 236 | motivated_by: None, |
| 237 | informed_by: Vec::new(), |
| 238 | has_acceptance_criterion: Vec::new(), |
| 239 | has_task: Vec::new(), |
| 240 | has_scope_in: vec![scope("urn:atomic:scope:r-1-scope-in-1", "the modal markup")], |
| 241 | has_scope_out: vec![scope( |
| 242 | "urn:atomic:scope:r-1-scope-out-1", |
| 243 | "persisting across reloads", |
| 244 | )], |
| 245 | has_constraint: vec![ |
| 246 | Constraint { |
| 247 | type_: NodeType::Constraint.as_str().to_string(), |
| 248 | id: "urn:atomic:constraint:r-1-constraint-1".to_string(), |
| 249 | text: "keep it local".to_string(), |
| 250 | }, |
| 251 | Constraint { |
| 252 | type_: NodeType::Constraint.as_str().to_string(), |
| 253 | id: "urn:atomic:constraint:r-1-constraint-2".to_string(), |
| 254 | text: "do not touch the keyboard handler".to_string(), |
| 255 | }, |
| 256 | ], |
| 257 | depends_on: vec![Ref { |
| 258 | type_: None, |
| 259 | id: None, |
| 260 | to: "urn:atomic:intent:xyz".to_string(), |
| 261 | edge: "blockedBy".to_string(), |
| 262 | }], |
| 263 | why: Some("a reason".to_string()), |
| 264 | content_hash: None, |
| 265 | attributed_to: None, |
| 266 | created_at: "2026-06-25T00:00:00Z".to_string(), |
| 267 | proof: None, |
| 268 | }; |
| 269 | |
| 270 | let text = render(&node, Target::Cli); |
| 271 | assert!(text.contains("Out of Scope"), "render:\n{text}"); |
| 272 | assert!(text.contains("persisting across reloads")); |
| 273 | assert!(text.contains("keep it local")); |
| 274 | assert!(text.contains("do not touch the keyboard handler")); |
| 275 | // Dependency rendered as 'edge -> to'. |
| 276 | assert!(text.contains("blockedBy")); |
| 277 | assert!(text.contains("blockedBy -> urn:atomic:intent:xyz")); |
| 278 | } |
| 279 | |
| 280 | #[test] |
| 281 | fn render_memory_regenerates_status_from_spine() { |
nothing calls this directly
no test coverage detected