Formulaire public : encart de paiement de la cotisation via Yapla
FormTemplate.yapla_url (lien vers la page de cotisation Yapla, doit commencer par http(s)://, PATCH .../form comme description/is_open) fait apparaître un encart « Payer ma cotisation » sous la case WILLING_TO_PAY_FEE, sur le formulaire public. Configurable depuis le panneau « Personnalisation » de l'écran /inscriptions. La case reste une simple déclaration : rien ne vérifie que le paiement a eu lieu. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8f8350aa1b
commit
5f80f167c8
@@ -74,6 +74,28 @@ def test_clearing_description_with_an_explicit_null(client, edition):
|
||||
assert resp.json()["description"] is None
|
||||
|
||||
|
||||
def test_no_yapla_link_by_default(client, raw_client, edition):
|
||||
assert client.get(_form_url(edition)).json()["yapla_url"] is None
|
||||
assert raw_client.get(_form_url(edition, "/public")).json()["yapla_url"] is None
|
||||
|
||||
|
||||
def test_setting_the_yapla_link(client, raw_client, edition):
|
||||
resp = client.patch(
|
||||
_form_url(edition), json={"yapla_url": "https://yapla.com/exemple/cotisation"}
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
assert resp.json()["yapla_url"] == "https://yapla.com/exemple/cotisation"
|
||||
|
||||
body = raw_client.get(_form_url(edition, "/public")).json()
|
||||
assert body["yapla_url"] == "https://yapla.com/exemple/cotisation"
|
||||
|
||||
|
||||
def test_rejects_a_yapla_link_without_a_scheme(client, edition):
|
||||
resp = client.patch(_form_url(edition), json={"yapla_url": "yapla.com/exemple"})
|
||||
assert resp.status_code == 422
|
||||
assert resp.json()["detail"]["code"] == "form.invalid_yapla_url"
|
||||
|
||||
|
||||
def test_logo_is_coordinator_only(edition, make_account, as_account):
|
||||
lead = make_account(Role.LEAD, email="lead@e.fr")
|
||||
lead_client = as_account(lead)
|
||||
|
||||
Reference in New Issue
Block a user