Merge branch 'main' into nmb/trim-field-labels

This commit is contained in:
Neil Martinsen-Burrell 2023-02-28 12:56:49 -06:00
commit c9aa014988
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
18 changed files with 108 additions and 320 deletions

View file

@ -14,7 +14,6 @@
"http://app:8080/register/purpose/",
"http://app:8080/register/your_contact/",
"http://app:8080/register/other_contacts/",
"http://app:8080/register/security_email/",
"http://app:8080/register/anything_else/",
"http://app:8080/register/requirements/",
"http://app:8080/register/review/",

View file

@ -36,7 +36,6 @@ for step, view in [
(Step.YOUR_CONTACT, views.YourContact),
(Step.OTHER_CONTACTS, views.OtherContacts),
(Step.NO_OTHER_CONTACTS, views.NoOtherContacts),
(Step.SECURITY_EMAIL, views.SecurityEmail),
(Step.ANYTHING_ELSE, views.AnythingElse),
(Step.REQUIREMENTS, views.Requirements),
(Step.REVIEW, views.Review),

View file

@ -89,7 +89,6 @@ class DomainApplicationFixture:
# "zipcode": None,
# "urbanization": None,
# "purpose": None,
# "security_email": None,
# "anything_else": None,
# "is_policy_acknowledged": None,
# "authorizing_official": None,
@ -152,7 +151,6 @@ class DomainApplicationFixture:
da.zipcode = app["zipcode"] if "zipcode" in app else fake.postalcode()
da.urbanization = app["urbanization"] if "urbanization" in app else None
da.purpose = app["purpose"] if "purpose" in app else fake.paragraph()
da.security_email = app["security_email"] if "security_email" in app else None
da.anything_else = app["anything_else"] if "anything_else" in app else None
da.is_policy_acknowledged = (
app["is_policy_acknowledged"] if "is_policy_acknowledged" in app else True

View file

@ -6,6 +6,8 @@ from phonenumber_field.formfields import PhoneNumberField # type: ignore
from django import forms
from django.core.validators import RegexValidator
from django.urls import reverse
from django.utils.safestring import mark_safe
from api.views import DOMAIN_API_MESSAGES
@ -179,11 +181,19 @@ class TribalGovernmentForm(RegistrarForm):
self.cleaned_data["federally_recognized_tribe"]
or self.cleaned_data["state_recognized_tribe"]
):
todo_url = reverse("todo")
raise forms.ValidationError(
"Only tribes recognized by the U.S. federal government or by a U.S."
" state government are eligible for .gov domains. Please email"
" registrar@dotgov.gov to tell us more about your tribe and why you"
" want a .gov domain.",
# no sec because we are using it to include an internal URL
# into a link. There should be no user-facing input in the
# HTML indicated here.
mark_safe( # nosec
"Only tribes recognized by the U.S. federal government "
"or by a U.S. state government are eligible for .gov "
'domains. Please <a href="{}">tell us more '
"about your tribe and why you want a .gov domain</a>.".format(
todo_url
)
),
code="invalid",
)
@ -672,18 +682,6 @@ class NoOtherContactsForm(RegistrarForm):
)
class SecurityEmailForm(RegistrarForm):
security_email = forms.EmailField(
required=False,
label="Security email for public use",
error_messages={
"invalid": (
"Enter an email address in the required format, like name@example.com."
)
},
)
class AnythingElseForm(RegistrarForm):
anything_else = forms.CharField(
required=False,
@ -694,14 +692,11 @@ class AnythingElseForm(RegistrarForm):
class RequirementsForm(RegistrarForm):
is_policy_acknowledged = forms.BooleanField(
label=(
"I read and agree to the requirements for registering "
"and operating .gov domains."
),
label=("I read and agree to the requirements for operating .gov domains."),
error_messages={
"required": (
"Check the box if you read and agree to the requirements for"
" registering and operating .gov domains."
" operating .gov domains."
)
},
)

View file

@ -0,0 +1,16 @@
# Generated by Django 4.1.6 on 2023-02-27 18:35
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("registrar", "0010_domainapplication_no_other_contacts_rationale"),
]
operations = [
migrations.RemoveField(
model_name="domainapplication",
name="security_email",
),
]

View file

@ -440,13 +440,6 @@ class DomainApplication(TimeStampedModel):
help_text="Reason for listing no additional contacts",
)
security_email = models.CharField(
max_length=320,
null=True,
blank=True,
help_text="Security email for public use",
)
anything_else = models.TextField(
null=True,
blank=True,

View file

@ -20,7 +20,7 @@
meets our requirements. Well work with you to find the best domain for your
organization.</p>
<p>Here are a few domain examples for your type of organization.</p>
<p>Here are domain examples and more guidance for your type of organization.</p>
<div class="domain_example">
{% include "includes/domain_example.html" %}
</div>

View file

@ -3,14 +3,14 @@
{% block form_instructions %}
<h2 class="margin-bottom-05">
Is your organization an election office?
Is your organization an election office? <abbr class="usa-hint usa-hint--required" title="required">*</abbr>
</h2>
<p class="text-semibold">This question is required.</p>
<p>Answer “yes” if the primary purpose of your organization is to manage elections.</p>
{% endblock %}
{% block form_required_fields_help_text %}
{# commented out so it does not appear on this page #}
<p class="text-semibold"><abbr class="usa-hint usa-hint--required" title="required">*</abbr> This question is required.</p>
{% endblock %}
{% block form_fields %}

View file

@ -2,14 +2,13 @@
{% load field_helpers %}
{% block form_instructions %}
<p>.Gov domain names are intended for use on the internet. They should be registered
with an intent to deploy services, not simply to reserve a name. .Gov domains should
not be registered for primarily internal use.</p>
<p>.Gov domain names are for use on the internet. Dont register a .gov to simply reserve a
domain name or for mainly internal use.</p>
<p>Describe the reason for your domain request. Explain how you plan to use this
domain. Will you use it for a website and/or email? Are you moving your website from
another top-level domain (like .com or .org)? Read about <a href="{% url 'todo' %}">activities that
are prohibited on .gov domains.</a></p>
<p>Describe the reason for your domain request. Explain how you plan to use this domain.
Who is your intended audience? Will you use it for a website and/or email? Are you moving
your website from another top-level domain (like .com or .org)?
Read about <a href="{% url 'todo' %}">activities that are prohibited on .gov domains.</a></p>
{% endblock %}

View file

@ -2,55 +2,44 @@
{% load field_helpers %}
{% block form_instructions %}
<p>The .gov domain exists to support a broad diversity of government missions and
public initiatives. Generally, the .gov registry does not review or audit how
government organizations use their domains. However, misuse of an individual .gov
domain can reflect upon the integrity of the entire .gov space. There are categories
of misuse that are statutorily prohibited or abusive in nature.</p>
<p>Please read this page. Check the box at the bottom to show that you agree to the requirements for operating .gov domains.</p>
<p>The .gov domain space exists to support a broad diversity of government missions. Generally, we dont examine how government organizations use their domains. However, misuse of a .gov domain can reflect upon the integrity of the entire .gov space. There are categories of misuse that are statutorily prohibited or abusive in nature.</p>
<h2>Prohibited activities for .gov domains</h2>
<h3>Commercial purposes </h3>
<h2>What you cant do with .gov domains</h2>
<p>A .gov domain must not be used for commercial purposes, such as advertising
benefitting private individuals or entities.</p>
<h3>Commercial purposes</h3>
<p>.Gov domains must not be used for commercial purposes, such as advertising that benefits private individuals or entities.</p>
<h3>Political campaigns</h3>
<p>A .gov domain must not be used for political campaigns.</p>
<p>.Gov domains must not be used for political campaigns.</p>
<h3>Illegal content</h3>
<p>A .gov domain must not be used to distribute or promote material whose distribution
violates applicable law.</p>
<p>.Gov domains must not be used to distribute or promote material whose distribution violates applicable law.</p>
<h3>Malicious cyber activity </h3>
<p>.Gov is a trusted and safe space. .Gov domains must not distribute malware, host
open redirects, or otherwise engage in malicious cyber activity.</p>
<h2>Required activities for .gov domain registrants </h2>
<h2>What .gov domain registrants must do</h2>
<h3>Keep your contact information updated</h3>
<p>As a .gov domain registrant, maintain current and accurate contact information in the
.gov registrar. We strongly recommend that you create and use a security contact.</p>
<p>.Gov domain registrants must maintain accurate contact information in the .gov registrar.</p>
<h3>Be responsive if we contact you</h3>
<p>Registrants should respond in a timely manner to communications about required and
prohibited activities.</p>
<p>Registrants should respond promptly to communications about potential violations to these requirements.</p>
<h2>Domains can be suspended or terminated for violations</h2>
<h2>Failure to comply with these requirements could result in domain suspension or termination</h2>
<p>The .gov program may need to suspend or terminate a domain registration for
violations. Registrants should respond in a timely manner to communications about
prohibited activities.</p>
<p>When we discover a violation, we will make reasonable efforts to contact a
registrant, including:
<p>We may need to suspend or terminate a domain registration for violations. When we discover a violation, well make reasonable efforts to contact a registrant, including:
<ul class="usa-list">
<li>Emails to domain contacts </li>
<li>Emails to domain contacts</li>
<li>Phone calls to domain contacts</li>
<li>Email or phone call to the authorizing official</li>
<li>Emails or phone calls to the government organization, a parent organization,
@ -58,130 +47,9 @@
</ul>
</p>
<p>We understand the critical importance of the availability of .gov domains.
Suspending or terminating a .gov domain is reserved only for prolonged, unresolved
serious violations where the registrant is non-responsive. We will make extensive
efforts to contact registrants and to identify potential solutions, and will make
reasonable accommodations for remediation timelines proportional to the severity of
the issue.</p>
<h2>Requirements for authorizing officials</h2>
<p>Your authorizing official is the person within your organization who can authorize
your domain request. This is generally the highest ranking or highest elected official
in your organization.</p>
<h3>Executive branch federal agencies</h3>
<p>Domain requests from executive branch agencies must be authorized by CIOs or agency
heads.</p>
<p>Domain requests from executive branch agencies are subject to guidance issued by
the U.S. Office of Management and Budget.</p>
<h3>Judicial branch federal agencies</h3>
<p>Domain requests for judicial branch agencies, except the U.S. Supreme Court, must
be authorized by the director or CIO of the Administrative Office (AO) of the United
States Courts.</p>
<p>Domain requests from the U.S. Supreme Court must be authorized by the director of
information technology for the U.S. Supreme Court.</p>
<h3>Legislative branch federal agencies</h3>
<h4>U.S. Senate</h4>
<p>Domain requests from the U.S. Senate must come from the Senate Sergeant at Arms.</p>
<h4>U.S. House of Representatives</h4>
<p>Domain requests from the U.S. House of Representatives must come from the House
Chief Administrative Officer.</p>
<h4>Other legislative branch agencies</h4>
<p>Domain requests from legislative branch agencies must come from the agencys head
or CIO.</p>
<p>Domain requests from legislative commissions must come from the head of the
commission, or the head or CIO of the parent agency, if there is one.</p>
<h3>Interstate</h3>
<p>Domain requests from interstate organizations must be authorized by the
highest-ranking executive (president, director, chair, or equivalent) or one of the
states governors or CIOs.</p>
<h3>U.S. states and territories</h3>
<h4>States and territories: executive branch</h4>
<p>Domain requests from states and territories must be authorized by the governor or
the state CIO.</p>
<h4>States and territories: judicial and legislative branches</h4>
<p>Domain requests from state legislatures and courts must be authorized by an
agencys CIO or highest-ranking executive.</p>
<h3>Tribal governments</h3>
<p>Domain requests from federally-recognized tribal governments must be authorized by
tribal chiefs as noted by the
<a href="https://www.bia.gov/service/tribal-leaders-directory">Bureau of Indian
Affairs</a>.</p>
<h3>Counties</h3>
<p>Domain requests from counties must be authorized by the chair of the county
commission or the equivalent highest elected official.</p>
<h3>Cities</h3>
<p>Domain requests from cities must be authorized by the mayor or the equivalent
highest elected official.</p>
<h3>Special districts</h3>
<p>Domain requests from special districts must be authorized by the highest-ranking
executive (president, director, chair, or equivalent) or state CIOs for state-based
organizations.</p>
<h3>School districts</h3>
<p>Domain requests from school district governments must be authorized by the highest-ranking
executive (the chair of a school districts board or a superintendent).</p>
<h2>Requirements for .gov domain names</h2>
<p>.Gov domains must:
<ul class="usa-list">
<li>Be available</li>
<li>Be unique</li>
<li>Relate to your organizations name, location, and/or services</li>
<li>Be clear to the general public. Your domain name must not be easily confused
with other organizations.</li>
</ul>
</p>
<h2>HSTS preloading</h2>
<p>The .gov program will preload all newly registered .gov domains for HTTP Strict
Transport Security (HSTS).</p>
<p>HSTS is a simple and widely-supported standard that protects visitors by ensuring
that their browsers always connect to a website over HTTPS. HSTS removes the need to
redirect users from http:// to https:// URLs. (This redirection is a security risk
that HSTS eliminates.)</p>
<p>HSTS preloading impacts web traffic only. Once a domain is on the HSTS preload
list, modern web browsers will enforce HTTPS connections for all websites hosted on
the .gov domain. Users will not be able to click through warnings to reach a site.
Non-web uses of .gov (email, VPN, APIs, etc.) are not affected.</p>
<p>We understand the critical importance of the availability of .gov domains. Suspending or terminating a .gov domain is reserved for prolonged, unresolved, serious violations where the registrant is non-responsive. We'll make extensive efforts to contact registrants and to identify potential solutions. We'll make reasonable accommodations for remediation timelines based on the severity of the issue.</p>
{% endblock %}
{% block form_fields %}
<fieldset class="usa-fieldset">
<legend>
@ -191,4 +59,4 @@
{% input_with_errors forms.0.is_policy_acknowledged %}
</fieldset>
{% endblock %}
{% endblock %}

View file

@ -90,9 +90,6 @@
{% if step == Step.NO_OTHER_CONTACTS %}
{{ application.no_other_contacts_rationale|default:"Incomplete" }}
{% endif %}
{% if step == Step.SECURITY_EMAIL %}
{{ application.security_email|default:"None" }}
{% endif %}
{% if step == Step.ANYTHING_ELSE %}
{{ application.anything_else|default:"No" }}
{% endif %}

View file

@ -1,20 +0,0 @@
{% extends 'application_form.html' %}
{% load field_helpers %}
{% block form_instructions %}
<p>We strongly recommend that you provide a security email. This email will allow the
public to report observed or suspected security issues on your domain.
<strong>Security emails are made public.</strong> We recommend using an alias, like
security@&lt;domain.gov&gt;.</p>
{% endblock %}
{% block form_required_fields_help_text %}
{# commented out so it does not appear on this page #}
{% endblock %}
{% block form_fields %}
{% with add_label_class="usa-sr-only" %}
{% input_with_errors forms.0.security_email %}
{% endwith %}
{% endblock %}

View file

@ -2,85 +2,91 @@
{% if federal_type == 'executive' %}
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> medicare.gov </li>
<li> fema.gov </li>
<li>fema.gov</li>
<li>medicare.gov</li>
<li>usda.gov</li>
</ul>
{% elif federal_type == 'judicial' %}
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> usprobation.gov </li>
<li> ustaxcourt.gov </li>
<li>uscourts.gov</li>
<li>ustaxcourt.gov</li>
<li>ussc.gov</li>
</ul>
{% elif federal_type == 'legislative' %}
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> capitol.gov </li>
<li> gpo.gov </li>
<li>gao.gov</li>
<li>gpo.gov</li>
<li>loc.gov</li>
</ul>
{% endif %}
{% elif organization_type == 'interstate' %}
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> GulfCoastWaterAuthority.gov </li>
<li> wmataOIG.gov </li>
<li>EMScompact.gov</li>
<li>wmataOIG.gov</li>
<li>trpa.gov</li>
</ul>
{% elif organization_type == 'state_or_territory' %}
<p>State .gov domains must include the two-letter state abbreviation or clearly spell out the state name.</p>
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> UtahGovernor.gov </li>
<li> ColoradoDOT.gov </li>
<li> NJRecycling.gov </li>
<li> AmericanSamoa.gov </li>
<li> Guam.gov </li>
<li>AmericanSamoa.gov</li>
<li>Colorado.gov</li>
<li>Georgia.gov</li>
<li>AmericanSamoa.gov </li>
<li>Guam.gov</li>
</ul>
{% elif organization_type == 'tribal' %}
<p>Tribal domains may include the suffix -nsn, for native sovereign nation.</p>
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> tbyi.gov </li>
<li> pitu.gov </li>
<li> TulalipTribalCourt-nsn.gov </li>
<li>tbyi.gov</li>
<li>pitu.gov</li>
<li>TulalipTribalCourt-nsn.gov</li>
</ul>
{% elif organization_type == 'county' %}
<p>Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that arent shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the Census Bureaus National Places Gazetteer Files to determine if county names are unique.</p>
<p>Most county .gov domains must include the two-letter state abbreviation or the full state name. County names that arent shared by any other city, county, parish, town, borough, village or equivalent in the U.S., at the time a domain is granted, can be requested without referring to the state. Counties can include “county” in their domain to distinguish it from other places with similar names. We use the <a href="https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html">Census Bureaus National Places Gazetteer Files</a> to determine if county names are unique.</p>
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> AdamsCountyMS.gov </li>
<li> LivingstonParishLA.gov </li>
<li> Erie.gov </li>
<li>AdamsCountyMS.gov</li>
<li>Erie.gov</li>
<li>LivingstonParishLA.gov</li>
<li>MitchellCountyNC.gov</li>
</ul>
{% elif organization_type == 'city' %}
<p> Most city domains must include the two-letter state abbreviation or clearly spell out the state name. Using phrases like “City of” or “Town of” is optional.</p>
<p>Most city domains must include the two-letter state abbreviation or clearly spell out the state name unless city or county exceptions apply. Using phrases like “City of” or “Town of” is optional.</p>
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li>www.BlufftonIndiana.gov</li>
<li>www.CityofEudoraKS.gov</li>
<li>www.WallawallaWA.gov</li>
<li>CityofEudoraKS.gov</li>
<li>Pocatello.gov</li>
<li>WallaWallaWA.gov</li>
</ul>
<p> Some cities dont have to refer to their state.
<p>Some cities dont have to refer to their state.
<ul class="usa-list">
<li> City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the Census Bureaus National Places Gazetteer Files to determine if names are unique. </li>
<li>City names that are not shared by any other U.S. city, town, or village can be requested without referring to the state. We use the <a href="https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html">Census Bureaus National Places Gazetteer Files</a> to determine if names are unique.</li>
<li>Certain cities are so well-known that they may not require a state reference to communicate location. We use the list of U.S. “dateline cities” in the Associated Press Stylebook to make this determination.</li>
<li>The 50 largest cities, as measured by population according to the Census Bureau, can have .gov domain names that dont refer to their state.</li>
</ul>
</p>
{% elif organization_type == 'special_district' %}
<p>Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name.</p>
<p>Domain names must represent your organization or institutional name, not solely the services you provide. It also needs to include your two-letter state abbreviation or clearly spell out the state name unless <a href="{% url 'todo' %}">city or county exceptions apply</a>.</p>
<p><strong>Examples:</strong></p>
<ul class="usa-list">
<li> GlacierViewFire.gov </li>
<li> LorainCountyRecorder.gov </li>
<li> CentreCountyVotes.gov </li>
<li> WalnutValleyWater.gov </li>
<li>ElectionsShelbyTN.gov</li>
<li>GlacierViewFire.gov</li>
<li>HVcoVote.gov</li>
<li>TechshareTX.gov</li>
<li>UtahTrust.gov</li>
</ul>
{% elif organization_type == 'school_district' %}

View file

@ -1,23 +1,14 @@
{% comment %}
Commenting the code below to turn off the error because
we are showing the caution dialog instead. But saving in
case we want to revert this.
This only shows non-field errors at the top of form pages.
The individual field errors are not shown at the top of the
page, they are shown on each individual field.
{% endcomment %}
{% if form.errors %}
{% for error in form.non_field_errors %}
{% for error in form.non_field_errors %}
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2">
<div class="usa-alert__body">
{{ error|escape }}
</div>
</div>
{% endfor %}
{% for field in form %}
{% for error in field.errors %}
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2">
<div class="usa-alert__body">
{{ error|escape }}
</div>
</div>
{% endfor %}
{% endfor %}
{% endif %}
{% endcomment %}

View file

@ -9,7 +9,6 @@ from registrar.forms.application_wizard import (
OrganizationContactForm,
YourContactForm,
OtherContactsForm,
SecurityEmailForm,
RequirementsForm,
TribalGovernmentForm,
)
@ -117,19 +116,6 @@ class TestFormValidation(TestCase):
form.errors["phone"][0].startswith("Enter a valid phone number")
)
def test_security_email_form_blank(self):
"""Can leave the security_email field blank."""
form = SecurityEmailForm(data={})
self.assertEqual(len(form.errors), 0)
def test_security_email_form_invalid(self):
"""Can leave the security_email field blank."""
form = SecurityEmailForm(data={"security_email": "boss@boss"})
self.assertEqual(
form.errors["security_email"],
["Enter an email address in the required format, like name@example.com."],
)
def test_requirements_form_blank(self):
"""Requirements box unchecked is an error."""
form = RequirementsForm(data={})
@ -137,7 +123,7 @@ class TestFormValidation(TestCase):
form.errors["is_policy_acknowledged"],
[
"Check the box if you read and agree to the requirements for"
" registering and operating .gov domains."
" operating .gov domains."
],
)
@ -148,7 +134,7 @@ class TestFormValidation(TestCase):
form.errors["is_policy_acknowledged"],
[
"Check the box if you read and agree to the requirements for"
" registering and operating .gov domains."
" operating .gov domains."
],
)
@ -159,7 +145,7 @@ class TestFormValidation(TestCase):
)
self.assertTrue(
any(
"Please email registrar@dotgov.gov" in error
"tell us more about your tribe" in error
for error in form.non_field_errors()
)
)

