From 40b9bcb5fda3cd61259f2e4d3e86c568f455c7bf Mon Sep 17 00:00:00 2001 From: slhx agent Date: Thu, 11 Jun 2026 19:58:54 +0200 Subject: [PATCH] fix(test): match hashed runtime asset selector Update the shared test selector to accept hemx-axum's content-hashed runtime script path instead of the old fixed /hemx.js path. req: axum/005 req: test/001 --- hemx-test/src/lib.rs | 2 +- hemx-test/tests/inspector.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hemx-test/src/lib.rs b/hemx-test/src/lib.rs index 695e2c8..edf4ee7 100644 --- a/hemx-test/src/lib.rs +++ b/hemx-test/src/lib.rs @@ -233,7 +233,7 @@ pub fn document_title_selector() -> &'static str { /// Build a selector for the hemx runtime script without exposing its asset path in tests. /// req: test/001 req: dx/006 pub fn runtime_script_selector() -> &'static str { - "script[src=\"/hemx.js\"]" + "script[src^=\"/hemx.\"][src$=\".js\"]" } /// Build a selector for any hemx root without spelling the attribute in tests. diff --git a/hemx-test/tests/inspector.rs b/hemx-test/tests/inspector.rs index 9915ce7..b4e7a2d 100644 --- a/hemx-test/tests/inspector.rs +++ b/hemx-test/tests/inspector.rs @@ -61,7 +61,7 @@ fn builds_authoring_boundary_selectors() { assert_eq!(hemx_test::document_title_selector(), "title"); assert_eq!( hemx_test::runtime_script_selector(), - r#"script[src="/hemx.js"]"# + r#"script[src^="/hemx."][src$=".js"]"# ); assert_eq!( hemx_test::target_selector(TestTarget(ResourceKind::Slot, 42)),