Skip to content

Commit

Permalink
WIP - fixed homepage view
Browse files Browse the repository at this point in the history
  • Loading branch information
rachidatecs committed Jan 5, 2024
1 parent 653a958 commit c21c417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/registrar/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ <h2>Domains</h2>
</th>
<td data-sort-value="{{ domain.expiration_date|date:"U" }}" data-label="Expires">{{ domain.expiration_date|date }}</td>
<td data-label="Status">
{% if domain.is_expired %}
{# UNKNOWN domains would not have an expiration date and thus would show 'Expired' #}
{% if domain.is_expired and domain.state != "unknown" %}
Expired
{% elif domain.state == "unknown" or domain.state == "dns needed"%}
DNS needed
Expand Down
8 changes: 8 additions & 0 deletions src/registrar/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,14 @@ def test_domain_detail_link_works(self):
detail_page = home_page.click("Manage", index=0)
self.assertContains(detail_page, "igorville.gov")
self.assertContains(detail_page, "Status")

def test_unknown_domain_does_not_show_as_expired(self):
home_page = self.app.get("/")
self.assertContains(home_page, "igorville.gov")
# click the "Edit" link
# detail_page = home_page.click("Manage", index=0)
# self.assertContains(detail_page, "igorville.gov")
# self.assertContains(detail_page, "Status")

def test_domain_detail_blocked_for_ineligible_user(self):
"""We could easily duplicate this test for all domain management
Expand Down

0 comments on commit c21c417

Please sign in to comment.