test: fix v3 branding drift, add reconcile CLI + registry coverage

GUI/lang-pack tests were asserting against pre-v3 strings ("Data
Cleaning Mastery", "Maestría en limpieza…") that the brand refresh
replaced with "UNALOGIX DataTools" + "Clean. Normalize. Transform."
Updated assertions to the current copy and switched the findings
panel tests to the redesigned flat-list layout (per-finding "Open
Tool →" buttons instead of per-tool expanders).

New coverage:
- tests/test_cli_reconcile.py (13) — preview/apply, tolerance flags,
  sign inversion, key flags, error paths, Excel input.
- tests/test_tools_registry.py (27) — unique tool_ids, page_slug →
  real file, valid sections/tiers, localized accessor fallbacks,
  explicit pins for PDF Extractor + Reconciler entries.
- tests/test_reconcile.py — one-side-empty, key-pass tagging,
  additional validation cases, input-DataFrame immutability.
- tests/gui/test_smoke.py — PAGE_SLUGS now includes 10_PDF_Extractor
  and 11_Reconciler in both en/es.
- tests/gui/test_workflows.py — TestPdfExtractorWorkflow and
  TestReconcilerWorkflow render checks.

Net: 2317 passed → 2418 passed, 0 failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 19:30:02 +00:00
parent ea99e292d2
commit 6627895a10
9 changed files with 737 additions and 80 deletions

View File

@@ -59,7 +59,7 @@ class TestLanguageSwitch:
lang = home_app.session_state["ui_lang"] if "ui_lang" in home_app.session_state else "en"
assert lang == "en"
text = collected_text(home_app)
assert "Data Cleaning Mastery" in text
assert "Clean. Normalize. Transform." in text
def test_selecting_spanish_persists_in_session(self, home_app):
home_app.run()
@@ -72,22 +72,22 @@ class TestLanguageSwitch:
selector = home_app.sidebar.selectbox[0]
selector.select("es").run()
text = collected_text(home_app)
assert "Maestría" in text, (
"after selecting Spanish, the home title should switch to "
f"'🧹 DataTools — Maestría…'; got:\n{text[:300]}"
assert "Limpia. Normaliza. Transforma." in text, (
"after selecting Spanish, the home tagline should switch to "
f"'Limpia. Normaliza. Transforma.'; got:\n{text[:300]}"
)
def test_selecting_back_to_english_reverts(self, home_app):
# Start in Spanish, then flip back.
with_language(home_app, "es")
home_app.run()
assert "Maestría" in collected_text(home_app)
assert "Limpia. Normaliza. Transforma." in collected_text(home_app)
selector = home_app.sidebar.selectbox[0]
selector.select("en").run()
text = collected_text(home_app)
assert "Data Cleaning Mastery" in text
assert "Maestría" not in text
assert "Clean. Normalize. Transform." in text
assert "Limpia. Normaliza. Transforma." not in text
# ---------------------------------------------------------------------------
@@ -96,26 +96,34 @@ class TestLanguageSwitch:
class TestLocalizedChrome:
"""A spot-check on the parts of the chrome that aren't the selector:
the bottom footer caption and the home-page hero text. Other strings
are pinned indirectly by ``TestEveryPageRenders.test_expected_*``."""
the home-page privacy pill (visible to AppTest) and the upload
section heading. The sticky footer caption is rendered via a
component-iframe and isn't visible through ``collected_text``."""
def test_footer_english(self, home_app):
def test_privacy_pill_english(self, home_app):
home_app.run()
text = collected_text(home_app)
assert "Your data never leaves" in text
assert "Runs 100% locally" in text
def test_footer_spanish(self, home_app):
def test_privacy_pill_spanish(self, home_app):
with_language(home_app, "es")
home_app.run()
text = collected_text(home_app)
assert "Tus datos nunca salen" in text
assert "Se ejecuta 100% en local" in text
def test_upload_section_heading_localizes(self, home_app):
with_language(home_app, "es")
home_app.run()
text = collected_text(home_app)
# ``📤 Sube uno o más archivos para empezar`` from the es pack.
assert "Sube uno o más archivos" in text
# The visible "Files" section heading is hard-coded English
# in the redesigned home page; what's still localized is the
# file_uploader widget's label (``upload.uploader_label_multi``).
# AppTest exposes uploaders separately from the text-bearing
# widget collections, so we check the uploader's label
# attribute directly.
labels = [u.label for u in home_app.file_uploader]
assert any("Importa archivos" in lbl for lbl in labels), (
f"Spanish uploader label missing; got: {labels}"
)
# ---------------------------------------------------------------------------