test: cover help_md keys, header smoke, and bilingual ES smoke
Two stale Spanish smoke assertions still expected English page titles
for PDF Extractor and Reconciler — the i18n work landed real
translations ("PDF a CSV", "Reconciliar dos archivos"), so refresh the
expected substrings and the surrounding comment.
Add new coverage for the help-popover feature:
- TestHelpPopoverKeys (test_lang_packs): every tool_id resolves a
non-empty tools.<id>.help_md in BOTH packs; help.button_label and
help.missing_body resolve in both.
- TestDescriptionCopy (test_tools_registry): every Tool.description
non-empty and under 120 chars — pins the post-jargon-scrub copy
so future drift back into multi-clause prose is loud.
- TestRenderToolHeaderSmoke: render_tool_header is callable, listed
in components.__all__, and every i18n key it touches resolves in
both packs. Runs without a Streamlit script context.
Suite: 2427 passed (+9 new), 91 skipped.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,12 +63,11 @@ EXPECTED_SUBSTRINGS: dict[str, dict[str, str]] = {
|
||||
"7_Multi_File_Merger": {"en": "Combine Files", "es": "Combinar archivos"},
|
||||
"8_Validator_Reporter": {"en": "Quality Check", "es": "Verificación de calidad"},
|
||||
"9_Pipeline_Runner": {"en": "Automated", "es": "Flujos automatizados"},
|
||||
# The PDF Extractor and Reconciler pages are English-only today
|
||||
# (translations tracked as a follow-up). The smoke test value is
|
||||
# still that the page *renders at all* in 'es'; the substring is
|
||||
# the same English hero text under both languages.
|
||||
"10_PDF_Extractor": {"en": "PDF to CSV", "es": "PDF to CSV"},
|
||||
"11_Reconciler": {"en": "Reconcile", "es": "Reconcile"},
|
||||
# PDF Extractor + Reconciler page titles are now translated in
|
||||
# both packs (``tools.<id>.page_title``). Their hero copy diverges
|
||||
# by language, so the smoke test pins the localized substring.
|
||||
"10_PDF_Extractor": {"en": "PDF to CSV", "es": "PDF a CSV"},
|
||||
"11_Reconciler": {"en": "Reconcile", "es": "Reconciliar"},
|
||||
"99_Close": {"en": "Shutting down", "es": "Cerrando"},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user