diff --git a/docs/developer/registry-access.md b/docs/developer/registry-access.md index c7737d5bc..c52810c35 100644 --- a/docs/developer/registry-access.md +++ b/docs/developer/registry-access.md @@ -103,3 +103,50 @@ response = registry._client.transport.receive() ``` This is helpful for debugging situations where epplib is not correctly or fully parsing the XML returned from the registry. + +### Adding in a expiring soon domain +The below scenario is if you are NOT in org model mode (`organization_feature` waffle flag is off). + +1. Go to the `staging` sandbox and to `/admin` +2. Go to Domains and find a domain that is actually expired by sorting the Expiration Date column +3. Click into the domain to check the expiration date +4. Click into Manage Domain to double check the expiration date as well +5. Now hold onto that domain name, and save it for the command below + +6. In a terminal, run these commands: +``` +cf ssh getgov- +/tmp/lifecycle/shell +./manage.py shell +from registrar.models import Domain, DomainInvitation +from registrar.models import User +user = User.objects.filter(first_name="") +domain = Domain.objects.get_or_create(name="") +``` + +7. Go back to `/admin` and create Domain Information for that domain you just added in via the terminal +8. Go to Domain to find it +9. Click Manage Domain +10. Add yourself as domain manager +11. Go to the Registrar page and you should now see the expiring domain + +If you want to be in the org model mode, turn the `organization_feature` waffle flag on, and add that domain via Django Admin to a portfolio to be able to view it. + + + + + + + + + + + + + + + + + + + diff --git a/src/registrar/tests/test_views_domain.py b/src/registrar/tests/test_views_domain.py index fa4351de1..e6e42d563 100644 --- a/src/registrar/tests/test_views_domain.py +++ b/src/registrar/tests/test_views_domain.py @@ -576,7 +576,7 @@ class TestDomainDetailDomainRenewal(TestDomainOverview): self.assertContains(edit_page, "Review the details below and update any required information") @override_flag("domain_renewal", active=True) - def test_domain_renewal_form_security_contact_edit(self): + def test_domain_renewal_form_security_email_edit(self): with less_console_noise(): # Start on the Renewal page for the domain renewal_page = self.app.get(reverse("domain-renewal", kwargs={"pk": self.domain_with_ip.id})) @@ -584,6 +584,9 @@ class TestDomainDetailDomainRenewal(TestDomainOverview): # Verify we see "Security email" on the renewal form self.assertContains(renewal_page, "Security email") + # Verify we see "strong recommend" blurb + self.assertContains(renewal_page, "We strongly recommend that you provide a security email.") + # Verify that the "Edit" button for Security email is there and links to correct URL edit_button_url = reverse("domain-security-email", kwargs={"pk": self.domain_with_ip.id}) self.assertContains(renewal_page, f'href="{edit_button_url}"') diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index ab68addb7..7ce0d7e1a 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -380,9 +380,9 @@ class DomainRenewalView(DomainBaseView): if "submit_button" in request.POST: try: domain.renew_domain() - messages.success(request, "This domain has been renewed for one year") + messages.success(request, "This domain has been renewed for one year.") except Exception as e: - messages.error(request, "*** This domain has not been renewed") + messages.error(request, "This domain has not been renewed for one year, error was %s" % e) return HttpResponseRedirect(reverse("domain", kwargs={"pk": pk}))