fix tests
This commit is contained in:
parent
df02ae1d1e
commit
c6c942dedd
|
@ -3,51 +3,49 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="pk-table-wrapper">
|
||||
<table class="partial-booking partial-booking-month">
|
||||
<colgroup>
|
||||
<col class="name" />
|
||||
{% for day in days %}
|
||||
{% if day|date:"w" == "0" or day|date:"w" == "6" %}
|
||||
<col class="we" />
|
||||
{% else %}
|
||||
<col />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<tr class="partial-booking-month--day-list">
|
||||
<td></td>
|
||||
<div class="pk-table-wrapper">
|
||||
<table class="partial-booking partial-booking-month">
|
||||
<colgroup>
|
||||
<col class="name" />
|
||||
{% for day in days %}
|
||||
<th scope="col" class="partial-booking-month--day {% if day.today %}today{% endif %}">
|
||||
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">
|
||||
<time datetime="{{ day|date:"Y-m-d" }}">{{ day|date:"d" }}</time>
|
||||
</a>
|
||||
</th>
|
||||
{% if day|date:"w" == "0" or day|date:"w" == "6" %}
|
||||
<col class="we" />
|
||||
{% else %}
|
||||
<col />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
</colgroup>
|
||||
|
||||
<tbody class="partial-booking-month--registrant-items">
|
||||
{% for booking_info in user_booking_info %}
|
||||
<tr class="partial-booking-month--registrant">
|
||||
<th class="registrant--name" scope="row">
|
||||
{{ booking_info.user_name }}
|
||||
</th>
|
||||
{% for booking in booking_info.bookings %}
|
||||
<td class="registrant--day-cell">
|
||||
{% if booking %}
|
||||
<span class="booking {{ booking.check_css_class }}">
|
||||
<!-- Il faut retourner une info textuelle ici et via title attribut -->
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<thead>
|
||||
<tr class="partial-booking-month--day-list">
|
||||
<td></td>
|
||||
{% for day in days %}
|
||||
<th scope="col" class="partial-booking-month--day {% if day.today %}today{% endif %}">
|
||||
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">
|
||||
<time datetime="{{ day|date:"Y-m-d" }}">{{ day|date:"d" }}</time>
|
||||
</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<tbody class="partial-booking-month--registrant-items">
|
||||
{% for booking_info in user_booking_info %}
|
||||
<tr class="partial-booking-month--registrant">
|
||||
<th class="registrant--name" scope="row">{{ booking_info.user_name }}</th>
|
||||
{% for booking in booking_info.bookings %}
|
||||
<td class="registrant--day-cell">
|
||||
{% if booking %}
|
||||
<span class="booking {{ booking.check_css_class }}">
|
||||
<!-- Il faut retourner une info textuelle ici et via title attribut -->
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1138,7 +1138,7 @@ def test_manager_partial_bookings_month_view(app, admin_user, freezer):
|
|||
today = start_datetime.date()
|
||||
resp = app.get('/manage/agendas/%s/month/%d/%d/%d/' % (agenda.pk, today.year, today.month, today.day))
|
||||
|
||||
assert [int(x.text) for x in resp.pyquery('thead th a')] == list(range(1, 32))
|
||||
assert [int(x.text) for x in resp.pyquery('thead th time')] == list(range(1, 32))
|
||||
|
||||
assert [x.text for x in resp.pyquery('tbody tr th')] == [
|
||||
'User Absent',
|
||||
|
@ -1178,7 +1178,7 @@ def test_manager_partial_bookings_month_view(app, admin_user, freezer):
|
|||
assert len(resp.pyquery(user_present_incomplete_row)('td span.booking.present')) == 0
|
||||
|
||||
resp = resp.click('Next month')
|
||||
assert [int(x.text) for x in resp.pyquery('thead th a')] == list(range(1, 31))
|
||||
assert [int(x.text) for x in resp.pyquery('thead th time')] == list(range(1, 31))
|
||||
assert [x.text for x in resp.pyquery('tbody tr th')] == ['Subscription Next Month']
|
||||
assert len(resp.pyquery('tbody tr td')) == 30
|
||||
|
||||
|
|
Loading…
Reference in New Issue