Add a message count component

The logic to say ‘1 email sent’ vs ‘12 text messages sent’ is repeated
all over the place. So this commit adds a component to put it in one
place.
This commit is contained in:
Chris Hill-Scott
2016-05-13 09:58:07 +01:00
parent 3dc349c8a7
commit 8a4b0ba88c
4 changed files with 24 additions and 9 deletions

View File

@@ -92,10 +92,10 @@ def test_should_show_recent_templates_on_dashboard(app_,
assert len(table_rows) == 2
assert page.find_all('dt')[0].text.strip() == 'Pickle feet'
assert page.find_all('dd')[0].text.strip() == '206 messages sent'
assert page.find_all('dd')[0].text.strip() == '206 text messages sent'
assert page.find_all('dt')[1].text.strip() == 'Brine Shrimp'
assert page.find_all('dd')[1].text.strip() == '13 messages sent'
assert page.find_all('dd')[1].text.strip() == '13 text messages sent'
def test_should_show_all_templates_on_template_statistics_page(
@@ -130,10 +130,10 @@ def test_should_show_all_templates_on_template_statistics_page(
assert len(table_rows) == 2
assert page.find_all('dt')[0].text.strip() == 'Pickle feet'
assert page.find_all('dd')[0].text.strip() == '206 messages sent'
assert page.find_all('dd')[0].text.strip() == '206 text messages sent'
assert page.find_all('dt')[1].text.strip() == 'Brine Shrimp'
assert page.find_all('dd')[1].text.strip() == '13 messages sent'
assert page.find_all('dd')[1].text.strip() == '13 text messages sent'
def _test_dashboard_menu(mocker, app_, usr, service, permissions):