Merge pull request #1356 from GSA/1252-missing-blue-boxes

1252 missing blue boxes
This commit is contained in:
Carlo Costino
2024-04-03 19:09:22 -04:00
committed by GitHub
2 changed files with 5 additions and 48 deletions

View File

@@ -1,49 +1,7 @@
{% from "components/pill.html" import pill %} {% from "components/pill.html" import pill %}
<div class="ajax-block-container"> <div class="ajax-block-container">
{% if notifications_deleted %} <div class="tabs">
<div class="grid-row "> {{ pill(counts, request.args.get('status', '')) }}
{% for label, query_param, url, count in counts %} </div>
{% if query_param == 'pending' %}
<div class="grid-col-3">
<span class="big-number-smaller">
<span class="big-number-number">
{% if count is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, count) }}
{% else %}
{{ "{:,}".format(count) }}
{% endif %}
{% else %}
{{ count }}
{% endif %}
</span>
<span class="big-number-label">{{ query_param }}</span>
</span>
</div>
{% else %}
<div class="grid-col-3">
<span class="big-number-smaller">
<span class="big-number-number">
{% if count is number %}
{% if currency %}
{{ "{}{:,.2f}".format(currency, count) }}
{% else %}
{{ "{:,}".format(count) }}
{% endif %}
{% else %}
{{ count }}
{% endif %}
</span>
<span class="big-number-label">{{ label }}</span>
</span>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="tabs">
{{ pill(counts, request.args.get('status', '')) }}
</div>
{% endif %}
</div> </div>

View File

@@ -320,15 +320,14 @@ def test_should_show_old_job(
service_id=SERVICE_ONE_ID, service_id=SERVICE_ONE_ID,
job_id=fake_uuid, job_id=fake_uuid,
) )
assert not page.select(".pill")
assert not page.select("p.hint") assert not page.select("p.hint")
assert not page.select("a[download]") assert not page.select("a[download]")
assert page.select_one("tbody").text.strip() == expected_message assert page.select_one("tbody").text.strip() == expected_message
assert [ assert [
normalize_spaces(column.text) for column in page.select("main .grid-col-3") normalize_spaces(column.text) for column in page.select("main .pill .pill-item")
] == [ ] == [
"1 total text messages", "1 total text messages",
"1 pending", "1 pending text message",
"0 delivered text messages", "0 delivered text messages",
"0 failed text messages", "0 failed text messages",
] ]