State when organisation has no live services

The page looks broken otherwise.
This commit is contained in:
Chris Hill-Scott
2020-03-03 10:34:20 +00:00
parent 3cfceda0b8
commit 58176d5fa0
2 changed files with 12 additions and 0 deletions

View File

@@ -106,5 +106,11 @@
</div>
{% endfor %}
<div class="keyline-block govuk-!-margin-top-2"></div>
{% if not services %}
<p class="govuk-body govuk-hint">
{{ current_org.name }} has no live services on GOV.UK Notify
</p>
<div class="keyline-block govuk-!-margin-top-2"></div>
{% endif %}
{% endblock %}

View File

@@ -74,6 +74,9 @@ def test_view_organisation_shows_the_correct_organisation(
)
assert normalize_spaces(page.select_one('h1').text) == 'Usage'
assert normalize_spaces(page.select_one('.govuk-hint').text) == (
'Test 1 has no live services on GOV.UK Notify'
)
def test_page_to_create_new_organisation(
@@ -435,6 +438,9 @@ def test_organisation_services_shows_live_services_and_usage(
assert normalize_spaces(usage_rows[7].text) == "£42.00 spent on text messages"
assert normalize_spaces(usage_rows[8].text) == "£0.00 spent on letters"
# Ensure theres no this org has no services message
assert not page.select('.govuk-hint')
@freeze_time("2020-02-20 20:20")
@pytest.mark.parametrize('financial_year, expected_selected', (