show requested domain and alternate domains on manage screen; formatting conditional based on existence of alternate domains; add check for alternate domains in test_views

This commit is contained in:
David Kennedy 2023-08-29 15:29:02 -04:00
parent 97d97234f1
commit f5300053dc
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
3 changed files with 21 additions and 0 deletions

View file

@ -83,6 +83,10 @@
{% include "includes/summary_item.html" with title='Current website for your organization' value=domainapplication.current_websites.all list='true' heading_level=heading_level %}
{% endif %}
{% if domainapplication.requested_domain %}
{% include "includes/summary_item.html" with title='.gov domain' value=domainapplication requested_domain='true' heading_level=heading_level %}
{% endif %}
{% if domainapplication.purpose %}
{% include "includes/summary_item.html" with title='Purpose of your domain' value=domainapplication.purpose heading_level=heading_level %}
{% endif %}

View file

@ -43,6 +43,21 @@
{% else %}
{% include "includes/contact.html" with contact=value %}
{% endif %}
{% elif requested_domain %}
{% if value.alternative_domains.all %}
<ul class="usa-list usa-list--unstyled margin-bottom-105">
<li>{{ value.requested_domain.name|default:"Incomplete" }}</li>
</ul>
<ul class="usa-list usa-list--unstyled">
{% for domain in value.alternative_domains.all %}
<li>{{ domain.website }}</li>
{% endfor %}
</ul>
{% else %}
<p class="margin-top-0 margin-bottom-0">
{{ value.requested_domain }}
</p>
{% endif %}
{% elif list %}
{% if value|length == 1 %}
{% if users %}

View file

@ -1442,6 +1442,7 @@ class TestApplicationStatus(TestWithUser, WebTest):
# click the "Manage" link
detail_page = home_page.click("Manage")
self.assertContains(detail_page, "city.gov")
self.assertContains(detail_page, "city1.gov")
self.assertContains(detail_page, "Chief Tester")
self.assertContains(detail_page, "testy@town.com")
self.assertContains(detail_page, "Admin Tester")
@ -1459,6 +1460,7 @@ class TestApplicationStatus(TestWithUser, WebTest):
# click the "Manage" link
detail_page = home_page.click("Manage")
self.assertContains(detail_page, "city.gov")
self.assertContains(detail_page, "city1.gov")
self.assertContains(detail_page, "Chief Tester")
self.assertContains(detail_page, "testy@town.com")
self.assertContains(detail_page, "Admin Tester")