From 0512f40ad3d7fdb4d285a4f7e44659cca6f3e09f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 29 Apr 2019 16:21:47 +0100 Subject: [PATCH] Fix misleading class name Not sure where this came from, but visually our tables have always aligned text to the left by default. --- app/assets/stylesheets/components/table.scss | 2 +- app/templates/components/table.html | 2 +- tests/app/main/views/test_dashboard.py | 2 +- tests/app/main/views/test_send.py | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/components/table.scss b/app/assets/stylesheets/components/table.scss index d210d11d8..0209b4d44 100644 --- a/app/assets/stylesheets/components/table.scss +++ b/app/assets/stylesheets/components/table.scss @@ -69,7 +69,7 @@ } - td.table-field-center-aligned { + td.table-field-left-aligned { &:first-child { diff --git a/app/templates/components/table.html b/app/templates/components/table.html index c5171c02a..656ef1c47 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -67,7 +67,7 @@ {% macro field(align='left', status='', border=True) -%} - {% set field_alignment = 'table-field-right-aligned' if align == 'right' else 'table-field-center-aligned' %} + {% set field_alignment = 'table-field-right-aligned' if align == 'right' else 'table-field-left-aligned' %} {% set border = '' if border else 'table-field-noborder' %} diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index 46418d742..fd9aa1268 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -569,7 +569,7 @@ def test_monthly_shows_letters_in_breakdown( service_id=service_one['id'] ) - columns = page.select('.table-field-center-aligned .big-number-label') + columns = page.select('.table-field-left-aligned .big-number-label') assert normalize_spaces(columns[0].text) == 'emails' assert normalize_spaces(columns[1].text) == 'text messages' diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 5f0cc7a37..a59d64f32 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -656,10 +656,10 @@ def test_upload_valid_csv_shows_preview_and_table( for row_index, row in enumerate([ ( - '
07700900001
', - '
A
', + '
07700900001
', + '
A
', ( - ' ' + ' ' '
' '