Skip to content

Commit 2eb4269

Browse files
committed
Update test_dataset_to_html to reflect color change from blue to #5294e2
1 parent f09ca1e commit 2eb4269

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

guidata/tests/unit/test_dataset_to_html.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ class ComplexDataset(gds.DataSet):
4848

4949
class DatasetWithComment(
5050
gds.DataSet,
51-
comment="This is the comment that should appear in blue\nin the HTML output.",
51+
comment=(
52+
"This is the comment that should appear in lighter blue\n"
53+
"in the HTML output."
54+
),
5255
):
5356
"""A dataset with title and comment"""
5457

@@ -68,7 +71,7 @@ def test_simple_dataset_to_html():
6871

6972
# Check title is present and styled (uses first line of docstring)
7073
expected_title = (
71-
'<u><b style="color: blue">Simple dataset for testing HTML output</b></u>'
74+
'<u><b style="color: #5294e2">Simple dataset for testing HTML output</b></u>'
7275
)
7376
assert expected_title in html
7477

@@ -94,7 +97,7 @@ def test_complex_dataset_to_html():
9497

9598
# Check title (uses first line of docstring)
9699
expected_title = (
97-
'<u><b style="color: blue">'
100+
'<u><b style="color: #5294e2">'
98101
"Dataset with various item types and BoolItem configurations"
99102
"</b></u>"
100103
)
@@ -129,13 +132,13 @@ def test_dataset_with_comment():
129132

130133
# Check title (uses first line of docstring)
131134
expected_title = (
132-
'<u><b style="color: blue">A dataset with title and comment</b></u>'
135+
'<u><b style="color: #5294e2">A dataset with title and comment</b></u>'
133136
)
134137
assert expected_title in html
135138

136-
# Check comment is present and styled in blue
137-
assert '<span style="color: blue">' in html
138-
assert "This is the comment that should appear in blue" in html
139+
# Check comment is present and styled with the lighter blue
140+
assert '<span style="color: #5294e2">' in html
141+
assert "This is the comment that should appear in lighter blue" in html
139142

140143

141144
def test_bool_item_combinations():
@@ -174,7 +177,7 @@ def test_empty_dataset():
174177

175178
# Should have title (uses first line of docstring)
176179
expected_title = (
177-
'<u><b style="color: blue">Empty dataset for edge case testing</b></u>'
180+
'<u><b style="color: #5294e2">Empty dataset for edge case testing</b></u>'
178181
)
179182
assert expected_title in html # Should indicate no items
180183
assert "No items to display" in html
@@ -375,8 +378,8 @@ class VisualizationDataset(gds.DataSet):
375378
<div class="container">
376379
<h2>Key Features Demonstrated</h2>
377380
<ul>
378-
<li><strong>Title and Comment:</strong> Displayed in blue using the first
379-
line of the docstring as title</li>
381+
<li><strong>Title and Comment:</strong> Displayed in lighter blue
382+
(#5294e2) using the first line of the docstring as title</li>
380383
<li><strong>Two-column Layout:</strong> Item names right-aligned,
381384
values left-aligned</li>
382385
<li><strong>BoolItem Checkboxes:</strong> ☑ for True, ☐ for False</li>

0 commit comments

Comments
 (0)