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(
1|message_count_label(template.template_type, suffix='') | capitalize
) }}
<p>
{% if help %}
{{ template.name }}
{% else %}
<!-- <a class="usa-link" href="{{ url_for('.view_template', service_id=current_service.id, template_id=template.id) }}">{{ template.name }}</a> -->
{% endif %}
<div class="usa-alert usa-alert--success">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">{{ template.name }} - {{ current_service.name }}</h4>
<p class="usa-alert__text">
Was sent on {{ created_at|format_datetime_short_12h }} by {{ created_by.name }}
</p>
</div>
{% if help %}
<p>{{ template.name }}</p>
{% endif %}
<div class="usa-alert usa-alert--success">
<div class="usa-alert__body">
<h4 class="usa-alert__heading">{{ template.name }} - {{ current_service.name }}</h4>
<p class="usa-alert__text">
Was sent on {{ created_at|format_datetime_short_12h }} by {{ created_by.name }}
</p>
</div>
</p>
<div class="">
{{ template|string }}
</div>
{{ template|string }}
{% if template.template_type == 'email' %}
<div class="js-stick-at-bottom-when-scrolling">
{{ 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",
(
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern "
"by Test User"
"Was sent on 1 January at 01:01 AM US/Eastern by Test User"
),
),
(
"2012-01-02 06:01",
(
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern "
"by Test User"
"Was sent on 1 January at 01:01 AM US/Eastern by Test User"
),
),
(
"2012-01-03 06:01",
(
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern "
"by Test User"
"Was sent on 1 January at 01:01 AM US/Eastern by Test User"
),
),
(
"2013-01-03 06:01",
(
"sample template sample template - service one Was sent on 1 January at 01:01 AM US/Eastern "
"by Test User"
"Was sent on 1 January at 01:01 AM US/Eastern by Test User"
),
),
],
@@ -275,10 +271,8 @@ def test_notification_page_doesnt_link_to_template_in_tour(
notification_id=fake_uuid,
help=3,
)
assert normalize_spaces(page.select("main p:nth-of-type(1)")[0].text) == (
expected_message
)
p_text = normalize_spaces(page.select_one(".usa-alert__text").text)
assert p_text == normalize_spaces(expected_message)
assert len(page.select("main p:nth-of-type(1) a")) == 0