mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-12 17:34:16 -04:00
Refine error messages and fix tests
Removing the word ‘duplicate’ because: - it suggests that the whole column is the same, which it might not be - it suggests that having duplicate column names is a problem, which is only true in the case of recipient columns Reverts back to saying the column names ‘need to’ match, because we feel it’s more instructive.
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
{% elif recipients.duplicate_recipient_column_headers %}
|
||||
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Duplicate recipient columns" data-error-label="{{ upload_id }}">
|
||||
Your file has duplicate columns
|
||||
There’s a problem with your column names
|
||||
</h1>
|
||||
<p>
|
||||
We found more than one column called {{ (
|
||||
@@ -95,7 +95,7 @@
|
||||
{% elif recipients.missing_column_headers %}
|
||||
|
||||
<h1 class='banner-title' data-module="track-error" data-error-type="Missing placeholder columns" data-error-label="{{ upload_id }}">
|
||||
Your column names do not match the double brackets in your template
|
||||
Your column names need to match the double brackets in your template
|
||||
</h1>
|
||||
<p>
|
||||
Your file is missing {{ recipients.missing_column_headers | formatted_list(
|
||||
|
||||
@@ -427,7 +427,8 @@ def test_upload_csv_file_with_errors_shows_check_page_with_errors(
|
||||
+447700900986
|
||||
""",
|
||||
(
|
||||
'Your file needs a column called ‘phone number’ '
|
||||
'There’s a problem with your column names '
|
||||
'Your file needs a column called ‘phone number’. '
|
||||
'Right now it has columns called ‘telephone’ and ‘name’. '
|
||||
'Skip to file contents'
|
||||
)
|
||||
@@ -438,7 +439,7 @@ def test_upload_csv_file_with_errors_shows_check_page_with_errors(
|
||||
+447700900986
|
||||
""",
|
||||
(
|
||||
'The columns in your file need to match the double brackets in your template '
|
||||
'Your column names need to match the double brackets in your template '
|
||||
'Your file is missing a column called ‘name’. '
|
||||
'Skip to file contents'
|
||||
)
|
||||
@@ -449,7 +450,8 @@ def test_upload_csv_file_with_errors_shows_check_page_with_errors(
|
||||
+447700900111,+447700900222,+447700900333,
|
||||
""",
|
||||
(
|
||||
'Your file has more than one column called ‘phone number’ or ‘PHONE_NUMBER’ '
|
||||
'There’s a problem with your column names '
|
||||
'We found more than one column called ‘phone number’ or ‘PHONE_NUMBER’. '
|
||||
'Delete or rename one of these columns and try again. '
|
||||
'Skip to file contents'
|
||||
)
|
||||
@@ -2863,7 +2865,8 @@ def test_check_messages_column_error_doesnt_show_optional_columns(
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select_one('.banner-dangerous').text) == (
|
||||
'Your file needs a column called ‘postcode’ '
|
||||
'There’s a problem with your column names '
|
||||
'Your file needs a column called ‘postcode’. '
|
||||
'Right now it has columns called ‘address_line_1’, ‘address_line_2’ and ‘foo’. '
|
||||
'Skip to file contents'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user