Skip to content

Commit

Permalink
✅ [#1796] Add test for document upload description
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Oct 26, 2023
1 parent 965d142 commit 6c20e82
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/open_inwoner/openzaak/tests/test_case_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
StatusTranslationFactory,
ZaakTypeConfigFactory,
ZaakTypeInformatieObjectTypeConfigFactory,
ZaakTypeStatusTypeConfigFactory,
)
from open_inwoner.utils.test import ClearCachesMixin, paginated_response

Expand Down Expand Up @@ -388,6 +389,7 @@ def test_status_is_retrieved_when_user_logged_in_via_digid(self, m):
"initiator": "Foo Bar van der Bazz",
"result": "resultaat toelichting",
"case_type_config_description": "",
"case_type_document_upload_description": "",
"internal_upload_enabled": False,
"external_upload_enabled": False,
"external_upload_url": "",
Expand Down Expand Up @@ -592,6 +594,12 @@ def test_single_expected_information_object_type_is_available_in_upload_form(
zaaktype_uuids=[self.zaaktype["uuid"]],
document_upload_enabled=True,
)
zt_statustype_config = ZaakTypeStatusTypeConfigFactory(
zaaktype_config=zaak_type_config,
statustype_url=self.status_type_finish["url"],
zaaktype_uuids=[self.zaaktype["uuid"]],
document_upload_description="- Foo\n- bar",
)

response = self.app.get(
reverse(
Expand All @@ -607,6 +615,11 @@ def test_single_expected_information_object_type_is_available_in_upload_form(
self.assertEqual(type(type_field), Hidden)
self.assertEqual(type_field.value, str(expected_choice))

info_card = response.html.find("div", {"class": "card--info"})

self.assertIsNotNone(info_card)
self.assertEqual(info_card.text, "\n\n\ninfo\n\n\nFoo\nbar\n\n\n")

def test_expected_information_object_types_are_available_in_upload_form(self, m):
self._setUpMocks(m)

Expand Down

0 comments on commit 6c20e82

Please sign in to comment.