View file

@ -47,7 +47,6 @@ class TestDomainApplication(TestCase):
requested_domain=domain,
submitter=contact,
purpose="Igorville rules!",
security_email="security@igorville.gov",
anything_else="All of Igorville loves the dotgov program.",
is_policy_acknowledged=True,
)

View file

@ -402,40 +402,13 @@ class DomainApplicationTests(TestWithUser, WebTest):
other_contacts_result = other_contacts_form.submit()
self.assertEquals(other_contacts_result.status_code, 302)
self.assertEquals(
other_contacts_result["Location"], "/register/security_email/"
)
num_pages_tested += 1
# ---- SECURITY EMAIL PAGE ----
# Follow the redirect to the next form page
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
security_email_page = other_contacts_result.follow()
security_email_form = security_email_page.form
security_email_form["security_email-security_email"] = "security@city.com"
# test saving the page
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
result = security_email_page.form.submit("submit_button", value="save")
# should remain on the same page
self.assertEquals(result["Location"], "/register/security_email/")
# should see results in db
application = DomainApplication.objects.get() # there's only one
self.assertEquals(application.security_email, "security@city.com")
# test next button
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
security_email_result = security_email_form.submit()
self.assertEquals(security_email_result.status_code, 302)
self.assertEquals(security_email_result["Location"], "/register/anything_else/")
self.assertEquals(other_contacts_result["Location"], "/register/anything_else/")
num_pages_tested += 1
# ---- ANYTHING ELSE PAGE ----
# Follow the redirect to the next form page
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
anything_else_page = security_email_result.follow()
anything_else_page = other_contacts_result.follow()
anything_else_form = anything_else_page.form
anything_else_form["anything_else-anything_else"] = "Nothing else."
@ -517,7 +490,6 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.assertContains(review_page, "Another Tester")
self.assertContains(review_page, "testy2@town.com")
self.assertContains(review_page, "(201) 555-5557")
self.assertContains(review_page, "security@city.com")
self.assertContains(review_page, "Nothing else.")
# test saving the page
@ -942,7 +914,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
# Go back to dotgov domain page to test the dynamic text changed
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
dotgov_page = election_page.click(str(self.TITLES["dotgov_domain"]), index=0)
self.assertContains(dotgov_page, "BlufftonIndiana.gov")
self.assertContains(dotgov_page, "CityofEudoraKS.gov")
self.assertNotContains(dotgov_page, "medicare.gov")
def test_application_formsets(self):
@ -1005,7 +977,6 @@ class DomainApplicationTests(TestWithUser, WebTest):
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
security_email="security@city.com",
anything_else="No",
is_policy_acknowledged=True,
organization_name="Testorg",

