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,11 +20,8 @@
{{ 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 %}
{{ template.name }} <p>{{ template.name }}</p>
{% else %}
<!-- <a class="usa-link" href="{{ url_for('.view_template', service_id=current_service.id, template_id=template.id) }}">{{ template.name }}</a> -->
{% endif %} {% endif %}
<div class="usa-alert usa-alert--success"> <div class="usa-alert usa-alert--success">
<div class="usa-alert__body"> <div class="usa-alert__body">
@@ -34,11 +31,8 @@
</p> </p>
</div> </div>
</div> </div>
</p>
<div class="">
{{ template|string }} {{ template|string }}
</div>
{% 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">

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