@@ -132,8 +132,8 @@ def test_generate_html_includes_alpine_js(self, sample_benchmark_run, temp_dir):
132132 # Alpine.js should be loaded
133133 assert "alpinejs" in html_content .lower () or "alpine" in html_content .lower ()
134134
135- def test_generate_html_includes_tailwind (self , sample_benchmark_run , temp_dir ):
136- """Test that HTML includes Tailwind CSS."""
135+ def test_generate_html_includes_styling (self , sample_benchmark_run , temp_dir ):
136+ """Test that HTML includes styling (custom CSS with oa- prefix) ."""
137137 output_path = temp_dir / "output.html"
138138 generate_benchmark_html (
139139 run_data = sample_benchmark_run ,
@@ -142,14 +142,18 @@ def test_generate_html_includes_tailwind(self, sample_benchmark_run, temp_dir):
142142
143143 html_content = output_path .read_text ()
144144
145- # Tailwind should be loaded
146- assert "tailwindcss" in html_content .lower () or "tailwind" in html_content .lower ()
145+ # Implementation uses custom CSS with oa- prefix instead of Tailwind
146+ # Check for CSS variables and oa- prefixed classes
147+ assert "--oa-" in html_content # CSS variables
148+ assert "oa-" in html_content # Class prefix
147149
148150 def test_generate_html_with_sample_data (self , temp_dir ):
149- """Test generating HTML with automatically created sample data."""
151+ """Test generating HTML with sample data (use_real_data=False) ."""
150152 output_path = temp_dir / "sample_output.html"
153+ # use_real_data=False to explicitly request sample data
151154 result = generate_benchmark_html (
152155 output_path = output_path ,
156+ use_real_data = False ,
153157 )
154158
155159 assert result == str (output_path )
@@ -218,10 +222,11 @@ def test_generate_html_contains_filter_controls(self, sample_benchmark_run, temp
218222
219223 html_content = output_path .read_text ()
220224
221- # Filter controls
225+ # Filter controls - implementation uses Alpine.js with filters.domain/filters.status
222226 assert "All Domains" in html_content
223- assert "filterDomain" in html_content
224- assert "filterStatus" in html_content
227+ # Check for filter-related elements in the HTML
228+ assert "filters" in html_content # Alpine.js filter state
229+ assert "filter" in html_content .lower () # Filter-related elements
225230
226231 def test_generate_html_empty_run (self , temp_dir ):
227232 """Test generating HTML with an empty benchmark run."""
@@ -370,17 +375,18 @@ def test_html_has_viewport_meta(self, sample_benchmark_run, temp_dir):
370375 assert "viewport" in html_content
371376
372377 def test_html_has_dark_mode_support (self , sample_benchmark_run , temp_dir ):
373- """Test that HTML has dark mode support."""
378+ """Test that HTML has dark mode support via CSS variables (dark by default) ."""
374379 output_path = temp_dir / "output.html"
375380 generate_benchmark_html (
376381 run_data = sample_benchmark_run ,
377382 output_path = output_path ,
378383 )
379384
380385 html_content = output_path .read_text ()
381- # Check for dark mode class references
382- assert "dark:" in html_content
383- assert "darkMode" in html_content
386+ # Implementation uses CSS variables for dark theme (dark by default)
387+ # Check for dark background colors in CSS variables
388+ assert "--oa-bg-primary: #0a0a0f" in html_content # Dark background
389+ assert "--oa-text-primary: #f0f0f0" in html_content # Light text on dark bg
384390
385391 def test_html_has_footer_attribution (self , sample_benchmark_run , temp_dir ):
386392 """Test that HTML has footer with openadapt-viewer attribution."""
@@ -444,5 +450,7 @@ def test_html_no_xss_vulnerability(self, temp_dir):
444450 html_content = output_path .read_text ()
445451
446452 # The dangerous strings should be escaped
447- # Either HTML-escaped or JSON-escaped
448- assert "alert('xss')" not in html_content or "<script>" in html_content or "<\\ /script>" in html_content
453+ # Title should be HTML-escaped with < and >
454+ assert "<script>" in html_content # Escaped in title
455+ # Raw script tags in dangerous positions should be escaped
456+ assert "<script>alert" not in html_content # Not raw in HTML
0 commit comments