clean up admin ui & update tests

This commit is contained in:
stvnrlly
2022-10-14 18:58:55 +00:00
parent a2c6c2f08c
commit 38fa1286b2
7 changed files with 75 additions and 70 deletions

View File

@@ -469,8 +469,8 @@ def test_organisation_services_shows_live_services_and_usage(
# Totals
assert normalize_spaces(usage_rows[0].text) == "Emails 33,000 sent"
assert normalize_spaces(usage_rows[1].text) == "Text messages £42.00 spent"
assert normalize_spaces(usage_rows[2].text) == "Letters £30.50 spent"
assert normalize_spaces(usage_rows[1].text) == "Text messages $42.00 spent"
assert normalize_spaces(usage_rows[2].text) == "Letters $30.50 spent"
assert normalize_spaces(services[0].text) == '1'
assert normalize_spaces(services[1].text) == '5'
@@ -478,11 +478,11 @@ def test_organisation_services_shows_live_services_and_usage(
assert normalize_spaces(usage_rows[3].text) == "13,000 emails sent"
assert normalize_spaces(usage_rows[4].text) == "122 free text messages sent"
assert normalize_spaces(usage_rows[5].text) == "£30.50 spent on letters"
assert normalize_spaces(usage_rows[5].text) == "$30.50 spent on letters"
assert services[1].find('a')['href'] == url_for('main.usage', service_id=SERVICE_TWO_ID)
assert normalize_spaces(usage_rows[6].text) == "20,000 emails sent"
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"
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')
@@ -512,12 +512,12 @@ def test_organisation_services_shows_live_services_and_usage_with_count_of_1(
# Totals
assert normalize_spaces(usage_rows[0].text) == "Emails 1 sent"
assert normalize_spaces(usage_rows[1].text) == "Text messages £0.00 spent"
assert normalize_spaces(usage_rows[2].text) == "Letters £0.00 spent"
assert normalize_spaces(usage_rows[1].text) == "Text messages $0.00 spent"
assert normalize_spaces(usage_rows[2].text) == "Letters $0.00 spent"
assert normalize_spaces(usage_rows[3].text) == "1 email sent"
assert normalize_spaces(usage_rows[4].text) == "1 free text message sent"
assert normalize_spaces(usage_rows[5].text) == "£0.00 spent on letters"
assert normalize_spaces(usage_rows[5].text) == "$0.00 spent on letters"
@freeze_time("2020-02-20 20:20")
@@ -938,7 +938,7 @@ def test_organisation_settings_for_platform_admin(
'Billing details None Change billing details for the organisation',
'Notes None Change the notes for the organisation',
'Default email branding GOV.UK Change default email branding for the organisation',
'Default letter branding No branding Change default letter branding for the organisation',
# 'Default letter branding No branding Change default letter branding for the organisation',
'Known email domains None Change known email domains for the organisation',
]