aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_match_result_text.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-17 23:54:17 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-17 23:54:17 +0200
commit8f9741955133858545905b0e66b8b2f90b000710 (patch)
tree4c7801928b29efce6c3f40b32d9e14e709162507 /packages/meshbay-hub/tests/test_match_result_text.py
parent9462ac3067ce68ad90a3527b2144b86bd87bf89e (diff)
downloadmeshbay-main.tar.gz
fix(spa): match results keep the theme's text colorHEAD0.21main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_match_result_text.py')
-rw-r--r--packages/meshbay-hub/tests/test_match_result_text.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_match_result_text.py b/packages/meshbay-hub/tests/test_match_result_text.py
new file mode 100644
index 00000000..d48c7df3
--- /dev/null
+++ b/packages/meshbay-hub/tests/test_match_result_text.py
@@ -0,0 +1,20 @@
+"""
+A TMDB match result is a `<button>`, and a button does not inherit the page's
+text color: it takes the browser's `buttontext`, which follows the system's
+dark mode, not MeshBay's theme. With the system dark and the theme light, the
+titles were white on the panel's white. The row inherits the panel's color.
+"""
+
+import re
+from pathlib import Path
+
+STYLE = (Path(__file__).resolve().parents[1] / "src" / "meshbay_hub"
+ / "static" / "style.css")
+
+
+def test_a_match_result_inherits_the_panels_text_color():
+ css = STYLE.read_text(encoding="utf-8")
+ rule = re.search(r"^\.video-search-result \{([^}]*)\}", css, re.M)
+ assert rule, "no .video-search-result rule"
+ assert re.search(r"^\s*color:\s*inherit;", rule.group(1), re.M), (
+ "the result button keeps the browser's button text color")