mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-07 03:55:26 +00:00
Add test case for dark-mode
This commit is contained in:
parent
4c0484a1a5
commit
e78ef36e03
9
tests/dark-mode/conf.py
Normal file
9
tests/dark-mode/conf.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
project = "dark-mode"
|
||||||
|
copyright = "2024, Adrian Vollmer"
|
||||||
|
author = "Adrian Vollmer"
|
||||||
|
version = "0.0.1"
|
||||||
|
|
||||||
|
extensions = ["sphinx_rtd_dark_mode"]
|
||||||
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv"]
|
||||||
|
html_theme = "sphinx_rtd_theme"
|
||||||
|
default_dark_mode = True
|
9
tests/dark-mode/index.rst
Normal file
9
tests/dark-mode/index.rst
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Welcome
|
||||||
|
=======
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
Chapters
|
||||||
|
========
|
3
tests/dark-mode/requirements.txt
Normal file
3
tests/dark-mode/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sphinx == 6
|
||||||
|
sphinx-rtd-dark-mode
|
||||||
|
-e ../..
|
@ -144,3 +144,13 @@ def test_multi_page_search(selenium_drivers):
|
|||||||
span = selenium.find_elements(By.CSS_SELECTOR, "span.highlighted")
|
span = selenium.find_elements(By.CSS_SELECTOR, "span.highlighted")
|
||||||
|
|
||||||
assert span == []
|
assert span == []
|
||||||
|
|
||||||
|
|
||||||
|
def test_dark_mode(selenium_drivers):
|
||||||
|
path = Path("//mnt//dark-mode//_build//zundler//index.html")
|
||||||
|
selenium = selenium_drivers["firefox"]
|
||||||
|
selenium.get(path.as_uri())
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
assert "dark-mode documentation" in selenium.title
|
||||||
|
Loading…
x
Reference in New Issue
Block a user