This commit is contained in:
@@ -55,51 +55,53 @@ def test_user_guide_documentation_contract() -> None:
|
||||
documentation = (ROOT / "stelloauth/DOCS.md").read_text(encoding="utf-8")
|
||||
for required_text in (
|
||||
REPOSITORY_URL,
|
||||
"Indstillinger → Apps → Installér app → ⋮ →",
|
||||
"Installér **Stelloauth**",
|
||||
"aktivér **Start ved opstart** og **Watchdog**",
|
||||
"Settings → Apps → Install app → ⋮ → Repositories",
|
||||
"Install **Stelloauth**",
|
||||
"enable **Start on boot** and **Watchdog**",
|
||||
"http://0031621f-stelloauth:8080/worker",
|
||||
"http://192.168.1.20:8080/worker",
|
||||
"Brand: Opel",
|
||||
"Country: DK",
|
||||
"Image: 2,571,693,650 bytes (2.571 GB decimal / 2452.56 MiB).",
|
||||
"Dokumenteret Task 4-måling: 121,5 MiB.",
|
||||
"Stop: cirka 9.3 sekunder.",
|
||||
"approximately 4 GB free",
|
||||
"Der er ikke gennemført et live MyOpel-login.",
|
||||
"Login-flow RAM: not measured without real MyOpel credentials.",
|
||||
"Fjernelse sker i **Indstillinger → Apps → Stelloauth → Afinstallér**.",
|
||||
"Image: 2,571,693,650 bytes (2.571 GB decimal / 2,452.56 MiB).",
|
||||
"Documented Task 4 measurement: 121.5 MiB.",
|
||||
"Stop time: about 9.3 seconds.",
|
||||
"A successful live MyOpel login has not been verified.",
|
||||
"Login-flow memory usage was not measured without real MyOpel credentials.",
|
||||
"**Settings → Apps → Stelloauth → Uninstall**",
|
||||
):
|
||||
assert required_text in documentation
|
||||
assert "deaktivér porttilknytningen igen" in documentation
|
||||
assert "Seneste idle RAM" not in documentation
|
||||
assert "Tilføjelser" not in documentation
|
||||
assert "Tilføjelsesbutik" not in documentation
|
||||
assert "Disable the port mapping again" in documentation
|
||||
assert "approximately 4 GB free" not in documentation
|
||||
assert "successful HAOS installation has not been verified" not in documentation
|
||||
|
||||
|
||||
def test_root_readme_repository_source_and_license_facts() -> None:
|
||||
readme = (ROOT / "README.md").read_text(encoding="utf-8")
|
||||
for required_text in (
|
||||
REPOSITORY_URL,
|
||||
"Indstillinger → Apps → Installér app → ⋮ → Repositorier",
|
||||
"Settings → Apps → Install app → ⋮ → Repositories",
|
||||
"v0.6.0",
|
||||
"367d4f8c02a3b072c59142c49dffc129edc8548b",
|
||||
"0.5.10",
|
||||
"f04c23da285b3b3d3cf10c8f9d282e7adc1d52ce",
|
||||
"CloakBrowser Binary License",
|
||||
"MIT-licenseret",
|
||||
"licensed under the MIT License",
|
||||
):
|
||||
assert required_text in readme
|
||||
assert "Tilføjelsesbutik" not in readme
|
||||
assert "Indstillinger" not in readme
|
||||
assert "Installér" not in readme
|
||||
|
||||
def test_translations_cover_every_option() -> None:
|
||||
keys = set(load_yaml("stelloauth/config.yaml")["options"])
|
||||
translations = {}
|
||||
for language in ("da", "en"):
|
||||
translation = load_yaml(f"stelloauth/translations/{language}.yaml")
|
||||
assert set(translation["configuration"]) == keys
|
||||
translations[language] = translation["configuration"]
|
||||
for entry in translation["configuration"].values():
|
||||
assert set(entry) == {"name", "description"}
|
||||
assert all(isinstance(value, str) and value.strip() for value in entry.values())
|
||||
assert translations["da"] == translations["en"]
|
||||
|
||||
|
||||
def test_dockerfile_uses_approved_pins_and_builds_patched_stelloauth() -> None:
|
||||
|
||||
Reference in New Issue
Block a user