mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
fix formset test
This commit is contained in:
parent
fbf6430b5f
commit
ea9bca94e3
1 changed files with 11 additions and 2 deletions
|
@ -967,7 +967,6 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
# Now click back to the organization type
|
# Now click back to the organization type
|
||||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
new_page = federal_page.click(str(self.TITLES["generic_org_type"]), index=0)
|
new_page = federal_page.click(str(self.TITLES["generic_org_type"]), index=0)
|
||||||
|
|
||||||
# Should be a link to the organization_federal page since it is now unlocked
|
# Should be a link to the organization_federal page since it is now unlocked
|
||||||
self.assertGreater(
|
self.assertGreater(
|
||||||
len(new_page.html.find_all("a", href="/request/1/organization_federal/")),
|
len(new_page.html.find_all("a", href="/request/1/organization_federal/")),
|
||||||
|
@ -2517,8 +2516,18 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def test_domain_request_formsets(self):
|
def test_domain_request_formsets(self):
|
||||||
"""Users are able to add more than one of some fields."""
|
"""Users are able to add more than one of some fields."""
|
||||||
current_sites_page = self.app.get(reverse("domain-request:current_sites", kwargs={"id": 0}))
|
DomainRequest.objects.all().delete()
|
||||||
|
|
||||||
|
# Create a new domain request
|
||||||
|
intro_page = self.app.get(reverse("domain-request:start"))
|
||||||
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
||||||
|
|
||||||
|
intro_form = intro_page.forms[0]
|
||||||
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
|
intro_form.submit()
|
||||||
|
|
||||||
|
# Skip to the current sites page
|
||||||
|
current_sites_page = self.app.get(reverse("domain-request:current_sites", kwargs={"id": 1}))
|
||||||
# fill in the form field
|
# fill in the form field
|
||||||
current_sites_form = current_sites_page.forms[0]
|
current_sites_form = current_sites_page.forms[0]
|
||||||
self.assertIn("current_sites-0-website", current_sites_form.fields)
|
self.assertIn("current_sites-0-website", current_sites_form.fields)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue