Mr/text updates (#444)

* Updated error message text

* Updated field labels, intro text

* Tidy up thank you page

* Removed reference to managing a domain

* Update test language to match form language

* Fix linting error (hopefully)

* Fix linting and tests

---------

Co-authored-by: Neil Martinsen-Burrell <neil.martinsen-burrell@gsa.gov>
This commit is contained in:
Michelle Rago 2023-03-08 12:09:13 -05:00 committed by GitHub
parent 96c73471e4
commit 3cd3869c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 14 deletions

View file

@ -29,7 +29,13 @@ class TestFormValidation(TestCase):
def test_website_invalid(self):
form = CurrentSitesForm(data={"website": "nah"})
self.assertEqual(form.errors["website"], ["Enter a valid URL."])
self.assertEqual(
form.errors["website"],
[
"Enter your organization's"
" website in the required format, like www.city.com."
],
)
def test_website_valid(self):
form = CurrentSitesForm(data={"website": "hyphens-rule.gov.uk"})
@ -83,7 +89,7 @@ class TestFormValidation(TestCase):
"""Must be a valid phone number."""
form = AuthorizingOfficialForm(data={"phone": "boss@boss"})
self.assertTrue(
form.errors["phone"][0].startswith("Enter a valid phone number")
form.errors["phone"][0].startswith("Enter a valid phone number ")
)
def test_your_contact_email_invalid(self):
@ -98,7 +104,7 @@ class TestFormValidation(TestCase):
"""Must be a valid phone number."""
form = YourContactForm(data={"phone": "boss@boss"})
self.assertTrue(
form.errors["phone"][0].startswith("Enter a valid phone number")
form.errors["phone"][0].startswith("Enter a valid phone number ")
)
def test_other_contact_email_invalid(self):
@ -113,7 +119,7 @@ class TestFormValidation(TestCase):
"""Must be a valid phone number."""
form = OtherContactsForm(data={"phone": "boss@boss"})
self.assertTrue(
form.errors["phone"][0].startswith("Enter a valid phone number")
form.errors["phone"][0].startswith("Enter a valid phone number ")
)
def test_requirements_form_blank(self):