summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests')
-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")