commit 04e546e8045fe4a27f64db966b2d507236429402
parent 71a906114de24507b6715f156a0f0e0ae82ae9d7
Author: triesap <tyson@radroots.org>
Date: Thu, 16 Jul 2026 08:20:30 +0000
runtime: test Phase 1 object page routing
- assert fixture object pages carry routeable object refs
- assert object page summaries include navigation authority gates
Diffstat:
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git a/crates/mobile_core/src/runtime/product_surface.rs b/crates/mobile_core/src/runtime/product_surface.rs
@@ -1239,6 +1239,31 @@ mod tests {
}
#[test]
+ fn object_page_fixtures_carry_routeable_refs_and_navigation_authority() {
+ let pages = fixture_object_page_summaries(None);
+ assert_eq!(pages.len(), CANONICAL_OBJECT_PAGE_FAMILIES.len());
+
+ for (page, family) in pages.iter().zip(CANONICAL_OBJECT_PAGE_FAMILIES) {
+ assert_eq!(page.family, family);
+ assert_eq!(page.object_ref.object_type, object_kind_for_page(family));
+ assert_eq!(
+ page.required_authority.action,
+ AuthorityAction::NavigateRelatedObject
+ );
+ assert_eq!(
+ page.required_authority.domain,
+ AuthorityDomain::RelayGroupAccess
+ );
+ assert_eq!(
+ page.required_authority.context.context_ref.object_id,
+ page.primary_context.context_ref.object_id
+ );
+ assert!(!page.object_ref.object_id.is_empty());
+ assert!(!page.title.is_empty());
+ }
+ }
+
+ #[test]
fn serde_names_preserve_product_vocabulary() {
assert_eq!(
serde_json::to_value(WorkflowActor::NetworkMember).expect("serialize actor"),