()
| 496 | |
| 497 | #[test] |
| 498 | fn render_includes_scope_and_constraints() { |
| 499 | let node = CanonicalNode { |
| 500 | context: CONTEXT_URL.to_string(), |
| 501 | type_: NodeType::Intent.as_str().to_string(), |
| 502 | id: "urn:atomic:intent:render-1".to_string(), |
| 503 | human_key: "R-1".to_string(), |
| 504 | title: "Render".to_string(), |
| 505 | status: "todo".to_string(), |
| 506 | kind: default_kind(), |
| 507 | priority: None, |
| 508 | view: None, |
| 509 | motivated_by: None, |
| 510 | informed_by: Vec::new(), |
| 511 | has_acceptance_criterion: Vec::new(), |
| 512 | has_task: Vec::new(), |
| 513 | has_scope_in: vec![scope("urn:atomic:scope:r-1-scope-in-1", "the modal markup")], |
| 514 | has_scope_out: vec![scope( |
| 515 | "urn:atomic:scope:r-1-scope-out-1", |
| 516 | "persisting across reloads", |
| 517 | )], |
| 518 | has_constraint: vec![ |
| 519 | Constraint { |
| 520 | type_: NodeType::Constraint.as_str().to_string(), |
| 521 | id: "urn:atomic:constraint:r-1-constraint-1".to_string(), |
| 522 | text: "keep it local".to_string(), |
| 523 | }, |
| 524 | Constraint { |
| 525 | type_: NodeType::Constraint.as_str().to_string(), |
| 526 | id: "urn:atomic:constraint:r-1-constraint-2".to_string(), |
| 527 | text: "do not touch the keyboard handler".to_string(), |
| 528 | }, |
| 529 | ], |
| 530 | depends_on: vec![Ref { |
| 531 | declaration_evidence: None, |
| 532 | type_: None, |
| 533 | id: None, |
| 534 | to: "urn:atomic:intent:xyz".to_string(), |
| 535 | edge: "blockedBy".to_string(), |
| 536 | }], |
| 537 | why: Some("a reason".to_string()), |
| 538 | content_hash: None, |
| 539 | attributed_to: None, |
| 540 | created_at: "2026-06-25T00:00:00Z".to_string(), |
| 541 | proof: None, |
| 542 | }; |
| 543 | |
| 544 | let text = render(&node, Target::Cli); |
| 545 | assert!(text.contains("Out of Scope"), "render:\n{text}"); |
| 546 | assert!(text.contains("persisting across reloads")); |
| 547 | assert!(text.contains("keep it local")); |
| 548 | assert!(text.contains("do not touch the keyboard handler")); |
| 549 | // Dependency rendered as 'edge -> to'. |
| 550 | assert!(text.contains("blockedBy")); |
| 551 | assert!(text.contains("blockedBy -> urn:atomic:intent:xyz")); |
| 552 | } |
| 553 | |
| 554 | #[test] |
| 555 | fn render_memory_regenerates_status_from_spine() { |
nothing calls this directly
no test coverage detected