manager: display shared custody agenda start and end dates (#71941)
This commit is contained in:
parent
c261233153
commit
c48f849d39
|
@ -36,4 +36,16 @@
|
|||
<p>{% trans "Configuration is not completed yet." %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="section">
|
||||
{% if agenda.date_end %}
|
||||
{% blocktrans trimmed with date_start=agenda.date_start date_end=agenda.date_end %}
|
||||
This agenda applies from {{ date_start }} to {{ date_end }}.
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans trimmed with date_start=agenda.date_start %}
|
||||
This agenda applies from {{ date_start }}.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -236,6 +236,8 @@ def test_shared_custody_agenda_month_view_dates(app, admin_user):
|
|||
days = [x.text for x in resp.pyquery('tbody tr th span')]
|
||||
assert len(days) == 7 * 5
|
||||
|
||||
assert 'This agenda applies from Jan. 1, 2022.' in resp.text
|
||||
|
||||
# custody for half the month
|
||||
agenda.date_start = datetime.date(2022, 2, 14)
|
||||
agenda.save()
|
||||
|
@ -255,6 +257,8 @@ def test_shared_custody_agenda_month_view_dates(app, admin_user):
|
|||
assert resp.text.count('<td></td>') == 34
|
||||
assert len([x.text for x in resp.pyquery('tbody tr td.guardian')]) == 1
|
||||
|
||||
assert 'This agenda applies from Feb. 14, 2022 to Feb. 14, 2022.' in resp.text
|
||||
|
||||
# month before date_start
|
||||
resp = resp.click('←')
|
||||
assert resp.text.count('<td></td>') == 42
|
||||
|
|
Loading…
Reference in New Issue