mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-12 15:34:50 +02:00
add subpage tests
This commit is contained in:
parent
fe8a68043f
commit
e5f26e5667
2 changed files with 18 additions and 8 deletions
|
@ -9,6 +9,9 @@ from registrar.templatetags.custom_filters import (
|
|||
find_index,
|
||||
slice_after,
|
||||
contains_checkbox,
|
||||
is_domain_request_subpage,
|
||||
is_domain_subpage,
|
||||
is_portfolio_subpage,
|
||||
)
|
||||
|
||||
|
||||
|
@ -90,3 +93,18 @@ class CustomFiltersTestCase(TestCase):
|
|||
]
|
||||
result = contains_checkbox(html_list)
|
||||
self.assertFalse(result) # Expecting False
|
||||
|
||||
def test_is_domain_subpage(self):
|
||||
"""Tests if the path is recognized as a domain subpage."""
|
||||
self.assertTrue(is_domain_subpage("/domains/"))
|
||||
self.assertFalse(is_domain_subpage("/"))
|
||||
|
||||
def test_is_domain_request_subpage(self):
|
||||
"""Tests if the path is recognized as a domain request subpage."""
|
||||
self.assertTrue(is_domain_request_subpage("/requests/"))
|
||||
self.assertFalse(is_domain_request_subpage("/"))
|
||||
|
||||
def test_is_portfolio_subpage(self):
|
||||
"""Tests if the path is recognized as a portfolio subpage."""
|
||||
self.assertTrue(is_portfolio_subpage("/organization/"))
|
||||
self.assertFalse(is_portfolio_subpage("/"))
|
||||
|
|
|
@ -96,14 +96,6 @@ class DomainRequestTests(TestWithUser, WebTest):
|
|||
self.assertContains(response, "Started on:")
|
||||
self.assertContains(response, domain_request.last_status_update.strftime("%B %-d, %Y"))
|
||||
|
||||
def test_template_new_domain_request_display(self):
|
||||
"""Tests the display of the new domain request header."""
|
||||
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.STARTED, user=self.user)
|
||||
domain_request.requested_domain = None
|
||||
domain_request.save()
|
||||
response = self.app.get(f"/domain-request/{domain_request.id}")
|
||||
self.assertContains(response, "New domain request")
|
||||
|
||||
@less_console_noise_decorator
|
||||
def test_domain_request_form_intro_is_skipped_when_edit_access(self):
|
||||
"""Tests that user is NOT presented with intro acknowledgement page when accessed through 'edit'"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue