mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 11:29:25 +02:00
Merge pull request #1621 from cisagov/rh/1288-register-to-request
ISSUE 1288: New URL Path (register -> request)
This commit is contained in:
commit
d915edd61c
6 changed files with 47 additions and 47 deletions
28
src/.pa11yci
28
src/.pa11yci
|
@ -6,19 +6,19 @@
|
|||
"urls": [
|
||||
"http://localhost:8080/",
|
||||
"http://localhost:8080/health/",
|
||||
"http://localhost:8080/register/",
|
||||
"http://localhost:8080/register/organization/",
|
||||
"http://localhost:8080/register/org_federal/",
|
||||
"http://localhost:8080/register/org_election/",
|
||||
"http://localhost:8080/register/org_contact/",
|
||||
"http://localhost:8080/register/authorizing_official/",
|
||||
"http://localhost:8080/register/current_sites/",
|
||||
"http://localhost:8080/register/dotgov_domain/",
|
||||
"http://localhost:8080/register/purpose/",
|
||||
"http://localhost:8080/register/your_contact/",
|
||||
"http://localhost:8080/register/other_contacts/",
|
||||
"http://localhost:8080/register/anything_else/",
|
||||
"http://localhost:8080/register/requirements/",
|
||||
"http://localhost:8080/register/finished/"
|
||||
"http://localhost:8080/request/",
|
||||
"http://localhost:8080/request/organization/",
|
||||
"http://localhost:8080/request/org_federal/",
|
||||
"http://localhost:8080/request/org_election/",
|
||||
"http://localhost:8080/request/org_contact/",
|
||||
"http://localhost:8080/request/authorizing_official/",
|
||||
"http://localhost:8080/request/current_sites/",
|
||||
"http://localhost:8080/request/dotgov_domain/",
|
||||
"http://localhost:8080/request/purpose/",
|
||||
"http://localhost:8080/request/your_contact/",
|
||||
"http://localhost:8080/request/other_contacts/",
|
||||
"http://localhost:8080/request/anything_else/",
|
||||
"http://localhost:8080/request/requirements/",
|
||||
"http://localhost:8080/request/finished/"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ urlpatterns = [
|
|||
),
|
||||
path("health/", views.health),
|
||||
path("openid/", include("djangooidc.urls")),
|
||||
path("register/", include((application_urls, APPLICATION_NAMESPACE))),
|
||||
path("request/", include((application_urls, APPLICATION_NAMESPACE))),
|
||||
path("api/v1/available/", available, name="available"),
|
||||
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
|
||||
path("api/v1/get-report/current-full", get_current_full, name="get-current-full"),
|
||||
|
|
|
@ -59,9 +59,9 @@ class TestViews(TestCase):
|
|||
|
||||
def test_application_form_not_logged_in(self):
|
||||
"""Application form not accessible without a logged-in user."""
|
||||
response = self.client.get("/register/")
|
||||
response = self.client.get("/request/")
|
||||
self.assertEqual(response.status_code, 302)
|
||||
self.assertIn("/login?next=/register/", response.headers["Location"])
|
||||
self.assertIn("/login?next=/request/", response.headers["Location"])
|
||||
|
||||
|
||||
class TestWithUser(MockEppLib):
|
||||
|
@ -100,7 +100,7 @@ class LoggedInTests(TestWithUser):
|
|||
application.delete()
|
||||
|
||||
def test_application_form_view(self):
|
||||
response = self.client.get("/register/", follow=True)
|
||||
response = self.client.get("/request/", follow=True)
|
||||
self.assertContains(
|
||||
response,
|
||||
"You’re about to start your .gov domain request.",
|
||||
|
@ -114,7 +114,7 @@ class LoggedInTests(TestWithUser):
|
|||
self.user.save()
|
||||
|
||||
with less_console_noise():
|
||||
response = self.client.get("/register/", follow=True)
|
||||
response = self.client.get("/request/", follow=True)
|
||||
print(response.status_code)
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
|
@ -148,7 +148,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
self.assertEqual(detail_page.status_code, 302)
|
||||
# You can access the 'Location' header to get the redirect URL
|
||||
redirect_url = detail_page.url
|
||||
self.assertEqual(redirect_url, "/register/organization_type/")
|
||||
self.assertEqual(redirect_url, "/request/organization_type/")
|
||||
|
||||
def test_application_form_empty_submit(self):
|
||||
"""Tests empty submit on the first page after the acknowledgement page"""
|
||||
|
@ -242,7 +242,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(type_result.status_code, 302)
|
||||
self.assertEqual(type_result["Location"], "/register/organization_federal/")
|
||||
self.assertEqual(type_result["Location"], "/request/organization_federal/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- FEDERAL BRANCH PAGE ----
|
||||
|
@ -262,7 +262,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(federal_result.status_code, 302)
|
||||
self.assertEqual(federal_result["Location"], "/register/organization_contact/")
|
||||
self.assertEqual(federal_result["Location"], "/request/organization_contact/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- ORG CONTACT PAGE ----
|
||||
|
@ -295,7 +295,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(org_contact_result.status_code, 302)
|
||||
self.assertEqual(org_contact_result["Location"], "/register/authorizing_official/")
|
||||
self.assertEqual(org_contact_result["Location"], "/request/authorizing_official/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- AUTHORIZING OFFICIAL PAGE ----
|
||||
|
@ -320,7 +320,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(ao_result.status_code, 302)
|
||||
self.assertEqual(ao_result["Location"], "/register/current_sites/")
|
||||
self.assertEqual(ao_result["Location"], "/request/current_sites/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- CURRENT SITES PAGE ----
|
||||
|
@ -342,7 +342,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(current_sites_result.status_code, 302)
|
||||
self.assertEqual(current_sites_result["Location"], "/register/dotgov_domain/")
|
||||
self.assertEqual(current_sites_result["Location"], "/request/dotgov_domain/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- DOTGOV DOMAIN PAGE ----
|
||||
|
@ -362,7 +362,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(dotgov_result.status_code, 302)
|
||||
self.assertEqual(dotgov_result["Location"], "/register/purpose/")
|
||||
self.assertEqual(dotgov_result["Location"], "/request/purpose/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- PURPOSE PAGE ----
|
||||
|
@ -381,7 +381,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(purpose_result.status_code, 302)
|
||||
self.assertEqual(purpose_result["Location"], "/register/your_contact/")
|
||||
self.assertEqual(purpose_result["Location"], "/request/your_contact/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- YOUR CONTACT INFO PAGE ----
|
||||
|
@ -409,7 +409,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(your_contact_result.status_code, 302)
|
||||
self.assertEqual(your_contact_result["Location"], "/register/other_contacts/")
|
||||
self.assertEqual(your_contact_result["Location"], "/request/other_contacts/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- OTHER CONTACTS PAGE ----
|
||||
|
@ -447,7 +447,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(other_contacts_result.status_code, 302)
|
||||
self.assertEqual(other_contacts_result["Location"], "/register/anything_else/")
|
||||
self.assertEqual(other_contacts_result["Location"], "/request/anything_else/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- ANYTHING ELSE PAGE ----
|
||||
|
@ -467,7 +467,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(anything_else_result.status_code, 302)
|
||||
self.assertEqual(anything_else_result["Location"], "/register/requirements/")
|
||||
self.assertEqual(anything_else_result["Location"], "/request/requirements/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- REQUIREMENTS PAGE ----
|
||||
|
@ -487,7 +487,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the next form in
|
||||
# the application
|
||||
self.assertEqual(requirements_result.status_code, 302)
|
||||
self.assertEqual(requirements_result["Location"], "/register/review/")
|
||||
self.assertEqual(requirements_result["Location"], "/request/review/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# ---- REVIEW AND FINSIHED PAGES ----
|
||||
|
@ -541,7 +541,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
review_result = review_form.submit()
|
||||
|
||||
self.assertEqual(review_result.status_code, 302)
|
||||
self.assertEqual(review_result["Location"], "/register/finished/")
|
||||
self.assertEqual(review_result["Location"], "/request/finished/")
|
||||
num_pages_tested += 1
|
||||
|
||||
# following this redirect is a GET request, so include the cookie
|
||||
|
@ -622,7 +622,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the federal branch
|
||||
# question
|
||||
self.assertEqual(type_result.status_code, 302)
|
||||
self.assertEqual(type_result["Location"], "/register/organization_federal/")
|
||||
self.assertEqual(type_result["Location"], "/request/organization_federal/")
|
||||
|
||||
# and the step label should appear in the sidebar of the resulting page
|
||||
# but the step label for the elections page should not appear
|
||||
|
@ -639,7 +639,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the contact
|
||||
# question
|
||||
self.assertEqual(federal_result.status_code, 302)
|
||||
self.assertEqual(federal_result["Location"], "/register/organization_contact/")
|
||||
self.assertEqual(federal_result["Location"], "/request/organization_contact/")
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
contact_page = federal_result.follow()
|
||||
self.assertContains(contact_page, "Federal agency")
|
||||
|
@ -676,7 +676,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
|
||||
# the post request should return a redirect to the elections question
|
||||
self.assertEqual(type_result.status_code, 302)
|
||||
self.assertEqual(type_result["Location"], "/register/organization_election/")
|
||||
self.assertEqual(type_result["Location"], "/request/organization_election/")
|
||||
|
||||
# and the step label should appear in the sidebar of the resulting page
|
||||
# but the step label for the elections page should not appear
|
||||
|
@ -693,7 +693,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the contact
|
||||
# question
|
||||
self.assertEqual(election_result.status_code, 302)
|
||||
self.assertEqual(election_result["Location"], "/register/organization_contact/")
|
||||
self.assertEqual(election_result["Location"], "/request/organization_contact/")
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
contact_page = election_result.follow()
|
||||
self.assertNotContains(contact_page, "Federal agency")
|
||||
|
@ -731,7 +731,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
|
||||
# Should be a link to the organization_federal page
|
||||
self.assertGreater(
|
||||
len(new_page.html.find_all("a", href="/register/organization_federal/")),
|
||||
len(new_page.html.find_all("a", href="/request/organization_federal/")),
|
||||
0,
|
||||
)
|
||||
|
||||
|
@ -778,7 +778,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
|
|||
# the post request should return a redirect to the
|
||||
# about your organization page if it was successful.
|
||||
self.assertEqual(contact_result.status_code, 302)
|
||||
self.assertEqual(contact_result["Location"], "/register/about_your_organization/")
|
||||
self.assertEqual(contact_result["Location"], "/request/about_your_organization/")
|
||||
|
||||
def test_application_about_your_organization_special(self):
|
||||
"""Special districts have to answer an additional question."""
|
||||
|
|
|
@ -73,7 +73,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
|
|||
URL_NAMESPACE = "application"
|
||||
# name for accessing /application/<id>/edit
|
||||
EDIT_URL_NAME = "edit-application"
|
||||
NEW_URL_NAME = "/register/"
|
||||
NEW_URL_NAME = "/request/"
|
||||
# We need to pass our human-readable step titles as context to the templates.
|
||||
TITLES = {
|
||||
Step.ORGANIZATION_TYPE: _("Type of organization"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue