mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-12 09:58:50 -04:00
Display full address on the notifications page
This is what we do on the uploads page now. It makes it more obvious why your search term has returned a certain result if you can see most of the address, not just the first line.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
{% if item.status in ('pending-virus-check', 'virus-scan-failed') %}
|
||||
<span class="file-list-filename loading-indicator">Checking</span>
|
||||
{% else %}
|
||||
<a class="govuk-link govuk-link--no-visited-state file-list-filename" href="{{ single_notification_url(notification_id=item.id) }}">{{ item.to.splitlines()[0].lstrip().rstrip(' ,') if item.to else '' }}</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state file-list-filename" href="{{ single_notification_url(notification_id=item.id) }}">{{ item.to.splitlines()|join(', ') if item.to else '' }}</a>
|
||||
{% endif %}
|
||||
<p class="file-list-hint">
|
||||
{{ item.preview_of_content }}
|
||||
|
||||
@@ -757,8 +757,8 @@ def test_sending_status_hint_displays_correctly_on_notifications_page(
|
||||
|
||||
|
||||
@pytest.mark.parametrize("is_precompiled_letter,expected_address,expected_hint", [
|
||||
(True, "Full Name,\nFirst address line\npostcode", "ref"),
|
||||
(False, "Full Name,\nFirst address line\npostcode", "template subject")
|
||||
(True, "Full Name\nFirst address line\npostcode", "ref"),
|
||||
(False, "Full Name\nFirst address line\npostcode", "template subject")
|
||||
])
|
||||
def test_should_show_address_and_hint_for_letters(
|
||||
client_request,
|
||||
@@ -786,5 +786,5 @@ def test_should_show_address_and_hint_for_letters(
|
||||
message_type='letter',
|
||||
)
|
||||
|
||||
assert page.select_one('a.file-list-filename').text == 'Full Name'
|
||||
assert page.select_one('a.file-list-filename').text == 'Full Name, First address line, postcode'
|
||||
assert page.find('p', {'class': 'file-list-hint'}).text.strip() == expected_hint
|
||||
|
||||
Reference in New Issue
Block a user