Fiches de poste : message de l'organisation en bas de chaque page
ci-cd / build-backend (push) Successful in 29s
ci-cd / build-frontend (push) Successful in 7s
ci-cd / deploy (push) Successful in 11s

Edition.volunteer_message imprimé en pied de chaque page (suite d'une
feuille comprise), la marge du bas agrandie de sa hauteur ; rien sans
message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AdamThomas
2026-10-28 19:11:33 +01:00
co-authored by Claude Opus 5.5
parent c6ea7378c7
commit cc8c2e61ab
6 changed files with 126 additions and 5 deletions
+22
View File
@@ -174,3 +174,25 @@ def test_a_night_that_passes_midnight_stays_on_its_festival_day(client, edition,
text = reader.pages[0].extract_text()
assert "jeudi 9 juillet" in text.lower()
assert "01:00" in text
def test_organisation_message_is_passed_as_the_page_footer(client, edition, session, monkeypatch):
import app.api.position_sheets as sheets_api
captured = {}
original = sheets_api.generate_position_sheets_pdf
def spy(sheets, footer=None):
captured["footer"] = footer
return original(sheets, footer)
monkeypatch.setattr(sheets_api, "generate_position_sheets_pdf", spy)
position = make_position(session, edition)
make_shift(session, edition, position, start=dt_at(9, 19), end=dt_at(9, 22))
assert client.post(_url(edition), json={}).status_code == 200
assert captured["footer"] is None
client.patch(f"/editions/{edition.id}", json={"volunteer_message": "Repas à 18h30"})
assert client.post(_url(edition), json={}).status_code == 200
assert captured["footer"].message == "Repas à 18h30"