18
18
from open_inwoner .cms .cases .views .mixins import CaseListMixin
19
19
from open_inwoner .utils .test import ClearCachesMixin , paginated_response
20
20
21
+ from ..constants import StatusIndicators
21
22
from ...utils .tests .helpers import AssertRedirectsMixin
22
- from ..models import OpenZaakConfig
23
+ from ..models import OpenZaakConfig , ZaakTypeStatusTypeConfig
23
24
from ..utils import format_zaak_identificatie
24
- from .factories import ServiceFactory , StatusTranslationFactory
25
+ from .factories import (
26
+ ServiceFactory ,
27
+ StatusTranslationFactory ,
28
+ ZaakTypeStatusTypeConfigFactory ,
29
+ )
25
30
from .shared import CATALOGI_ROOT , ZAKEN_ROOT
26
31
27
32
@@ -193,6 +198,13 @@ def setUpTestData(cls):
193
198
volgnummer = 2 ,
194
199
isEindstatus = True ,
195
200
)
201
+
202
+ cls .zt_statustype_config1 = ZaakTypeStatusTypeConfigFactory .create (
203
+ zaaktype_config__identificatie = "ZAAK-2022-0000000001" ,
204
+ statustype_url = cls .status_type1 ["url" ],
205
+ status_indicator = StatusIndicators .action_required ,
206
+ status_indicator_text = "U moet documenten toevoegen" ,
207
+ )
196
208
# open
197
209
cls .zaak1 = generate_oas_component (
198
210
"zrc" ,
@@ -331,7 +343,7 @@ def test_list_open_cases(self, m):
331
343
"identificatie" : self .zaak2 ["identificatie" ],
332
344
"description" : self .zaaktype ["omschrijving" ],
333
345
"current_status" : self .status_type1 ["omschrijving" ],
334
- "statustype_config" : None ,
346
+ "statustype_config" : self . zt_statustype_config1 ,
335
347
},
336
348
{
337
349
"uuid" : self .zaak1 ["uuid" ],
@@ -340,7 +352,7 @@ def test_list_open_cases(self, m):
340
352
"identificatie" : self .zaak1 ["identificatie" ],
341
353
"description" : self .zaaktype ["omschrijving" ],
342
354
"current_status" : self .status_type1 ["omschrijving" ],
343
- "statustype_config" : None ,
355
+ "statustype_config" : self . zt_statustype_config1 ,
344
356
},
345
357
],
346
358
)
@@ -350,6 +362,12 @@ def test_list_open_cases(self, m):
350
362
self .assertNotContains (response , self .zaak_intern ["identificatie" ])
351
363
self .assertNotContains (response , self .zaak_intern ["omschrijving" ])
352
364
365
+ zaken_cards = response .html .find_all ("div" , {"class" : "card" })
366
+
367
+ self .assertEqual (len (zaken_cards ), 2 )
368
+ self .assertTrue ("U moet documenten toevoegen" in zaken_cards [0 ].text )
369
+ self .assertTrue ("U moet documenten toevoegen" in zaken_cards [1 ].text )
370
+
353
371
# check zaken request query parameters
354
372
list_zaken_req = [
355
373
req
0 commit comments