from pathlib import Path

SCRIPT = Path("scripts/probe_jasmin_invoice_print_template_models.py")


def test_probe_script_contains_ui_model_keys_and_is_guarded():
    text = SCRIPT.read_text(encoding="utf-8")
    assert "probe_jasmin_invoice_print_template_models" in text
    assert "Document" in text
    assert "SlipWithShippingDetails" in text
    assert "/reporting/templates/list?listname=templates" in text
    assert "--probe-post" in text
    assert "--confirm-invoice" in text


def test_probe_outputs_are_tmp_files():
    text = SCRIPT.read_text(encoding="utf-8")
    assert "/tmp/clientflow_jasmin_invoice_print_template_models_probe" in text
    assert "JSON:" in text
    assert "Markdown:" in text
    assert "CSV:" in text
