Various tweaks to theme, more code coverage
This commit is contained in:
parent
c3b83b0238
commit
7c3ec19748
17 changed files with 812 additions and 49 deletions
19
tests/test_theme_integration.py
Normal file
19
tests/test_theme_integration.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue