update test

This commit is contained in:
Beverly Nguyen
2024-02-13 18:18:13 -08:00
parent c2d7828138
commit 4eb886d8c0
2 changed files with 17 additions and 29 deletions

View File

@@ -20,26 +20,20 @@
{{ page_header( {{ page_header(
1|message_count_label(template.template_type, suffix='') | capitalize 1|message_count_label(template.template_type, suffix='') | capitalize
) }} ) }}
<p> {% if help %}
{% if help %} <p>{{ template.name }}</p>
{{ template.name }} {% endif %}
{% else %} <div class="usa-alert usa-alert--success">
<!-- <a class="usa-link" href="{{ url_for('.view_template', service_id=current_service.id, template_id=template.id) }}">{{ template.name }}</a> --> <div class="usa-alert__body">
{% endif %} <h4 class="usa-alert__heading">{{ template.name }} - {{ current_service.name }}</h4>
<div class="usa-alert usa-alert--success"> <p class="usa-alert__text">
<div class="usa-alert__body"> Was sent on {{ created_at|format_datetime_short_12h }} by {{ created_by.name }}
<h4 class="usa-alert__heading">{{ template.name }} - {{ current_service.name }}</h4> </p>
<p class="usa-alert__text">
Was sent on {{ created_at|format_datetime_short_12h }} by {{ created_by.name }}
</p>
</div>
</div> </div>
</p>
<div class="">
{{ template|string }}
</div> </div>
{{ template|string }}
{% if template.template_type == 'email' %} {% if template.template_type == 'email' %}
<div class="js-stick-at-bottom-when-scrolling"> <div class="js-stick-at-bottom-when-scrolling">
{{ ajax_block(partials, updates_url, 'status', finished=finished) }} {{ ajax_block(partials, updates_url, 'status', finished=finished) }}

View File

@@ -227,29 +227,25 @@ def test_notification_status_shows_expected_back_link(
( (
"2012-01-01 06:01", "2012-01-01 06:01",
( (
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern " "Was sent on 1 January at 01:01 AM US/Eastern by Test User"
"by Test User"
), ),
), ),
( (
"2012-01-02 06:01", "2012-01-02 06:01",
( (
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern " "Was sent on 1 January at 01:01 AM US/Eastern by Test User"
"by Test User"
), ),
), ),
( (
"2012-01-03 06:01", "2012-01-03 06:01",
( (
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern " "Was sent on 1 January at 01:01 AM US/Eastern by Test User"
"by Test User"
), ),
), ),
( (
"2013-01-03 06:01", "2013-01-03 06:01",
( (
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern " "Was sent on 1 January at 01:01 AM US/Eastern by Test User"
"by Test User"
), ),
), ),
], ],
@@ -275,10 +271,8 @@ def test_notification_page_doesnt_link_to_template_in_tour(
notification_id=fake_uuid, notification_id=fake_uuid,
help=3, help=3,
) )
p_text = normalize_spaces(page.select_one(".usa-alert__text").text)
assert normalize_spaces(page.select("main p:nth-of-type(1)")[0].text) == ( assert p_text == normalize_spaces(expected_message)
expected_message
)
assert len(page.select("main p:nth-of-type(1) a")) == 0 assert len(page.select("main p:nth-of-type(1) a")) == 0