diff --git a/app/templates/views/uploads/contact-list/column-errors.html b/app/templates/views/uploads/contact-list/column-errors.html index 99f5354a1..96a7becb1 100644 --- a/app/templates/views/uploads/contact-list/column-errors.html +++ b/app/templates/views/uploads/contact-list/column-errors.html @@ -6,13 +6,6 @@ {% from "components/back-link/macro.njk" import govukBackLink %} {% from "components/message-count-label.html" import message_count_label, recipient_count_label %} -{% set file_contents_header_id = 'file-preview' %} -{% macro skip_to_file_contents() %} -

- Skip to file contents -

-{% endmacro %} - {% block service_page_title %} Error {% endblock %} @@ -48,9 +41,6 @@

{% endif %} - - {{ skip_to_file_contents() }} - {% endcall %} @@ -66,7 +56,7 @@ Back to top -

{{ original_file_name }}

+

{{ original_file_name }}

{% call(item, row_number) list_table( recipients.displayed_rows, diff --git a/app/templates/views/uploads/contact-list/ok.html b/app/templates/views/uploads/contact-list/ok.html index 0dfa68a4a..1db87a58a 100644 --- a/app/templates/views/uploads/contact-list/ok.html +++ b/app/templates/views/uploads/contact-list/ok.html @@ -6,13 +6,6 @@ {% from "components/message-count-label.html" import message_count_label, recipient_count_label %} {% from "components/button/macro.njk" import govukButton %} -{% set file_contents_header_id = 'file-preview' %} -{% macro skip_to_file_contents() %} -

- Skip to file contents -

-{% endmacro %} - {% block service_page_title %} {{ original_file_name }} {% endblock %} diff --git a/app/templates/views/uploads/contact-list/row-errors.html b/app/templates/views/uploads/contact-list/row-errors.html index 6480e00c8..97e496568 100644 --- a/app/templates/views/uploads/contact-list/row-errors.html +++ b/app/templates/views/uploads/contact-list/row-errors.html @@ -6,12 +6,6 @@ {% from "components/back-link/macro.njk" import govukBackLink %} {% from "components/message-count-label.html" import message_count_label %} -{% set file_contents_header_id = 'file-preview' %} -{% macro skip_to_file_contents() %} -

- Skip to file contents -

-{% endmacro %} {% block service_page_title %} Error @@ -43,7 +37,6 @@ {% endfor %} {% endif %} - {{ skip_to_file_contents() }} {% endcall %} diff --git a/app/templates/views/uploads/contact-list/too-many-columns.html b/app/templates/views/uploads/contact-list/too-many-columns.html index c9f64e2a7..83ed244e6 100644 --- a/app/templates/views/uploads/contact-list/too-many-columns.html +++ b/app/templates/views/uploads/contact-list/too-many-columns.html @@ -6,12 +6,6 @@ {% from "components/back-link/macro.njk" import govukBackLink %} {% from "components/message-count-label.html" import message_count_label %} -{% set file_contents_header_id = 'file-preview' %} -{% macro skip_to_file_contents() %} -

- Skip to file contents -

-{% endmacro %} {% block service_page_title %} Error @@ -56,9 +50,6 @@

{% endif %} - - {{ skip_to_file_contents() }} - {% endcall %} @@ -76,7 +67,7 @@ {% set column_headers = recipients._raw_column_headers if recipients.duplicate_recipient_column_headers else recipients.column_headers %} -

{{ original_file_name }}

+

{{ original_file_name }}

{% call(item, row_number) list_table( diff --git a/tests/app/main/views/uploads/test_upload_contact_list.py b/tests/app/main/views/uploads/test_upload_contact_list.py index af2daf85d..8e246788f 100644 --- a/tests/app/main/views/uploads/test_upload_contact_list.py +++ b/tests/app/main/views/uploads/test_upload_contact_list.py @@ -40,8 +40,7 @@ def test_upload_contact_list_page(client_request): ( 'Your file has too many columns ' 'It needs to have 1 column, called ‘email address’ or ‘phone number’. ' - 'Right now it has 2 columns called ‘telephone’ and ‘name’. ' - 'Skip to file contents' + 'Right now it has 2 columns called ‘telephone’ and ‘name’.' ), 'Row in file 1 telephone name', '2 +447700900986', @@ -54,8 +53,7 @@ def test_upload_contact_list_page(client_request): ( 'Your file has too many columns ' 'It needs to have 1 column, called ‘email address’ or ‘phone number’. ' - 'Right now it has 2 columns called ‘phone number’ and ‘email address’. ' - 'Skip to file contents' + 'Right now it has 2 columns called ‘phone number’ and ‘email address’.' ), 'Row in file 1 phone number email address', '2 +447700900986 test@example.com', @@ -67,8 +65,7 @@ def test_upload_contact_list_page(client_request): """, ( 'There’s a problem with invalid.csv ' - 'You need to fix 1 email address. ' - 'Skip to file contents' + 'You need to fix 1 email address.' ), 'Row in file 1 email address', '2 Not a valid email address +447700900986', @@ -80,8 +77,7 @@ def test_upload_contact_list_page(client_request): """, ( 'There’s a problem with invalid.csv ' - 'You need to fix 1 phone number. ' - 'Skip to file contents' + 'You need to fix 1 phone number.' ), 'Row in file 1 phone number', '2 Must not contain letters or symbols test@example.com', @@ -94,8 +90,7 @@ def test_upload_contact_list_page(client_request): ( 'Your file has too many columns ' 'It needs to have 1 column, called ‘email address’ or ‘phone number’. ' - 'Right now it has 3 columns called ‘phone number’, ‘phone number’ and ‘PHONE_NUMBER’. ' - 'Skip to file contents' + 'Right now it has 3 columns called ‘phone number’, ‘phone number’ and ‘PHONE_NUMBER’.' ), 'Row in file 1 phone number phone number PHONE_NUMBER', '2 +447700900333 +447700900333 +447700900333', @@ -106,8 +101,7 @@ def test_upload_contact_list_page(client_request): """, ( 'Your file is missing some rows ' - 'It needs at least one row of data. ' - 'Skip to file contents' + 'It needs at least one row of data.' ), 'Row in file 1 phone number', '', @@ -117,8 +111,7 @@ def test_upload_contact_list_page(client_request): ( 'Your file is missing some rows ' 'It needs at least one row of data, in a column called ' - '‘email address’ or ‘phone number’. ' - 'Skip to file contents' + '‘email address’ or ‘phone number’.' ), 'Row in file 1 +447700900986', '', @@ -128,8 +121,7 @@ def test_upload_contact_list_page(client_request): ( 'Your file is missing some rows ' 'It needs at least one row of data, in a column called ' - '‘email address’ or ‘phone number’. ' - 'Skip to file contents' + '‘email address’ or ‘phone number’.' ), 'Row in file 1', '', @@ -143,8 +135,7 @@ def test_upload_contact_list_page(client_request): """, ( 'There’s a problem with invalid.csv ' - 'You need to enter missing data in 1 row. ' - 'Skip to file contents' + 'You need to enter missing data in 1 row.' ), 'Row in file 1 phone number', ( @@ -158,8 +149,7 @@ def test_upload_contact_list_page(client_request): """, ( 'There’s a problem with invalid.csv ' - 'You need to fix 1 phone number. ' - 'Skip to file contents' + 'You need to fix 1 phone number.' ), 'Row in file 1 phone number', '2 Not enough digits +447700900', @@ -173,8 +163,7 @@ def test_upload_contact_list_page(client_request): """, ( 'There’s a problem with invalid.csv ' - 'You need to fix 2 email addresses. ' - 'Skip to file contents' + 'You need to fix 2 email addresses.' ), 'Row in file 1 email address', ( @@ -257,8 +246,7 @@ def test_upload_csv_file_shows_error_banner_for_too_many_rows( assert normalize_spaces(page.select_one('.banner-dangerous').text) == ( 'Your file has too many rows ' 'Notify can store files up to 50,000 rows in size. ' - 'Your file has 50,001 rows. ' - 'Skip to file contents' + 'Your file has 50,001 rows.' ) assert len(page.select('tbody tr')) == 50 assert normalize_spaces(page.select_one('.table-show-more-link').text) == ( @@ -288,8 +276,7 @@ def test_upload_csv_shows_trial_mode_error( assert normalize_spaces(page.select_one('.banner-dangerous').text) == ( 'You cannot save this phone number ' - 'In trial mode you can only send to yourself and members of your team ' - 'Skip to file contents' + 'In trial mode you can only send to yourself and members of your team' ) assert page.select_one('.banner-dangerous a')['href'] == url_for( 'main.trial_mode_new'