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:
@@ -152,6 +152,48 @@ class TestPipelineRunnerWorkflow:
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# PDF to CSV — file-uploader-driven so we can't fully exercise the
|
||||
# scan flow through AppTest. Pin the initial render (which carries the
|
||||
# dep-status banner when deps are missing) so a future regression in
|
||||
# the dep guard shows up here.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
class TestPdfExtractorWorkflow:
|
||||
def test_page_renders_without_upload(self, app_factory):
|
||||
app = app_factory("10_PDF_Extractor")
|
||||
app.run()
|
||||
assert not app.exception
|
||||
text = collected_text(app)
|
||||
assert "PDF to CSV" in text
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Reconcile Two Files — early-exits at ``st.stop()`` without both
|
||||
# uploads. Pin both the no-upload state and the title.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
class TestReconcilerWorkflow:
|
||||
def test_page_renders_without_uploads(self, app_factory):
|
||||
app = app_factory("11_Reconciler")
|
||||
app.run()
|
||||
assert not app.exception
|
||||
text = collected_text(app)
|
||||
assert "Reconcile" in text
|
||||
|
||||
def test_prompts_for_both_uploads_when_empty(self, app_factory):
|
||||
# ``st.info("Upload both files to continue.")`` fires when
|
||||
# either side is missing; that text is the contract we test
|
||||
# against — if the prompt disappears the user has no idea
|
||||
# what to do next.
|
||||
app = app_factory("11_Reconciler")
|
||||
app.run()
|
||||
info_messages = [i.body for i in app.info if hasattr(i, "body")]
|
||||
assert any("Upload both files" in m for m in info_messages), (
|
||||
f"missing 'Upload both files' prompt; got: {info_messages}"
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Coming-Soon pages still render (just a stub) — pinned so we know if a
|
||||
# Coming-Soon goes from "stub renders" to "import error".
|
||||
|
||||
Reference in New Issue
Block a user