diff --git a/src/open_inwoner/cms/cases/tests/test_contactform.py b/src/open_inwoner/cms/cases/tests/test_contactform.py index c9e6d4e139..37d4175f69 100644 --- a/src/open_inwoner/cms/cases/tests/test_contactform.py +++ b/src/open_inwoner/cms/cases/tests/test_contactform.py @@ -149,6 +149,19 @@ def setUp(self): volgnummer=1, isEindstatus=False, ) + # no associated status (for testing `add_second_status_preview`) + self.status_type_in_behandeling = generate_oas_component( + "ztc", + "schemas/StatusType", + url=f"{CATALOGI_ROOT}statustypen/167cb935-ac8a-428e-8cca-5abda0da47c7", + zaaktype=self.zaaktype["url"], + catalogus=f"{CATALOGI_ROOT}catalogussen/1b643db-81bb-d71bd5a2317a", + omschrijving="In behandeling", + omschrijvingGeneriek="some content", + statustekst="", + volgnummer=3, + isEindstatus=False, + ) self.status_type_finish = generate_oas_component( "ztc", "schemas/StatusType", @@ -158,7 +171,7 @@ def setUp(self): omschrijving="Finish", omschrijvingGeneriek="Afgehandeld", statustekst="", - volgnummer=1, + volgnummer=4, isEindstatus=True, ) self.result = generate_oas_component( @@ -207,6 +220,7 @@ def _setUpMocks(self, m): self.result, self.zaaktype, self.status_finish, + self.status_type_in_behandeling, self.status_type_finish, ]: self.matchers.append(m.get(resource["url"], json=resource)) @@ -214,7 +228,13 @@ def _setUpMocks(self, m): # mock `fetch_status_types_no_cache` m.get( f"{CATALOGI_ROOT}statustypen?zaaktype={self.zaak['zaaktype']}", - json=paginated_response([self.status_type_new, self.status_type_finish]), + json=paginated_response( + [ + self.status_type_new, + self.status_type_in_behandeling, + self.status_type_finish, + ] + ), ) self.matchers += [ diff --git a/src/open_inwoner/components/templates/components/StatusIndicator/StatusIndicator.html b/src/open_inwoner/components/templates/components/StatusIndicator/StatusIndicator.html index 702a2f4646..e663dbe989 100644 --- a/src/open_inwoner/components/templates/components/StatusIndicator/StatusIndicator.html +++ b/src/open_inwoner/components/templates/components/StatusIndicator/StatusIndicator.html @@ -1,4 +1,5 @@ {% load icon_tags %} + {% if status_indicator_text %}
{{ title_text }}