Merge branch 'main' into za/1998-add-table-descriptions

This commit is contained in:
zandercymatics 2024-04-26 12:22:42 -06:00
commit 4d1db96517
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
25 changed files with 1132 additions and 333 deletions

View file

@ -930,6 +930,28 @@ class TestDomainRequestAdmin(MockEppLib):
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
@less_console_noise_decorator
def test_collaspe_toggle_button_markup(self):
"""
Tests for the correct collapse toggle button markup
"""
# Create a fake domain request and domain
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.IN_REVIEW)
p = "adminpass"
self.client.login(username="superuser", password=p)
response = self.client.get(
"/admin/registrar/domainrequest/{}/change/".format(domain_request.pk),
follow=True,
)
# Make sure the page loaded, and that we're on the right page
self.assertEqual(response.status_code, 200)
self.assertContains(response, domain_request.requested_domain.name)
self.test_helper.assertContains(response, "<span>Show details</span>")
@less_console_noise_decorator
def test_analyst_can_see_and_edit_alternative_domain(self):
"""Tests if an analyst can still see and edit the alternative domain field"""
@ -2037,6 +2059,9 @@ class TestDomainRequestAdmin(MockEppLib):
"purpose",
"no_other_contacts_rationale",
"anything_else",
"has_anything_else_text",
"cisa_representative_email",
"has_cisa_representative",
"is_policy_acknowledged",
"submission_date",
"notes",
@ -2068,6 +2093,7 @@ class TestDomainRequestAdmin(MockEppLib):
"no_other_contacts_rationale",
"anything_else",
"is_policy_acknowledged",
"cisa_representative_email",
]
self.assertEqual(readonly_fields, expected_fields)