From d2fe7acc949902a10f529e9018193db31b0fa6b2 Mon Sep 17 00:00:00 2001 From: Drake Stapleton Date: Wed, 4 Nov 2026 16:08:51 -0600 Subject: [PATCH] test: find the call-to-humanity PageInfo in seo.rs by content, not line 128 --- crates/site-builder/src/components/machines.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/site-builder/src/components/machines.rs b/crates/site-builder/src/components/machines.rs index c5898dc3..a560c51c 100644 --- a/crates/site-builder/src/components/machines.rs +++ b/crates/site-builder/src/components/machines.rs @@ -3322,8 +3322,11 @@ Published: yesterday. assert!(comparison_problem_on("call-to-humanity/index.html", &format!("Done when: {}", row.sentence)).is_some()); } let seo = include_str!("../seo.rs"); - let seo_line = seo.lines().nth(127).expect("seo.rs line 128"); - assert!(seo_line.contains(summary), "the page summary is seo.rs line 128"); + let seo_line = seo + .lines() + .find(|line| line.contains("path: \"/call-to-humanity/\"")) + .expect("seo.rs has a PageInfo for /call-to-humanity/"); + assert!(seo_line.contains(summary), "the /call-to-humanity/ PageInfo carries the page summary"); let html = include_str!("../../../../public/call-to-humanity/index.html"); let html_lines: Vec<_> = html.lines().collect(); assert!(html_lines[6].contains(summary), "line 7 is the page summary");