mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 10:29:23 +02:00
Fixing tests
This commit is contained in:
parent
adb7a6ca19
commit
dc3509c7d6
1 changed files with 10 additions and 3 deletions
|
@ -1017,20 +1017,27 @@ class DomainRequestTests(TestWithUser, WebTest):
|
||||||
type_page = intro_result.follow()
|
type_page = intro_result.follow()
|
||||||
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
||||||
|
|
||||||
|
# fill out the organization type section then submit
|
||||||
type_form = type_page.forms[0]
|
type_form = type_page.forms[0]
|
||||||
type_form["generic_org_type-generic_org_type"] = "federal"
|
type_form["generic_org_type-generic_org_type"] = "federal"
|
||||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
type_result = type_form.submit()
|
type_result = type_form.submit()
|
||||||
|
|
||||||
# follow first redirect
|
# follow first redirect to the next section
|
||||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
federal_page = type_result.follow()
|
federal_page = type_result.follow()
|
||||||
|
|
||||||
# Now on federal type page, click back to the organization type
|
# we need to fill out the federal section so it stays unlocked
|
||||||
|
fed_branch_form = federal_page.forms[0]
|
||||||
|
fed_branch_form["organization_federal-federal_type"] = "executive"
|
||||||
|
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||||
|
fed_branch_form.submit()
|
||||||
|
|
||||||
|
# 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
|
# 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/organization_federal/")),
|
len(new_page.html.find_all("a", href="/request/organization_federal/")),
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue