diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index 15835920b..8fa3034a0 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -52,7 +52,8 @@ {{ domain.expiration_date|date }} - {% 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 diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index 1419d34f2..491b478ca 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -1500,6 +1500,14 @@ class TestDomainDetail(TestDomainOverview): 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