From 07bcb4220e195cf970a980d56c17b1d00c7fb616 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Wed, 19 Feb 2020 12:29:28 +0000 Subject: [PATCH] Replace `column-one-third` with `govuk-grid-column-one-third` Also replaces `column-third`, with `govuk-grid-column-one-third`, since this appears to be an alias of `column-one-third`. --- app/templates/views/api/index.html | 6 +++--- app/templates/views/conversations/messages.html | 2 +- app/templates/views/dashboard/_totals.html | 6 +++--- app/templates/views/dashboard/_usage.html | 6 +++--- .../views/platform-admin/_global_stats.html | 6 +++--- app/templates/views/platform-admin/index.html | 4 ++-- .../views/providers/edit-sms-provider-ratio.html | 4 ++-- app/templates/views/send-test.html | 2 +- .../views/service-settings/data-retention.html | 2 +- app/templates/views/styleguide.html | 4 ++-- app/templates/views/temp-history.html | 2 +- app/templates/views/usage.html | 14 +++++++------- app/templates/views/using-notify.html | 2 +- app/templates/withnav_template.html | 2 +- tests/app/main/views/test_dashboard.py | 8 ++++---- tests/app/main/views/test_platform_admin.py | 10 ++++++---- 16 files changed, 41 insertions(+), 39 deletions(-) diff --git a/app/templates/views/api/index.html b/app/templates/views/api/index.html index 59c094eca..5fbaaec96 100644 --- a/app/templates/views/api/index.html +++ b/app/templates/views/api/index.html @@ -15,13 +15,13 @@ diff --git a/app/templates/views/conversations/messages.html b/app/templates/views/conversations/messages.html index bae48b6de..b87a58ff1 100644 --- a/app/templates/views/conversations/messages.html +++ b/app/templates/views/conversations/messages.html @@ -9,7 +9,7 @@ {% else %} -
+
 
diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index d5de03c25..6e9e6e324 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -3,7 +3,7 @@
-
+
{{ big_number_with_status( statistics['email']['requested'], message_count_label(statistics['email']['requested'], 'email', suffix='sent'), @@ -15,7 +15,7 @@ smaller=True, ) }}
-
+
{{ big_number_with_status( statistics['sms']['requested'], message_count_label(statistics['sms']['requested'], 'sms', suffix='sent'), @@ -27,7 +27,7 @@ smaller=True, ) }}
-
+
{{ big_number_with_status( statistics['letter']['requested'], message_count_label(statistics['letter']['requested'], 'letter', suffix='sent'), diff --git a/app/templates/views/dashboard/_usage.html b/app/templates/views/dashboard/_usage.html index b3775880f..6cad43324 100644 --- a/app/templates/views/dashboard/_usage.html +++ b/app/templates/views/dashboard/_usage.html @@ -1,12 +1,12 @@ {% from "components/big-number.html" import big_number %}
-
+
{{ big_number("Unlimited", 'free email allowance', smaller=True) }}
-
+
{% if sms_chargeable %} {{ big_number( @@ -20,7 +20,7 @@ {% endif %}
-
+
{{ big_number( letter_cost, diff --git a/app/templates/views/platform-admin/_global_stats.html b/app/templates/views/platform-admin/_global_stats.html index 3fba3f283..1fe7c6c2a 100644 --- a/app/templates/views/platform-admin/_global_stats.html +++ b/app/templates/views/platform-admin/_global_stats.html @@ -1,7 +1,7 @@ {% from "components/big-number.html" import big_number_with_status %} {% from "components/message-count-label.html" import message_count_label %}
-
+
{{ big_number_with_status( global_stats.email.delivered + global_stats.email.failed, message_count_label(global_stats.email.delivered, 'email'), @@ -11,7 +11,7 @@ smaller=True ) }}
-
+
{{ big_number_with_status( global_stats.sms.delivered + global_stats.sms.failed, message_count_label(global_stats.sms.delivered, 'sms'), @@ -21,7 +21,7 @@ smaller=True ) }}
-
+
{{ big_number_with_status( global_stats.letter.requested, message_count_label(global_stats.letter.requested, 'letter'), diff --git a/app/templates/views/platform-admin/index.html b/app/templates/views/platform-admin/index.html index c44edf958..60f591a4c 100644 --- a/app/templates/views/platform-admin/index.html +++ b/app/templates/views/platform-admin/index.html @@ -34,7 +34,7 @@
{% for noti_type in global_stats %} -
+
{{ big_number_simple( noti_type.black_box.number, message_count_label(noti_type.black_box.number, noti_type.black_box.notification_type) @@ -55,7 +55,7 @@
{% for noti_type in global_stats %} -
+
{{ "{:,}".format(noti_type.test_data.number) }} {{ noti_type.test_data.label }} diff --git a/app/templates/views/providers/edit-sms-provider-ratio.html b/app/templates/views/providers/edit-sms-provider-ratio.html index 53f101593..332aebf93 100644 --- a/app/templates/views/providers/edit-sms-provider-ratio.html +++ b/app/templates/views/providers/edit-sms-provider-ratio.html @@ -20,7 +20,7 @@
-
 
+
 
@@ -60,7 +60,7 @@ {% for version in versions %}
  • -
    +
    {{ version.created_by.name or (' '|safe) }}
    diff --git a/app/templates/views/send-test.html b/app/templates/views/send-test.html index 00afe1fcf..84586e7b7 100644 --- a/app/templates/views/send-test.html +++ b/app/templates/views/send-test.html @@ -30,7 +30,7 @@ ) }}
    {% if skip_link %} -
    + {% endif %} diff --git a/app/templates/views/service-settings/data-retention.html b/app/templates/views/service-settings/data-retention.html index 69635ed99..e20c568eb 100644 --- a/app/templates/views/service-settings/data-retention.html +++ b/app/templates/views/service-settings/data-retention.html @@ -15,7 +15,7 @@ Data retention
    -
    +
    {{ govukButton({ "element": "a", "text": "Add data retention", diff --git a/app/templates/views/styleguide.html b/app/templates/views/styleguide.html index 5ad9cad21..215713c54 100644 --- a/app/templates/views/styleguide.html +++ b/app/templates/views/styleguide.html @@ -43,10 +43,10 @@

    Used to show some important statistics.

    -
    +
    {{ big_number("567") }}
    -
    +
    {{ big_number("2", "Messages delivered") }}
    diff --git a/app/templates/views/temp-history.html b/app/templates/views/temp-history.html index 011366863..bd7f9584e 100644 --- a/app/templates/views/temp-history.html +++ b/app/templates/views/temp-history.html @@ -33,7 +33,7 @@ {% for event in events %}
  • -
    +
    {{ user_getter(event.user_id) }}
    diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index ed0b4aeee..e81b4f39d 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -18,14 +18,14 @@
    -
    +

    Emails

    {{ big_number(emails_sent, 'sent', smaller=True) }} {{ big_number("Unlimited", 'free allowance', smaller=True) }}
    -
    +

    Text messages

    {{ big_number(sms_sent, 'sent', smaller=True) }} @@ -40,7 +40,7 @@ {% endif %}
    -
    +

    Letters

    {{ big_number(letter_sent, 'sent', smaller=True) }} @@ -49,12 +49,12 @@
    -
    +
     
    -
    +
    {{ big_number( (sms_chargeable * sms_rate), @@ -64,7 +64,7 @@ ) }}
    -
    +
    {{ big_number( letter_cost, @@ -124,7 +124,7 @@
    -
    +

    Financial year ends 31 March

    diff --git a/app/templates/views/using-notify.html b/app/templates/views/using-notify.html index b919e31f2..cfa78607b 100644 --- a/app/templates/views/using-notify.html +++ b/app/templates/views/using-notify.html @@ -8,7 +8,7 @@ {% block maincolumn_content %}
    -
    +
    {{ sub_navigation(navigation_links) }}
    diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index 27bb6ff5d..1c7ff8295 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -22,7 +22,7 @@
    {% if help %} -
    +
    {% else %}
    {% endif %} diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index b9fb1b01c..0675d9472 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -895,9 +895,9 @@ def test_correct_font_size_for_big_numbers( ) assert ( - len(page.select_one('[data-key=totals]').select('.column-third')) + len(page.select_one('[data-key=totals]').select('.govuk-grid-column-one-third')) ) == ( - len(page.select_one('[data-key=usage]').select('.column-third')) + len(page.select_one('[data-key=usage]').select('.govuk-grid-column-one-third')) ) == ( len(page.select('.big-number-with-status .big-number-smaller')) ) == 3 @@ -996,7 +996,7 @@ def test_usage_page( mock_get_usage.assert_called_once_with(SERVICE_ONE_ID, 2011) mock_get_free_sms_fragment_limit.assert_called_with(SERVICE_ONE_ID, 2011) - cols = page.find_all('div', {'class': 'column-one-third'}) + cols = page.find_all('div', {'class': 'govuk-grid-column-one-third'}) nav = page.find('ul', {'class': 'pill', 'role': 'tablist'}) nav_links = nav.find_all('a') @@ -1038,7 +1038,7 @@ def test_usage_page_with_letters( mock_get_usage.assert_called_once_with(SERVICE_ONE_ID, 2011) mock_get_free_sms_fragment_limit.assert_called_with(SERVICE_ONE_ID, 2011) - cols = page.find_all('div', {'class': 'column-one-third'}) + cols = page.find_all('div', {'class': 'govuk-grid-column-one-third'}) nav = page.find('ul', {'class': 'pill', 'role': 'tablist'}) nav_links = nav.find_all('a') diff --git a/tests/app/main/views/test_platform_admin.py b/tests/app/main/views/test_platform_admin.py index fb13306d1..948f2a241 100644 --- a/tests/app/main/views/test_platform_admin.py +++ b/tests/app/main/views/test_platform_admin.py @@ -663,18 +663,20 @@ def test_platform_admin_displays_stats_in_right_boxes_and_with_correct_styling( page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') # Email permanent failure status box - number is correct - assert '3 permanent failures' in page.find_all('div', class_='column-third')[0].find(string=re.compile('permanent')) + assert '3 permanent failures' in page.find_all( + 'div', class_='govuk-grid-column-one-third' + )[0].find(string=re.compile('permanent')) # Email complaints status box - link exists and number is correct assert page.find('a', string='15 complaints') # SMS total box - number is correct assert page.find_all('div', class_='big-number-number')[1].text.strip() == '168' # Test SMS box - number is correct - assert '5' in page.find_all('div', class_='column-third')[4].text + assert '5' in page.find_all('div', class_='govuk-grid-column-one-third')[4].text # SMS technical failure status box - number is correct and failure class is used - assert '1 technical failures' in page.find_all('div', class_='column-third')[1].find( + assert '1 technical failures' in page.find_all('div', class_='govuk-grid-column-one-third')[1].find( 'div', class_='big-number-status-failing').text # Letter virus scan failure status box - number is correct and failure class is used - assert '1 virus scan failures' in page.find_all('div', class_='column-third')[2].find( + assert '1 virus scan failures' in page.find_all('div', class_='govuk-grid-column-one-third')[2].find( 'div', class_='big-number-status-failing').text