View file

@ -38,7 +38,6 @@ class Step(StrEnum):
YOUR_CONTACT = "your_contact"
OTHER_CONTACTS = "other_contacts"
NO_OTHER_CONTACTS = "no_other_contacts"
SECURITY_EMAIL = "security_email"
ANYTHING_ELSE = "anything_else"
REQUIREMENTS = "requirements"
REVIEW = "review"
@ -78,17 +77,14 @@ class ApplicationWizard(LoginRequiredMixin, TemplateView):
Step.ORGANIZATION_CONTACT: _("Organization name and mailing address"),
Step.TYPE_OF_WORK: _("Type of work"),
Step.AUTHORIZING_OFFICIAL: _("Authorizing official"),
Step.CURRENT_SITES: _("Organization website"),
Step.CURRENT_SITES: _("Current website for your organization"),
Step.DOTGOV_DOMAIN: _(".gov domain"),
Step.PURPOSE: _("Purpose of your domain"),
Step.YOUR_CONTACT: _("Your contact information"),
Step.OTHER_CONTACTS: _("Other employees from your organization"),
Step.NO_OTHER_CONTACTS: _("No other employees from your organization?"),
Step.SECURITY_EMAIL: _("Security email for public use"),
Step.ANYTHING_ELSE: _("Anything else we should know?"),
Step.REQUIREMENTS: _(
"Requirements for registration and operation of .gov domains"
),
Step.REQUIREMENTS: _("Requirements for operating .gov domains"),
Step.REVIEW: _("Review and submit your domain request"),
}
@ -438,11 +434,6 @@ class NoOtherContacts(ApplicationWizard):
forms = [forms.NoOtherContactsForm]
class SecurityEmail(ApplicationWizard):
template_name = "application_security_email.html"
forms = [forms.SecurityEmailForm]
class AnythingElse(ApplicationWizard):
template_name = "application_anything_else.html"
forms = [forms.AnythingElseForm]