All checks were successful
Zapret source guards / validate (push) Successful in 8s
Seen on the real Linux desktop: the hosts page and its tour step called the file "список Windows". Other systems get the neutral wording (page.hosts.subtitle.basic, tour step hosts_summary_basic with a note that /etc/hosts is edited by the system service, no password); Windows keeps its text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
16 lines
732 B
Python
16 lines
732 B
Python
"""The hosts page says "Windows list" only on Windows."""
|
|
from __future__ import annotations
|
|
|
|
from app.ui_texts import TEXTS
|
|
from hosts.ui import page
|
|
from platforms.stub import make_platform
|
|
|
|
|
|
def test_the_subtitle_names_windows_only_on_windows(monkeypatch) -> None:
|
|
monkeypatch.setattr("platforms.current", lambda: make_platform(name="windows"))
|
|
assert page._subtitle_key() == "page.hosts.subtitle"
|
|
monkeypatch.setattr("platforms.current", lambda: make_platform(name="linux"))
|
|
assert page._subtitle_key() == "page.hosts.subtitle.basic"
|
|
for language in ("ru", "en"):
|
|
assert "Windows" in TEXTS["page.hosts.subtitle"][language]
|
|
assert "Windows" not in TEXTS["page.hosts.subtitle.basic"][language]
|