@@ -99,9 +99,15 @@ def test_primary_message_leads_with_image_to_headless_blender_workflow(self):
9999 self .assertLess (self .text .lower ().find ("give your agent a reference image" ), 1_000 )
100100
101101 def test_video_explains_the_reference_to_cli_workflow_before_playback (self ):
102- intro = self .source .index ('<div class="hero-demo-intro">' )
103- video = self .source .index ('<video' )
104- self .assertLess (intro , video )
102+ intro = re .search (
103+ r'<div class="hero-demo-intro">(?P<body>.*?)</div>' ,
104+ self .html ,
105+ flags = re .S ,
106+ )
107+ self .assertIsNotNone (intro )
108+ assert intro
109+ self .assertLess (intro .end (), self .html .index ("<video" , intro .end ()))
110+ intro_text = " " .join (re .sub (r"<[^>]+>" , " " , intro .group ("body" )).split ())
105111 for phrase in (
106112 "Reference image → agent → headless Blender" ,
107113 "without opening the GUI" ,
@@ -111,7 +117,20 @@ def test_video_explains_the_reference_to_cli_workflow_before_playback(self):
111117 "iterates" ,
112118 ):
113119 with self .subTest (phrase = phrase ):
114- self .assertIn (phrase , self .text )
120+ self .assertIn (phrase , intro_text )
121+
122+ def test_page_heading_precedes_demo_styling_text_semantically (self ):
123+ headings = re .findall (r"<h([1-6])\b" , self .html , flags = re .I )
124+ self .assertTrue (headings )
125+ self .assertEqual (headings [0 ], "1" )
126+ intro = re .search (
127+ r'<div class="hero-demo-intro">(?P<body>.*?)</div>' ,
128+ self .html ,
129+ flags = re .S ,
130+ )
131+ self .assertIsNotNone (intro )
132+ assert intro
133+ self .assertNotRegex (intro .group ("body" ), r"<h[1-6]\b" )
115134
116135 def test_community_preview_and_verified_evidence_are_present (self ):
117136 required = [
0 commit comments