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
|
@ -2,7 +2,7 @@
|
|||
|
||||
This diagram connects the data models along with various workflow stages.
|
||||
|
||||
1. The applicant starts the process at `/register` interacting with the
|
||||
1. The applicant starts the process at `/request` interacting with the
|
||||
`DomainApplication` object.
|
||||
|
||||
2. The analyst approves the application using the `DomainApplication`'s
|
||||
|
@ -139,7 +139,7 @@ DomainInvitation -- Domain
|
|||
DomainInvitation .[#green].> UserDomainRole : User.on_each_login()
|
||||
|
||||
actor applicant #Red
|
||||
applicant -d-> DomainApplication : **/register**
|
||||
applicant -d-> DomainApplication : **/request**
|
||||
|
||||
actor analyst #Blue
|
||||
analyst -[#blue]-> DomainApplication : **approve()**
|
||||
|
|
|
@ -63,7 +63,7 @@ To diagnose this issue, you will have to manually delete tables using the psql s
|
|||
1. `cf login -a api.fr.cloud.gov --sso`
|
||||
2. Run `cf connect-to-service -no-client getgov-{environment_name} getgov-{environment_name}-database` to open a SSH tunnel
|
||||
3. Run `psql -h localhost -p {port} -U {username} -d {broker_name}`
|
||||
4. Open a new terminal window and run `cf ssh getgov{environment_name}`
|
||||
4. Open a new terminal window and run `cf ssh getgov-{environment_name}`
|
||||
5. Within that window, run `tmp/lifecycle/shell`
|
||||
6. Within that window, run `./manage.py migrate` and observe which tables are duplicates
|
||||
|
||||
|
@ -102,7 +102,7 @@ Example: there are extra columns created on a table by an old migration long sin
|
|||
Example: You are able to log in and access the /admin page, but when you arrive at the registrar you keep getting 500 errors and your log-ins any API calls you make via the UI does not show up in the log stream. And you feel like you’re starting to lose your marbles.
|
||||
|
||||
In the CLI, run the command `cf routes`
|
||||
If you notice that your route of `getgov-<app>.app.cloud.gov` is pointing two apps, then that is probably the major issue of the 500 error. (ie mine was pointing at `getgov-<app>.app.cloud.gov` AND `cisa-dotgov`
|
||||
If you notice that your route of `getgov-<app>.app.cloud.gov` is pointing two apps, then that is probably the major issue of the 500 error. (ie mine was pointing at `getgov-<app>.app.cloud.gov` AND `cisa-dotgov`)
|
||||
In the CLI, run the command `cf apps` to check that it has an app running called `cisa-dotgov`. If so, there’s the error!
|
||||
Essentially this shows that your requests were being handled by two completely separate applications and that’s why some requests aren’t being located.
|
||||
To resolve this issue, remove the app named `cisa-dotgov` from this space.
|
||||
|
@ -117,7 +117,7 @@ https://cisa-corp.slack.com/archives/C05BGB4L5NF/p1697810600723069
|
|||
|
||||
### Scenario 8: Can’t log into sandbox, permissions do not exist
|
||||
|
||||
- Fake migrate the migration that’s before the last data creation migration
|
||||
- Run the last data creation migration (AND ONLY THAT ONE)
|
||||
- Fake migrate the last migration in the migration list
|
||||
- Rerun fixtures
|
||||
1. `./manage.py migrate --fake model_name_here file_name_BEFORE_the_most_recent_CREATE_migration` (fake migrate the migration that’s before the last data creation migration -- look for number_create, and then copy the file BEFORE it)
|
||||
2. `./manage.py migrate model_name_here file_name_WITH_create` (run the last data creation migration AND ONLY THAT ONE)
|
||||
3. `./manage.py migrate --fake model_name_here most_recent_file_name` (fake migrate the last migration in the migration list)
|
||||
4. `./manage.py load` (rerun fixtures)
|
||||
|
|
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