from pathlib import Path

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


def test_probe_is_safe_by_default():
    text = SCRIPT.read_text(encoding="utf-8")
    assert "--execute-convert" in text
    assert "--confirm-document" in text
    assert "conversion_executed=False" in text
    assert "passa --confirm-document exatamente igual" in text


def test_probe_has_explicit_body_candidates_and_pdf_check():
    text = SCRIPT.read_text(encoding="utf-8")
    assert "current_empty" in text
    assert "explicit_invoice_type_serie" in text
    assert "explicit_invoice_type_serie_plus_print_fields" in text
    assert "non_a4_or_unexpected_mediabox" in text
    assert "MediaBox" in text
