Various tweaks to theme, more code coverage

This commit is contained in:
Miguel Jacq 2025-11-06 11:47:00 +11:00
parent c3b83b0238
commit 7c3ec19748
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
17 changed files with 812 additions and 49 deletions

View file

@ -0,0 +1,19 @@
from bouquin.theme import Theme
def test_apply_link_css_dark_theme(open_window, qtbot):
win = open_window
# Switch to dark and apply link CSS
win.themes.set(Theme.DARK)
win._apply_link_css()
css = win.editor.document().defaultStyleSheet()
assert "#FFA500" in css and "a:visited" in css
def test_apply_link_css_light_theme(open_window, qtbot):
win = open_window
# Switch to light and apply link CSS
win.themes.set(Theme.LIGHT)
win._apply_link_css()
css = win.editor.document().defaultStyleSheet()
assert css == "" or "a {" not in css