Always use smaller font size for totals

This means the font size matches the counts on the usage section, and on
the new received text messages banner.
This commit is contained in:
Chris Hill-Scott
2020-02-12 11:12:18 +00:00
parent b65b417a08
commit 42373e3615
4 changed files with 17 additions and 38 deletions

View File

@@ -553,7 +553,7 @@ def test_should_not_show_recent_templates_on_dashboard_if_only_one_template_used
expected_count = stats[0]['count']
assert expected_count == 50
assert normalize_spaces(
page.select_one('#total-sms .big-number').text
page.select_one('#total-sms .big-number-smaller').text
) == (
'{} text messages sent'.format(expected_count)
)
@@ -713,14 +713,13 @@ def test_should_show_upcoming_jobs_on_dashboard(
['email', 'sms'],
['email', 'sms', 'letter'],
))
@pytest.mark.parametrize('totals, big_number_class', [
@pytest.mark.parametrize('totals', [
(
{
'email': {'requested': 0, 'delivered': 0, 'failed': 0},
'sms': {'requested': 99999, 'delivered': 0, 'failed': 0},
'letter': {'requested': 99999, 'delivered': 0, 'failed': 0}
},
'.big-number',
),
(
{
@@ -728,7 +727,6 @@ def test_should_show_upcoming_jobs_on_dashboard(
'sms': {'requested': 0, 'delivered': 0, 'failed': 0},
'letter': {'requested': 100000, 'delivered': 0, 'failed': 0},
},
'.big-number-smaller',
),
])
def test_correct_font_size_for_big_numbers(
@@ -743,7 +741,6 @@ def test_correct_font_size_for_big_numbers(
service_one,
permissions,
totals,
big_number_class,
):
service_one['permissions'] = permissions
@@ -758,11 +755,12 @@ def test_correct_font_size_for_big_numbers(
service_id=service_one['id'],
)
assert len(page.select_one('[data-key=totals]').select('.column-third')) == 3
assert len(page.select_one('[data-key=usage]').select('.column-third')) == 3
assert len(
page.select('.big-number-with-status {}'.format(big_number_class))
assert (
len(page.select_one('[data-key=totals]').select('.column-third'))
) == (
len(page.select_one('[data-key=usage]').select('.column-third'))
) == (
len(page.select('.big-number-with-status .big-number-smaller'))
) == 3