From f5300053dc3b47e8ba0882ce5a272bed8259d9e1 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Tue, 29 Aug 2023 15:29:02 -0400 Subject: [PATCH 1/4] 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 --- src/registrar/templates/application_status.html | 4 ++++ .../templates/includes/summary_item.html | 15 +++++++++++++++ src/registrar/tests/test_views.py | 2 ++ 3 files changed, 21 insertions(+) diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html index 99f6a1d4c..7e23cfe32 100644 --- a/src/registrar/templates/application_status.html +++ b/src/registrar/templates/application_status.html @@ -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 %} diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index a2035b227..3295963ed 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -43,6 +43,21 @@ {% else %} {% include "includes/contact.html" with contact=value %} {% endif %} + {% elif requested_domain %} + {% if value.alternative_domains.all %} + + + {% else %} +

+ {{ value.requested_domain }} +

+ {% endif %} {% elif list %} {% if value|length == 1 %} {% if users %} diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index b4795de72..1a4d2197f 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -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") From 1a81d75170963eca872ddf3c330e1b062959d23b Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Wed, 30 Aug 2023 07:02:18 -0400 Subject: [PATCH 2/4] show requested domain and alternate domains on manage screen; formatting conditional based on existence of alternative domains; check added for alternative domains in test_views --- src/registrar/templates/application_status.html | 6 +++++- .../templates/includes/summary_item.html | 15 --------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/registrar/templates/application_status.html b/src/registrar/templates/application_status.html index 7e23cfe32..dcae617a8 100644 --- a/src/registrar/templates/application_status.html +++ b/src/registrar/templates/application_status.html @@ -84,7 +84,11 @@ {% endif %} {% if domainapplication.requested_domain %} - {% include "includes/summary_item.html" with title='.gov domain' value=domainapplication requested_domain='true' heading_level=heading_level %} + {% include "includes/summary_item.html" with title='.gov domain' value=domainapplication.requested_domain heading_level=heading_level %} + {% endif %} + + {% if domainapplication.alternative_domains.all %} + {% include "includes/summary_item.html" with title='Alternative domains' value=domainapplication.alternative_domains.all list='true' heading_level=heading_level %} {% endif %} {% if domainapplication.purpose %} diff --git a/src/registrar/templates/includes/summary_item.html b/src/registrar/templates/includes/summary_item.html index 3295963ed..a2035b227 100644 --- a/src/registrar/templates/includes/summary_item.html +++ b/src/registrar/templates/includes/summary_item.html @@ -43,21 +43,6 @@ {% else %} {% include "includes/contact.html" with contact=value %} {% endif %} - {% elif requested_domain %} - {% if value.alternative_domains.all %} - - - {% else %} -

- {{ value.requested_domain }} -

- {% endif %} {% elif list %} {% if value|length == 1 %} {% if users %} From a564fe017c1b3c51be87a078be844ac0e042984e Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Wed, 30 Aug 2023 15:15:43 -0400 Subject: [PATCH 3/4] skew fix --- src/djangooidc/oidc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/djangooidc/oidc.py b/src/djangooidc/oidc.py index 26eb54d3d..9907e4ee4 100644 --- a/src/djangooidc/oidc.py +++ b/src/djangooidc/oidc.py @@ -238,6 +238,10 @@ class Client(oic.Client): "client_secret": self.client_secret, }, authn_method=self.registration_response["token_endpoint_auth_method"], + # There is a time desync issue between login.gov and cloud, + # this addresses that by adding a clock skew. + # See here: https://github.com/GSA-TTS/FAC/pull/1968#pullrequestreview-1601224051 + skew=10, ) except Exception as err: logger.error(err) From aa41df0ca465703587a7a17b3be7739faf84d484 Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Wed, 30 Aug 2023 15:21:12 -0400 Subject: [PATCH 4/4] fixed lint feedback --- src/djangooidc/oidc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/djangooidc/oidc.py b/src/djangooidc/oidc.py index 9907e4ee4..0d196194d 100644 --- a/src/djangooidc/oidc.py +++ b/src/djangooidc/oidc.py @@ -240,7 +240,6 @@ class Client(oic.Client): authn_method=self.registration_response["token_endpoint_auth_method"], # There is a time desync issue between login.gov and cloud, # this addresses that by adding a clock skew. - # See here: https://github.com/GSA-TTS/FAC/pull/1968#pullrequestreview-1601224051 skew=10, ) except Exception as err: