Merge pull request #282 from cisagov/nmb/submission-page

Successful application submission page
This commit is contained in:
Neil MartinsenBurrell 2022-11-22 11:39:50 -08:00 committed by GitHub
commit e746cb2adc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 12 deletions

View file

@ -17,6 +17,7 @@
"http://app:8080/register/security_email/",
"http://app:8080/register/anything_else/",
"http://app:8080/register/requirements/",
"http://app:8080/register/review/"
"http://app:8080/register/review/",
"http://app:8080/register/finished/"
]
}

View file

@ -3,7 +3,7 @@
import logging
from django import forms
from django.shortcuts import redirect
from django.shortcuts import render
from django.contrib.auth.mixins import LoginRequiredMixin
@ -357,4 +357,6 @@ class ApplicationWizard(LoginRequiredMixin, NamedUrlSessionWizardView):
application.submit() # change the status to submitted
application.save()
logger.debug("Application object saved: %s", application.id)
return redirect("home")
return render(
self.request, "application_done.html", {"application_id": application.id}
)

View file

@ -0,0 +1,40 @@
{% extends 'base.html' %}
{% block title %}Thank you for your domain request{% endblock %}
{% block content %}
<h1>Thank you!</h1>
<p>
Thank you for your domain request. We'll email a copy of your request to you,
your authorizing official, and any contacts you added.</p>
<h2>Next steps in this process</h2>
<ul>
<li> We'll review your request. This could take up to two weeks. During
this review we'll verify that you're eligible for a .gov domain, that
your authorizing official approves your request, and that your domain
meets our naming requirements.
</li>
<li> You can <a href="/application/{{ application_id }}"><del>check the
status</del></a> of your request at any time.
</li>
<li> We'll email you with any questions or when we complete our
review.</li>
</ul>
<h2>Option to enter domain name server information</h2>
<p>Before your domain can be used we'll need information about your
domain name servers. If you have this information you can enter it now.
If you don't have it, that's okay. You can enter it later on the
<a href="/domains"><del>manage your domains page</del></a>.
</p>
<p><a href="/application/{{ application_id }}#nameservers" class="usa-button">Enter DNS name servers</a></p>
{% endblock %}

View file

@ -317,15 +317,8 @@ class FormTests(TestWithUser, WebTest):
self.assertEquals(review_result.status_code, 302)
self.assertEquals(review_result["Location"], "/register/finished/")
# the finished URL (for now) returns a redirect to /
# following this redirect is a GET request, so include the cookie
# here too.
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
root_page = review_result.follow()
self.assertEquals(root_page.status_code, 302)
self.assertEquals(root_page["Location"], "/")
self.assertContains(root_page.follow(), "Welcome to the .gov registrar")
# TODO: when we have a page that lists applications, visit it and
# make sure that the new one exists
final_result = review_result.follow()
self.assertContains(final_result, "Thank you for your domain request")