Check-in: Show more information (#3576)

* Check-in: Show more information

* Add change notes

* Rebase migration

* Add "expand" option to checkinrpc

* REmove accidental file

* Docs fixes

* REbase migration

* Rebase migration

* Fix typo

* REbase migration

* Make web-checkin look more like new android checkin
This commit is contained in:
Raphael Michel
2023-11-28 14:52:12 +01:00
committed by GitHub
parent ab28086779
commit 8a3b313cb6
35 changed files with 346 additions and 41 deletions

View File

@@ -471,6 +471,21 @@ def test_require_product(token_client, organizer, clist, event, order):
assert resp.data['reason'] == 'product'
@pytest.mark.django_db
def test_checkin_texts(token_client, organizer, clist, event, order):
with scopes_disabled():
p = order.positions.first()
p.item.checkin_text = 'A'
p.item.save()
order.checkin_text = 'B'
order.save()
resp = _redeem(token_client, organizer, clist, p.secret, {})
assert resp.status_code == 201
assert resp.data['status'] == 'ok'
assert resp.data['checkin_texts'] == ['B', 'A']
@pytest.mark.django_db
def test_require_paid(token_client, organizer, clist, event, order):
with scopes_disabled():
@@ -683,6 +698,19 @@ def test_question_upload(token_client, organizer, clist, event, order, question)
assert order.positions.first().answers.get(question=question[0]).file
@pytest.mark.django_db
def test_question_expand(token_client, organizer, clist, event, order, question):
with scopes_disabled():
p = order.positions.first()
question[0].save()
p.answers.create(question=question[0], answer="3")
resp = _redeem(token_client, organizer, clist, p.secret, {"answers": {question[0].pk: ""}}, query="?expand=answers.question")
assert resp.status_code == 201
assert resp.data["status"] == "ok"
assert resp.data["position"]["answers"][0]["question"]["question"]["en"] == "Size"
@pytest.mark.django_db
def test_store_failed(token_client, organizer, clist, event, order):
with scopes_disabled():