"""1.3.0 : page d'aide, plein écran, navigation, version.""" import re from shortstats.web import charts from .test_web import ORIGIN, app_client, login, users_file # noqa: F401 def test_help_page(app_client): r = app_client.get("/help", follow_redirects=False) assert r.status_code == 303 and r.headers["location"] == "/login" login(app_client) page = app_client.get("/help").text assert 'aria-current="page">Aide' in page and 'id="help-q"' in page and "help.js" in page # sections attendues et ancres utilisées ailleurs (page Thèmes -> /help#themes) for anchor in ("demarrer", "diagrammes", "axes-inverses", "analyse-thematique", "plein-ecran", "calendrier", "themes", "regex-syntaxe", "faq"): assert f'id="{anchor}"' in page, anchor # calendrier tiré du code : 151 étapes, une ligne par rythme assert "à 151 étapes" in page rows = re.findall(r"