From 2c1409bc42a6b39bfce4683a5ead643142c9d34b Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Thu, 12 Dec 2024 17:13:18 +0100 Subject: [PATCH] :white_check_mark: [#2177] Fixing/updating tests --- .../tests/files/all_components_data.json | 66 +-- .../tests/files/kitchensink_data.json | 42 +- .../files/kitchensink_data_with_hidden.json | 182 +++------ .../formatters/tests/test_kitchensink.py | 4 +- .../tests/files/all_components_data.json | 56 +-- .../camunda/tests/test_type_mapping.py | 36 +- ...objects_api_backend_override_defaults.yaml | 79 ++-- .../objects_api/tests/test_backend_v1.py | 18 +- .../objects_api/tests/test_backend_v2.py | 18 +- .../tests/test_update_payment_status_v2.py | 9 +- .../contrib/stuf_zds/tests/test_backend.py | 381 +++++++++++++++++- .../contrib/zgw_apis/tests/test_backend.py | 66 ++- .../tests/test_backend_partial_failure.py | 9 +- .../tests/test_submission_report.py | 9 +- .../tests/e2e/test_input_validation.py | 2 + 15 files changed, 699 insertions(+), 278 deletions(-) diff --git a/src/openforms/formio/formatters/tests/files/all_components_data.json b/src/openforms/formio/formatters/tests/files/all_components_data.json index 8e6a45a192..b56b7f6a98 100644 --- a/src/openforms/formio/formatters/tests/files/all_components_data.json +++ b/src/openforms/formio/formatters/tests/files/all_components_data.json @@ -1,34 +1,38 @@ { - "bsn": "123456782", - "map": [ - 52.3782943985417, - 4.899629917973432 - ], - "date": "2021-12-24", - "dateTime": "2023-01-18T16:00:00+01:00", - "file": [], - "iban": "RO09 BCYP 0000 0012 3456 7890", - "time": "16:26:00", - "email": "test@example.com", - "radio": "option2", - "number": 42.123, - "select": "option1", - "postcode": "1234 AA", - "textArea": "Textarea test", - "signature": "data:image/png;base64,iVBO[truncated]", - "textField": "Simple text input", - "phoneNumber": "+31633924456", - "selectBoxes": { - "option1": true, - "option2": true - }, - "licenseplate": "1-AAA-BB", - "select2": "2021-12-29", - "select3": "2021-12-29T08:15:00+01:00", - "addressNL": { - "postcode": "1234AA", - "houseNumber": "1", - "houseLetter": "", - "houseNumberAddition": "" + "bsn": "123456782", + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.3782943985417, 4.899629917973432] } + }, + "date": "2021-12-24", + "dateTime": "2023-01-18T16:00:00+01:00", + "file": [], + "iban": "RO09 BCYP 0000 0012 3456 7890", + "time": "16:26:00", + "email": "test@example.com", + "radio": "option2", + "number": 42.123, + "select": "option1", + "postcode": "1234 AA", + "textArea": "Textarea test", + "signature": "data:image/png;base64,iVBO[truncated]", + "textField": "Simple text input", + "phoneNumber": "+31633924456", + "selectBoxes": { + "option1": true, + "option2": true + }, + "licenseplate": "1-AAA-BB", + "select2": "2021-12-29", + "select3": "2021-12-29T08:15:00+01:00", + "addressNL": { + "postcode": "1234AA", + "houseNumber": "1", + "houseLetter": "", + "houseNumberAddition": "" + } } diff --git a/src/openforms/formio/formatters/tests/files/kitchensink_data.json b/src/openforms/formio/formatters/tests/files/kitchensink_data.json index fe13b28360..ffbde10b0f 100644 --- a/src/openforms/formio/formatters/tests/files/kitchensink_data.json +++ b/src/openforms/formio/formatters/tests/files/kitchensink_data.json @@ -132,18 +132,36 @@ null ], "licenseplate": "aa-bb-12", - "map": [ - 52.373087283242505, - 4.8923054658521945 - ], - "mapEmpty": [ - 52.379648, - 4.9020928 - ], - "mapHidden": [ - 52.379648, - 4.9020928 - ], + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.373087283242505, 4.8923054658521945] + } + }, + "mapEmpty": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 52.379648, + 4.9020928 + ] + } + }, + "mapHidden": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 52.379648, + 4.9020928 + ] + } + }, "number": 1234, "numberDecimal": 1234.56, "numberDecimalMulti": [ diff --git a/src/openforms/formio/formatters/tests/files/kitchensink_data_with_hidden.json b/src/openforms/formio/formatters/tests/files/kitchensink_data_with_hidden.json index ad31fcca72..666909aeb7 100644 --- a/src/openforms/formio/formatters/tests/files/kitchensink_data_with_hidden.json +++ b/src/openforms/formio/formatters/tests/files/kitchensink_data_with_hidden.json @@ -2,13 +2,8 @@ "bsn": "111222333", "bsnEmpty": "", "bsnHidden": "111222333", - "bsnMulti": [ - "111222333", - "123456782" - ], - "bsnMultiEmpty": [ - null - ], + "bsnMulti": ["111222333", "123456782"], + "bsnMultiEmpty": [null], "checkbox": true, "checkboxDefault": true, "checkboxEmpty": false, @@ -17,30 +12,14 @@ "currencyHidden": 123, "currencyDecimal": 1234.56, "currencyDecimalHidden": 123.45, - "currencyDecimalMulti": [ - 1234.56, - 1, - 0 - ], - "currencyMulti": [ - 1234.56, - 1, - 0 - ], - "currencyMultiEmpty": [ - null - ], + "currencyDecimalMulti": [1234.56, 1, 0], + "currencyMulti": [1234.56, 1, 0], + "currencyMultiEmpty": [null], "date": "2022-02-14", "dateEmpty": "", "dateHidden": "2022-02-14", - "dateMulti": [ - "2022-02-14", - "2022-02-15", - "2022-02-16" - ], - "dateMultiEmpty": [ - "" - ], + "dateMulti": ["2022-02-14", "2022-02-15", "2022-02-16"], + "dateMultiEmpty": [""], "dateTime": "2023-01-18T16:00:00+01:00", "dateTimeEmpty": "", "dateTimeHidden": "2023-01-18T16:00:00+01:00", @@ -49,23 +28,13 @@ "2023-01-19T17:00:00+01:00", "2023-01-20T18:00:00+01:00" ], - "dateTimeMultipleEmpty": [ - "" - ], + "dateTimeMultipleEmpty": [""], "email": "test@example.com", "emailEmpty": "", "emailHidden": "test@example.com", - "emailMulti": [ - "aaa@aaa.nl", - "bbb@bbb.nl" - ], - "emailMultiDefault": [ - "aaa@aaa.nl", - "bbb@bbb.nl" - ], - "emailMultiEmpty": [ - null - ], + "emailMulti": ["aaa@aaa.nl", "bbb@bbb.nl"], + "emailMultiDefault": ["aaa@aaa.nl", "bbb@bbb.nl"], + "emailMultiEmpty": [null], "file": [ { "data": { @@ -124,75 +93,53 @@ "iban": "NL02ABNA0123456789", "ibanEmpty": "", "ibanHidden": "NL02ABNA0123456789", - "ibanMulti": [ - "NL02ABNA0123456789", - "BE71096123456769" - ], - "ibanMultiEmpty": [ - null - ], + "ibanMulti": ["NL02ABNA0123456789", "BE71096123456769"], + "ibanMultiEmpty": [null], "licensePlateEmpty": "", "licensePlateHidden": "aa-bb-12", - "licensePlateMulti": [ - "aa-bb-12", - "1-aaa-12", - "12-aa-34" - ], - "licensePlateMultiEmpty": [ - null - ], + "licensePlateMulti": ["aa-bb-12", "1-aaa-12", "12-aa-34"], + "licensePlateMultiEmpty": [null], "licenseplate": "aa-bb-12", - "map": [ - 52.373087283242505, - 4.8923054658521945 - ], - "mapEmpty": [ - 52.379648, - 4.9020928 - ], - "mapHidden": [ - 52.379648, - 4.9020928 - ], + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.373087283242505, 4.8923054658521945] + } + }, + "mapEmpty": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.379648, 4.9020928] + } + }, + "mapHidden": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.379648, 4.9020928] + } + }, "number": 1234, "numberHidden": 1234, "numberDecimal": 1234.56, - "numberDecimalMulti": [ - 1234.56, - 100, - 12.3, - 1, - 0 - ], - "numberMulti": [ - 123123123, - 123, - 1, - 0 - ], - "numberMultiEmpty": [ - null - ], + "numberDecimalMulti": [1234.56, 100, 12.3, 1, 0], + "numberMulti": [123123123, 123, 1, 0], + "numberMultiEmpty": [null], "phoneNumber": "0123456789", "phoneNumberEmpty": "", "phoneNumberHidden": "0123456789", - "phoneNumberMulti": [ - "0123456789", - "0123456780" - ], - "phoneNumberMultiEmpty": [ - null - ], + "phoneNumberMulti": ["0123456789", "0123456780"], + "phoneNumberMultiEmpty": [null], "postcode": "1234 ab", "postcodeEmpty": "", "postcodeHidden": "1234 ab", - "postcodeMulti": [ - "1234 ab", - "4321 ba" - ], - "postcodeMultiEmpty": [ - null - ], + "postcodeMulti": ["1234 ab", "4321 ba"], + "postcodeMultiEmpty": [null], "radio": "aaa", "radioEmpty": "", "radioHidden": "aaa", @@ -212,10 +159,7 @@ }, "selectEmpty": "", "selectHidden": "aaa", - "selectMulti": [ - "aaa", - "bbb" - ], + "selectMulti": ["aaa", "bbb"], "selectMultiEmpty": [], "signature": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApsAAACWCAYAAACRk0OTAAAcKklEQVR4Xu3dDXCV1Z3H8T8otSslYRbsjLzcVOxWeV1HOpQAYVfa3SaUrOg6BQZ8mXabdAvilpHw3nEKpBK7247ALEl1FSbUMNUpLmhwqqhEEu0sdhY0iG9rwsLs+LYkiFsV6N7/cz2XJzcv3Nx7n/u8nO8zk5GX+5zznM95ML+c5zznDDhz5r0/CQcCCCCAAAIIIIAAAh4IDCBseqBKkQgggAACCCCAAAKOAGGTGwEBBBBAAAEEEEDAMwHCpme0FIwAAggggAACCCBA2OQeQAABBBBAAAEEEPBMgLDpGS0FI4AAAggggAACCBA2uQcQQAABBBBAAAEEPBMgbHpGS8EIIIAAAggggAAChE3uAQQQQAABBBBAAAHPBAibntFSMAIIIIAAAggggABhk3sAAQQQQAABBBBAwDMBwqZntBSMAAL5EDh8+IgUFhZKUVEsH9VRBwIIIIBAPwUIm/0E4+MIIOC9wKlTHfLEE43S1nZcDh9+RTo6Opxft7W1d6l84MABcv78n5J/NnRooZSUTJdJkyY4XwUFBfEQOto5d8CAAclyhg4tkFgsFg+pQ+Kfm+h9g6gBAQQQsFiAsGlx59N0BIIioCHymWeelWPH3pADBw46ATNfx+WX/5ncfPNcWbhwnsycOT1f1VIPAgggYI0AYdOarqahCARLwIxe1tc3OAEzCIeOhi5ZUikzZkzjsXwQOoRrQACBSAgQNiPRjTQCgXAJ6DzL+fPv6PZYPLUVJSXTnMfd+ihc52VqGDSH+bP29nY5dapT9L86IqpfTU3NWYOMG3et3HHHrTJnTinBM2tNCkAAAZsFCJs29z5tR8AHgYceqpdVq9b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LOppmIoAAAggggAACfggQNv1Qp04EEEAAAQQQQMASAcKmJR1NMxFAAAEEEEAAAT8E/h+IciF0b8AdrwAAAABJRU5ErkJggg==", "signatureEmpty": "", @@ -223,35 +167,17 @@ "textArea": "text with newline\ntext with blank line\n\ntext with newline\ntext with double blank line\n\n\ntext with newline\n", "textAreaEmpty": "", "textAreaHidden": "line 1\n\nline 2\n", - "textAreaMulti": [ - "text no newline", - "single line with newline\n" - ], - "textAreaMultiEmpty": [ - "" - ], + "textAreaMulti": ["text no newline", "single line with newline\n"], + "textAreaMultiEmpty": [""], "textField": "lower case text", "textFieldEmpty": "", "textFieldHidden": "lower case text", - "textFieldMulti": [ - "lower case text", - "Upper Case Text" - ], - "textFieldMultiDefault": [ - "aaa", - "bbb" - ], - "textFieldMultiEmpty": [ - null - ], + "textFieldMulti": ["lower case text", "Upper Case Text"], + "textFieldMultiDefault": ["aaa", "bbb"], + "textFieldMultiEmpty": [null], "time": "12:34:00", "timeEmpty": "", "timeHidden": "12:34:00", - "timeMulti": [ - "12:34:00", - "21:43:00" - ], - "timeMultiEmpty": [ - null - ] + "timeMulti": ["12:34:00", "21:43:00"], + "timeMultiEmpty": [null] } diff --git a/src/openforms/formio/formatters/tests/test_kitchensink.py b/src/openforms/formio/formatters/tests/test_kitchensink.py index 02ddf5b90f..7d521768a7 100644 --- a/src/openforms/formio/formatters/tests/test_kitchensink.py +++ b/src/openforms/formio/formatters/tests/test_kitchensink.py @@ -49,8 +49,8 @@ def run_kitchensink_test(self, name_data, name_printable): # empty map should send no coordinates # TODO update data fixture when #1346 is fixed - data["mapEmpty"] = [] - data["mapHidden"] = [] + data["mapEmpty"] = {} + data["mapHidden"] = {} # translated string assert "Signature" in text_printed diff --git a/src/openforms/registrations/contrib/camunda/tests/files/all_components_data.json b/src/openforms/registrations/contrib/camunda/tests/files/all_components_data.json index a147ee336b..0c898295d9 100644 --- a/src/openforms/registrations/contrib/camunda/tests/files/all_components_data.json +++ b/src/openforms/registrations/contrib/camunda/tests/files/all_components_data.json @@ -1,28 +1,32 @@ { - "bsn": "123456782", - "map": [ - 52.3782943985417, - 4.899629917973432 - ], - "date": "2021-12-24", - "file": [], - "iban": "RO09 BCYP 0000 0012 3456 7890", - "time": "16:26:00", - "email": "test@example.com", - "radio": "option2", - "number": 42.123, - "select": "option1", - "password": "secret", - "postcode": "1234 AA", - "textArea": "Textarea test", - "signature": "data:image/png;base64,iVBO[truncated]", - "textField": "Simple text input", - "phoneNumber": "+31633924456", - "selectBoxes": { - "option1": true, - "option2": true - }, - "licenseplate": "1-AAA-BB", - "select2": "2021-12-29", - "select3": "2021-12-29T08:15:00+01:00" + "bsn": "123456782", + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.3782943985417, 4.899629917973432] + } + }, + "date": "2021-12-24", + "file": [], + "iban": "RO09 BCYP 0000 0012 3456 7890", + "time": "16:26:00", + "email": "test@example.com", + "radio": "option2", + "number": 42.123, + "select": "option1", + "password": "secret", + "postcode": "1234 AA", + "textArea": "Textarea test", + "signature": "data:image/png;base64,iVBO[truncated]", + "textField": "Simple text input", + "phoneNumber": "+31633924456", + "selectBoxes": { + "option1": true, + "option2": true + }, + "licenseplate": "1-AAA-BB", + "select2": "2021-12-29", + "select3": "2021-12-29T08:15:00+01:00" } diff --git a/src/openforms/registrations/contrib/camunda/tests/test_type_mapping.py b/src/openforms/registrations/contrib/camunda/tests/test_type_mapping.py index 148668ce15..b38060bc1c 100644 --- a/src/openforms/registrations/contrib/camunda/tests/test_type_mapping.py +++ b/src/openforms/registrations/contrib/camunda/tests/test_type_mapping.py @@ -152,9 +152,30 @@ def test_kitchensink_types(self): "licensePlateMulti": ["aa-bb-12", "1-aaa-12", "12-aa-34"], "licensePlateMultiEmpty": [None], "licenseplate": "aa-bb-12", - "map": [52.373087283242505, 4.8923054658521945], - "mapEmpty": [52.379648, 4.9020928], - "mapHidden": [52.379648, 4.9020928], + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.373087283242505, 4.8923054658521945], + }, + }, + "mapEmpty": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.379648, 4.9020928], + }, + }, + "mapHidden": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.379648, 4.9020928], + }, + }, "number": 1234, "numberEmpty": None, "numberHidden": 1234, @@ -238,7 +259,14 @@ def test_all_types(self): data = load_json("all_components_data.json") expected = { "bsn": "123456782", - "map": [52.3782943985417, 4.899629917973432], + "map": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.3782943985417, 4.899629917973432], + }, + }, "date": date(2021, 12, 24), "file": [], "iban": "RO09 BCYP 0000 0012 3456 7890", diff --git a/src/openforms/registrations/contrib/objects_api/tests/files/vcr_cassettes/ObjectsAPIBackendV1Tests/ObjectsAPIBackendV1Tests.test_submission_with_objects_api_backend_override_defaults.yaml b/src/openforms/registrations/contrib/objects_api/tests/files/vcr_cassettes/ObjectsAPIBackendV1Tests/ObjectsAPIBackendV1Tests.test_submission_with_objects_api_backend_override_defaults.yaml index 4c2dc15fb0..3c9256f563 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/files/vcr_cassettes/ObjectsAPIBackendV1Tests/ObjectsAPIBackendV1Tests.test_submission_with_objects_api_backend_override_defaults.yaml +++ b/src/openforms/registrations/contrib/objects_api/tests/files/vcr_cassettes/ObjectsAPIBackendV1Tests/ObjectsAPIBackendV1Tests.test_submission_with_objects_api_backend_override_defaults.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"informatieobjecttype": "http://localhost:8003/catalogi/api/v1/informatieobjecttypen/f2908f6f-aa07-42ef-8760-74c5234f2d25", - "bronorganisatie": "123456782", "creatiedatum": "2024-12-19", "titel": "Form + "bronorganisatie": "123456782", "creatiedatum": "2024-12-12", "titel": "Form 000", "auteur": "Aanvrager", "taal": "eng", "formaat": "application/pdf", "inhoud": "", "status": "definitief", "bestandsnaam": "open-forms-Form 000.pdf", "ontvangstdatum": null, "beschrijving": "Ingezonden formulier", "indicatieGebruiksrecht": false, @@ -12,7 +12,7 @@ interactions: Accept-Encoding: - gzip, deflate, br Authorization: - - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDYwMjkxOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.00_dWmh224upScM1cNgx9w91Hlyong-KQOJSRwNwUFw + - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDAxOTEzOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.hTAC2iR-Xnm8yBZEceMQKWDxNay_4LmiradlljF_KNs Connection: - keep-alive Content-Length: @@ -25,9 +25,9 @@ interactions: uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten response: body: - string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705","identificatie":"DOCUMENT-2024-0000000017","bronorganisatie":"123456782","creatiedatum":"2024-12-19","titel":"Form - 000","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"application/pdf","taal":"eng","versie":1,"beginRegistratie":"2024-12-19T10:08:39.708635Z","bestandsnaam":"open-forms-Form - 000.pdf","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705/download?versie=1","bestandsomvang":0,"link":"","beschrijving":"Ingezonden + string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7","identificatie":"DOCUMENT-2024-0000000008","bronorganisatie":"123456782","creatiedatum":"2024-12-12","titel":"Form + 000","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"application/pdf","taal":"eng","versie":1,"beginRegistratie":"2024-12-12T15:58:59.156802Z","bestandsnaam":"open-forms-Form + 000.pdf","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7/download?versie=1","bestandsomvang":0,"link":"","beschrijving":"Ingezonden formulier","ontvangstdatum":null,"verzenddatum":null,"indicatieGebruiksrecht":false,"verschijningsvorm":"","ondertekening":{"soort":"","datum":null},"integriteit":{"algoritme":"","waarde":"","datum":null},"informatieobjecttype":"http://localhost:8003/catalogi/api/v1/informatieobjecttypen/f2908f6f-aa07-42ef-8760-74c5234f2d25","locked":false,"bestandsdelen":[],"trefwoorden":[],"lock":""}' headers: API-version: @@ -41,7 +41,7 @@ interactions: Cross-Origin-Opener-Policy: - same-origin Location: - - http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705 + - http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7 Referrer-Policy: - same-origin Vary: @@ -55,23 +55,23 @@ interactions: message: Created - request: body: '{"informatieobjecttype": "http://localhost:8003/catalogi/api/v1/informatieobjecttypen/d1cfb1d8-8593-4814-919d-72e38e80388f", - "bronorganisatie": "123456782", "creatiedatum": "2024-12-19", "titel": "Form + "bronorganisatie": "123456782", "creatiedatum": "2024-12-12", "titel": "Form 000 (csv)", "auteur": "Aanvrager", "taal": "eng", "formaat": "text/csv", "inhoud": - "Rm9ybXVsaWVybmFhbSxJbnplbmRpbmdkYXR1bSxUYWFsY29kZSx2b29ybmFhbSxhY2h0ZXJuYWFtLHR1c3NlbnZvZWdzZWwsZ2Vib29ydGVkYXR1bSxjb29yZGluYWF0DQpGb3JtIDAwMCwsZW4sRm9vLEJhcixkZSwyMDAwLTEyLTMxLCJbNTIuMzY2NzMzNzg5NjcxMjIsIDQuODkzMTY0Mjc0NDcwMjk5XSINCg==", + "Rm9ybXVsaWVybmFhbSxJbnplbmRpbmdkYXR1bSxUYWFsY29kZSx2b29ybmFhbSxhY2h0ZXJuYWFtLHR1c3NlbnZvZWdzZWwsZ2Vib29ydGVkYXR1bSxjb29yZGluYWF0DQpGb3JtIDAwMCwsZW4sRm9vLEJhcixkZSwyMDAwLTEyLTMxLCJ7J3R5cGUnOiAnRmVhdHVyZScsICdnZW9tZXRyeSc6IHsndHlwZSc6ICdQb2ludCcsICdjb29yZGluYXRlcyc6IFs0Ljg5MzE2NDI3NDQ3MDI5OSwgNTIuMzY2NzMzNzg5NjcxMjJdfSwgJ3Byb3BlcnRpZXMnOiB7fX0iDQo=", "status": "definitief", "bestandsnaam": "open-forms-Form 000 (csv).csv", "ontvangstdatum": null, "beschrijving": "Ingezonden formulierdata", "indicatieGebruiksrecht": - false, "bestandsomvang": 175}' + false, "bestandsomvang": 260}' headers: Accept: - '*/*' Accept-Encoding: - gzip, deflate, br Authorization: - - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDYwMjkxOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.00_dWmh224upScM1cNgx9w91Hlyong-KQOJSRwNwUFw + - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDAxOTEzOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.hTAC2iR-Xnm8yBZEceMQKWDxNay_4LmiradlljF_KNs Connection: - keep-alive Content-Length: - - '721' + - '833' Content-Type: - application/json User-Agent: @@ -80,9 +80,9 @@ interactions: uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten response: body: - string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb","identificatie":"DOCUMENT-2024-0000000018","bronorganisatie":"123456782","creatiedatum":"2024-12-19","titel":"Form - 000 (csv)","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"text/csv","taal":"eng","versie":1,"beginRegistratie":"2024-12-19T10:08:39.853537Z","bestandsnaam":"open-forms-Form - 000 (csv).csv","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb/download?versie=1","bestandsomvang":175,"link":"","beschrijving":"Ingezonden + string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4","identificatie":"DOCUMENT-2024-0000000009","bronorganisatie":"123456782","creatiedatum":"2024-12-12","titel":"Form + 000 (csv)","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"text/csv","taal":"eng","versie":1,"beginRegistratie":"2024-12-12T15:58:59.280462Z","bestandsnaam":"open-forms-Form + 000 (csv).csv","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4/download?versie=1","bestandsomvang":260,"link":"","beschrijving":"Ingezonden formulierdata","ontvangstdatum":null,"verzenddatum":null,"indicatieGebruiksrecht":false,"verschijningsvorm":"","ondertekening":{"soort":"","datum":null},"integriteit":{"algoritme":"","waarde":"","datum":null},"informatieobjecttype":"http://localhost:8003/catalogi/api/v1/informatieobjecttypen/d1cfb1d8-8593-4814-919d-72e38e80388f","locked":false,"bestandsdelen":[],"trefwoorden":[],"lock":""}' headers: API-version: @@ -96,7 +96,7 @@ interactions: Cross-Origin-Opener-Policy: - same-origin Location: - - http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb + - http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4 Referrer-Policy: - same-origin Vary: @@ -139,7 +139,7 @@ interactions: Cross-Origin-Opener-Policy: - same-origin Date: - - Thu, 19 Dec 2024 10:08:39 GMT + - Thu, 12 Dec 2024 15:58:59 GMT Referrer-Policy: - same-origin Server: @@ -158,12 +158,13 @@ interactions: "record": {"typeVersion": 1, "data": {"bron": {"naam": "Open Formulieren", "kenmerk": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}, "type": "testproduct", "aanvraaggegevens": {"test-slug": {"voornaam": "Foo", "achternaam": "Bar", "tussenvoegsel": "de", - "geboortedatum": "2000-12-31", "coordinaat": [52.36673378967122, 4.893164274470299]}}, - "taal": "en", "betrokkenen": [{"inpBsn": "", "rolOmschrijvingGeneriek": "initiator"}], - "pdf": "http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705", - "csv": "http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb", + "geboortedatum": "2000-12-31", "coordinaat": {"type": "Feature", "geometry": + {"type": "Point", "coordinates": [4.893164274470299, 52.36673378967122]}, "properties": + {}}}}, "taal": "en", "betrokkenen": [{"inpBsn": "", "rolOmschrijvingGeneriek": + "initiator"}], "pdf": "http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7", + "csv": "http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4", "bijlagen": [], "payment": {"completed": false, "amount": 0, "public_order_ids": - [], "payment_ids": []}}, "startAt": "2024-12-19", "geometry": {"type": "Point", + [], "payment_ids": []}}, "startAt": "2024-12-12", "geometry": {"type": "Point", "coordinates": [4.893164274470299, 52.36673378967122]}}}' headers: Accept: @@ -177,7 +178,7 @@ interactions: Content-Crs: - EPSG:4326 Content-Length: - - '969' + - '1054' Content-Type: - application/json User-Agent: @@ -186,8 +187,8 @@ interactions: uri: http://localhost:8002/api/v2/objects response: body: - string: '{"url":"http://objects-web:8000/api/v2/objects/fc9304ce-c572-45e4-ba11-f0f7a45c592d","uuid":"fc9304ce-c572-45e4-ba11-f0f7a45c592d","type":"http://objecttypes-web:8000/api/v2/objecttypes/8faed0fa-7864-4409-aa6d-533a37616a9e","record":{"index":1,"typeVersion":1,"data":{"bron":{"naam":"Open - Formulieren","kenmerk":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},"type":"testproduct","aanvraaggegevens":{"test-slug":{"voornaam":"Foo","achternaam":"Bar","tussenvoegsel":"de","geboortedatum":"2000-12-31","coordinaat":[52.36673378967122,4.893164274470299]}},"taal":"en","betrokkenen":[{"inpBsn":"","rolOmschrijvingGeneriek":"initiator"}],"pdf":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705","csv":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb","bijlagen":[],"payment":{"completed":false,"amount":0,"public_order_ids":[],"payment_ids":[]}},"geometry":{"type":"Point","coordinates":[4.893164274470299,52.36673378967122]},"startAt":"2024-12-19","endAt":null,"registrationAt":"2024-12-19","correctionFor":null,"correctedBy":null}}' + string: '{"url":"http://objects-web:8000/api/v2/objects/260333c8-b0c0-457c-8e2b-10ed1cbe60b8","uuid":"260333c8-b0c0-457c-8e2b-10ed1cbe60b8","type":"http://objecttypes-web:8000/api/v2/objecttypes/8faed0fa-7864-4409-aa6d-533a37616a9e","record":{"index":1,"typeVersion":1,"data":{"bron":{"naam":"Open + Formulieren","kenmerk":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"},"type":"testproduct","aanvraaggegevens":{"test-slug":{"voornaam":"Foo","achternaam":"Bar","tussenvoegsel":"de","geboortedatum":"2000-12-31","coordinaat":{"type":"Feature","geometry":{"type":"Point","coordinates":[4.893164274470299,52.36673378967122]},"properties":{}}}},"taal":"en","betrokkenen":[{"inpBsn":"","rolOmschrijvingGeneriek":"initiator"}],"pdf":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7","csv":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4","bijlagen":[],"payment":{"completed":false,"amount":0,"public_order_ids":[],"payment_ids":[]}},"geometry":{"type":"Point","coordinates":[4.893164274470299,52.36673378967122]},"startAt":"2024-12-12","endAt":null,"registrationAt":"2024-12-12","correctionFor":null,"correctedBy":null}}' headers: Allow: - GET, POST, HEAD, OPTIONS @@ -196,15 +197,15 @@ interactions: Content-Crs: - EPSG:4326 Content-Length: - - '1137' + - '1214' Content-Type: - application/json Cross-Origin-Opener-Policy: - same-origin Date: - - Thu, 19 Dec 2024 10:08:40 GMT + - Thu, 12 Dec 2024 15:58:59 GMT Location: - - http://localhost:8002/api/v2/objects/fc9304ce-c572-45e4-ba11-f0f7a45c592d + - http://localhost:8002/api/v2/objects/260333c8-b0c0-457c-8e2b-10ed1cbe60b8 Referrer-Policy: - same-origin Server: @@ -226,18 +227,18 @@ interactions: Accept-Encoding: - gzip, deflate, br Authorization: - - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDYwMjkyMCwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.lw4EsPswHow8ne6BS3ZT2oNzNN722iFw3rlvWlqCVao + - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDAxOTEzOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.hTAC2iR-Xnm8yBZEceMQKWDxNay_4LmiradlljF_KNs Connection: - keep-alive User-Agent: - python-requests/2.32.2 method: GET - uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb + uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4 response: body: - string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb","identificatie":"DOCUMENT-2024-0000000018","bronorganisatie":"123456782","creatiedatum":"2024-12-19","titel":"Form - 000 (csv)","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"text/csv","taal":"eng","versie":1,"beginRegistratie":"2024-12-19T10:08:39.853537Z","bestandsnaam":"open-forms-Form - 000 (csv).csv","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/f15953ce-b719-4680-9ee9-f3ae1d183bbb/download?versie=1","bestandsomvang":175,"link":"","beschrijving":"Ingezonden + string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4","identificatie":"DOCUMENT-2024-0000000009","bronorganisatie":"123456782","creatiedatum":"2024-12-12","titel":"Form + 000 (csv)","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"text/csv","taal":"eng","versie":1,"beginRegistratie":"2024-12-12T15:58:59.280462Z","bestandsnaam":"open-forms-Form + 000 (csv).csv","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/a0d70e27-5fbb-4869-a500-f96c410742b4/download?versie=1","bestandsomvang":260,"link":"","beschrijving":"Ingezonden formulierdata","ontvangstdatum":null,"verzenddatum":null,"indicatieGebruiksrecht":false,"verschijningsvorm":"","ondertekening":{"soort":"","datum":null},"integriteit":{"algoritme":"","waarde":"","datum":null},"informatieobjecttype":"http://localhost:8003/catalogi/api/v1/informatieobjecttypen/d1cfb1d8-8593-4814-919d-72e38e80388f","locked":false,"bestandsdelen":[],"trefwoorden":[]}' headers: API-version: @@ -251,7 +252,7 @@ interactions: Cross-Origin-Opener-Policy: - same-origin ETag: - - '"68609009f1bc10a90f57829486c62768"' + - '"635d50f9fcffe663889e6c84005b5451"' Referrer-Policy: - same-origin Vary: @@ -271,18 +272,18 @@ interactions: Accept-Encoding: - gzip, deflate, br Authorization: - - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDYwMjkyMCwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.lw4EsPswHow8ne6BS3ZT2oNzNN722iFw3rlvWlqCVao + - Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0ZXN0X2NsaWVudF9pZCIsImlhdCI6MTczNDAxOTEzOSwiY2xpZW50X2lkIjoidGVzdF9jbGllbnRfaWQiLCJ1c2VyX2lkIjoiIiwidXNlcl9yZXByZXNlbnRhdGlvbiI6IiJ9.hTAC2iR-Xnm8yBZEceMQKWDxNay_4LmiradlljF_KNs Connection: - keep-alive User-Agent: - python-requests/2.32.2 method: GET - uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705 + uri: http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7 response: body: - string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705","identificatie":"DOCUMENT-2024-0000000017","bronorganisatie":"123456782","creatiedatum":"2024-12-19","titel":"Form - 000","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"application/pdf","taal":"eng","versie":1,"beginRegistratie":"2024-12-19T10:08:39.708635Z","bestandsnaam":"open-forms-Form - 000.pdf","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/c037d213-d53b-4672-8165-486f7083c705/download?versie=1","bestandsomvang":0,"link":"","beschrijving":"Ingezonden + string: '{"url":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7","identificatie":"DOCUMENT-2024-0000000008","bronorganisatie":"123456782","creatiedatum":"2024-12-12","titel":"Form + 000","vertrouwelijkheidaanduiding":"openbaar","auteur":"Aanvrager","status":"definitief","formaat":"application/pdf","taal":"eng","versie":1,"beginRegistratie":"2024-12-12T15:58:59.156802Z","bestandsnaam":"open-forms-Form + 000.pdf","inhoud":"http://localhost:8003/documenten/api/v1/enkelvoudiginformatieobjecten/69904fce-db52-47d3-a34a-09a32bfa1ad7/download?versie=1","bestandsomvang":0,"link":"","beschrijving":"Ingezonden formulier","ontvangstdatum":null,"verzenddatum":null,"indicatieGebruiksrecht":false,"verschijningsvorm":"","ondertekening":{"soort":"","datum":null},"integriteit":{"algoritme":"","waarde":"","datum":null},"informatieobjecttype":"http://localhost:8003/catalogi/api/v1/informatieobjecttypen/f2908f6f-aa07-42ef-8760-74c5234f2d25","locked":false,"bestandsdelen":[],"trefwoorden":[]}' headers: API-version: @@ -296,7 +297,7 @@ interactions: Cross-Origin-Opener-Policy: - same-origin ETag: - - '"76efcb1c5a3b54d841c5ee196d1867c9"' + - '"61f45ff746595d0fd9bc310634d321a6"' Referrer-Policy: - same-origin Vary: diff --git a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v1.py b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v1.py index 03f050cadf..957d849bad 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v1.py +++ b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v1.py @@ -130,7 +130,14 @@ def test_submission_with_objects_api_backend_override_defaults(self): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, language_code="en", uuid=FIXED_SUBMISSION_UUID, @@ -186,7 +193,14 @@ def test_submission_with_objects_api_backend_override_defaults(self): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, } }, "taal": "en", diff --git a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py index 36c7728a22..dd8d167e81 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py +++ b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py @@ -75,7 +75,14 @@ def test_submission_with_objects_api_v2(self): submitted_data={ "age": 20, "lastname": "My last name", - "location": [52.36673378967122, 4.893164274470299], + "location": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, ) @@ -545,7 +552,14 @@ def test_submission_with_map_component_inside_data(self): ], completed=True, submitted_data={ - "location": [52.36673378967122, 4.893164274470299], + "location": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, ) ObjectsAPIRegistrationData.objects.create(submission=submission) diff --git a/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py b/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py index 6728f597f9..36d68f2452 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py +++ b/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py @@ -89,7 +89,14 @@ def test_update_payment_status(self): submitted_data={ "age": 20, "lastname": "My last name", - "location": [52.36673378967122, 4.893164274470299], + "location": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, registration_result={"url": objects_url}, form__payment_backend="demo", diff --git a/src/openforms/registrations/contrib/stuf_zds/tests/test_backend.py b/src/openforms/registrations/contrib/stuf_zds/tests/test_backend.py index 48ea9c3e93..ddc09dfbd8 100644 --- a/src/openforms/registrations/contrib/stuf_zds/tests/test_backend.py +++ b/src/openforms/registrations/contrib/stuf_zds/tests/test_backend.py @@ -210,7 +210,14 @@ def test_plugin(self, m, mock_task): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "extra": "BuzzBazz", "language_code": "Dothraki", # some form widget defined by form designer }, @@ -291,7 +298,7 @@ def test_plugin(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum": "20001231", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum/@stuf:indOnvolledigeDatum": "V", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -465,7 +472,14 @@ def test_plugin_natuurlijk_persoon_initiator(self, m, mock_task): "tussenvoegsel": "de", "postcode": "1000 aa", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, @@ -548,7 +562,7 @@ def test_plugin_natuurlijk_persoon_initiator(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:voorletters": "J.W.", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geslachtsaanduiding": "M", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -714,7 +728,14 @@ def test_plugin_natuurlijk_persoon_without_auth(self, m, mock_task): "tussenvoegsel": "de", "postcode": "1000 AA", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, @@ -782,7 +803,7 @@ def test_plugin_natuurlijk_persoon_without_auth(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:voorletters": "J.W.", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geslachtsaanduiding": "M", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", }, ) @@ -950,7 +971,14 @@ def test_plugin_vestiging_initiator(self, m, mock_task): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "vestigingsNummer": "87654321", }, kvk="12345678", @@ -1025,7 +1053,7 @@ def test_plugin_vestiging_initiator(self, m, mock_task): "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:code": "zt-code", "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -1144,7 +1172,14 @@ def test_plugin_vestiging_initiator_kvk_only(self, m, mock_task): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, kvk="12345678", form__name="my-form", @@ -1218,7 +1253,7 @@ def test_plugin_vestiging_initiator_kvk_only(self, m, mock_task): "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:code": "zt-code", "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -1343,7 +1378,14 @@ def test_plugin_vestiging_initiator_kvk_and_vestigingsnummer(self, m, mock_task) submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "vestigingsNummer": "87654321", }, kvk="12345678", @@ -1418,7 +1460,7 @@ def test_plugin_vestiging_initiator_kvk_and_vestigingsnummer(self, m, mock_task) "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:code": "zt-code", "//zkn:object/zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -1574,7 +1616,14 @@ def test_plugin_medewerker(self, m, mock_task): "tussenvoegsel": "de", "postcode": "1000 AA", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, @@ -1653,7 +1702,7 @@ def test_plugin_medewerker(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geslachtsaanduiding": "M", "//zkn:object/zkn:heeftAlsOverigBetrokkene/zkn:gerelateerde/zkn:medewerker/zkn:identificatie": "123456782", # Identificatie of the employee "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:isVan/zkn:gerelateerde/zkn:omschrijving": "zt-omschrijving", "//zkn:heeft/zkn:gerelateerde/zkn:code": "123", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "aaabbc", @@ -2032,7 +2081,14 @@ def test_plugin_optional_fields(self, m, mock_task): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "extra": "BuzzBazz", }, ) @@ -2099,7 +2155,7 @@ def test_plugin_optional_fields(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum": "20001231", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum/@stuf:indOnvolledigeDatum": "V", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", }, ) self.assertXPathNotExists( @@ -2174,6 +2230,259 @@ def test_plugin_optional_fields(self, m, mock_task): 5, ) + @patch("celery.app.task.Task.request") + def test_plugin_map_with_pointer(self, m, mock_task): + submission = SubmissionFactory.from_components( + [ + { + "key": "coordinaat", + "registration": { + "attribute": RegistrationAttribute.locatie_coordinaat, + }, + }, + ], + form__name="my-form", + bsn="111222333", + public_registration_reference="foo-zaak", + registration_result={"intermediate": {"zaaknummer": "foo-zaak"}}, + submitted_data={ + "coordinaat": { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, + }, + ) + SubmissionFileAttachmentFactory.create( + submission_step=submission.steps[0], + file_name="my-attachment.doc", + content_type="application/msword", + ) + + m.post( + self.service.soap_service.url, + content=load_mock("creeerZaak.xml"), + additional_matcher=match_text("zakLk01"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock( + "genereerDocumentIdentificatie.xml", + {"document_identificatie": "bar-document"}, + ), + additional_matcher=match_text("genereerDocumentIdentificatie_Di02"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock("voegZaakdocumentToe.xml"), + additional_matcher=match_text("edcLk01"), + ) + mock_task.id = 1 + + form_options = { + "zds_zaaktype_code": "zt-code", + "zds_documenttype_omschrijving_inzending": "aaabbc", + } + + plugin = StufZDSRegistration("stuf") + serializer = plugin.configuration_options(data=form_options) + self.assertTrue(serializer.is_valid()) + + result = plugin.register_submission(submission, serializer.validated_data) + self.assertEqual( + result, + { + "zaak": "foo-zaak", + "document": "bar-document", + }, + ) + + xml_doc = xml_from_request_history(m, 0) + self.assertSoapXMLCommon(xml_doc) + self.assertXPathEqual( + xml_doc, + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos", + "4.893164274470299 52.36673378967122", + ) + + @patch("celery.app.task.Task.request") + def test_plugin_map_with_polygon(self, m, mock_task): + submission = SubmissionFactory.from_components( + [ + { + "key": "coordinaat", + "registration": { + "attribute": RegistrationAttribute.locatie_coordinaat, + }, + }, + ], + form__name="my-form", + bsn="111222333", + public_registration_reference="foo-zaak", + registration_result={"intermediate": {"zaaknummer": "foo-zaak"}}, + submitted_data={ + "coordinaat": { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [5.275725, 52.134743], + [5.256707, 52.123972], + [5.286552, 52.123035], + [5.275725, 52.134743], + ] + ], + }, + }, + }, + ) + SubmissionFileAttachmentFactory.create( + submission_step=submission.steps[0], + file_name="my-attachment.doc", + content_type="application/msword", + ) + + m.post( + self.service.soap_service.url, + content=load_mock("creeerZaak.xml"), + additional_matcher=match_text("zakLk01"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock( + "genereerDocumentIdentificatie.xml", + {"document_identificatie": "bar-document"}, + ), + additional_matcher=match_text("genereerDocumentIdentificatie_Di02"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock("voegZaakdocumentToe.xml"), + additional_matcher=match_text("edcLk01"), + ) + mock_task.id = 1 + + form_options = { + "zds_zaaktype_code": "zt-code", + "zds_documenttype_omschrijving_inzending": "aaabbc", + } + + plugin = StufZDSRegistration("stuf") + serializer = plugin.configuration_options(data=form_options) + self.assertTrue(serializer.is_valid()) + + result = plugin.register_submission(submission, serializer.validated_data) + self.assertEqual( + result, + { + "zaak": "foo-zaak", + "document": "bar-document", + }, + ) + + xml_doc = xml_from_request_history(m, 0) + self.assertSoapXMLCommon(xml_doc) + self.assertXPathEqualDict( + xml_doc, + { + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Polygon/gml:exterior/gml:LinearRing/gml:pos[1]": "5.275725 52.134743", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Polygon/gml:exterior/gml:LinearRing/gml:pos[2]": "5.256707 52.123972", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Polygon/gml:exterior/gml:LinearRing/gml:pos[3]": "5.286552 52.123035", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Polygon/gml:exterior/gml:LinearRing/gml:pos[4]": "5.275725 52.134743", + }, + ) + + @patch("celery.app.task.Task.request") + def test_plugin_map_with_line_string(self, m, mock_task): + submission = SubmissionFactory.from_components( + [ + { + "key": "coordinaat", + "registration": { + "attribute": RegistrationAttribute.locatie_coordinaat, + }, + }, + ], + form__name="my-form", + bsn="111222333", + public_registration_reference="foo-zaak", + registration_result={"intermediate": {"zaaknummer": "foo-zaak"}}, + submitted_data={ + "coordinaat": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [ + [5.313637, 52.128128], + [5.28987, 52.132218], + [5.273187, 52.1287], + ], + }, + }, + }, + ) + SubmissionFileAttachmentFactory.create( + submission_step=submission.steps[0], + file_name="my-attachment.doc", + content_type="application/msword", + ) + + m.post( + self.service.soap_service.url, + content=load_mock("creeerZaak.xml"), + additional_matcher=match_text("zakLk01"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock( + "genereerDocumentIdentificatie.xml", + {"document_identificatie": "bar-document"}, + ), + additional_matcher=match_text("genereerDocumentIdentificatie_Di02"), + ) + + m.post( + self.service.soap_service.url, + content=load_mock("voegZaakdocumentToe.xml"), + additional_matcher=match_text("edcLk01"), + ) + mock_task.id = 1 + + form_options = { + "zds_zaaktype_code": "zt-code", + "zds_documenttype_omschrijving_inzending": "aaabbc", + } + + plugin = StufZDSRegistration("stuf") + serializer = plugin.configuration_options(data=form_options) + self.assertTrue(serializer.is_valid()) + + result = plugin.register_submission(submission, serializer.validated_data) + self.assertEqual( + result, + { + "zaak": "foo-zaak", + "document": "bar-document", + }, + ) + + xml_doc = xml_from_request_history(m, 0) + self.assertSoapXMLCommon(xml_doc) + self.assertXPathEqualDict( + xml_doc, + { + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:LineString/gml:posList": "5.313637 52.128128 5.28987 52.132218 5.273187 52.1287", + }, + ) + @patch("celery.app.task.Task.request") def test_plugin_optional_fields_missing_status_description(self, m, mock_task): submission = SubmissionFactory.from_components( @@ -2225,7 +2534,14 @@ def test_plugin_optional_fields_missing_status_description(self, m, mock_task): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "extra": "BuzzBazz", }, ) @@ -2294,7 +2610,7 @@ def test_plugin_optional_fields_missing_status_description(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum": "20001231", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum/@stuf:indOnvolledigeDatum": "V", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:heeft/zkn:gerelateerde/zkn:code": "zt-code", }, ) @@ -2420,7 +2736,14 @@ def test_plugin_optional_fields_missing_status_code(self, m, mock_task): "achternaam": "Bar", "tussenvoegsel": "de", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "extra": "BuzzBazz", }, ) @@ -2489,7 +2812,7 @@ def test_plugin_optional_fields_missing_status_code(self, m, mock_task): "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum": "20001231", "//zkn:object/zkn:heeftAlsInitiator/zkn:gerelateerde/zkn:natuurlijkPersoon/bg:geboortedatum/@stuf:indOnvolledigeDatum": "V", "//zkn:object/zkn:anderZaakObject/zkn:omschrijving": "coordinaat", - "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "52.36673378967122 4.893164274470299", + "//zkn:object/zkn:anderZaakObject/zkn:lokatie/gml:Point/gml:pos": "4.893164274470299 52.36673378967122", "//zkn:heeft/zkn:gerelateerde/zkn:omschrijving": "zt-status-omschrijving", }, ) @@ -2568,7 +2891,14 @@ def test_pre_registration_goes_wrong_sets_internal_reference(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, form__registration_backend="stuf-zds-create-zaak", form__registration_backend_options={ @@ -2617,7 +2947,14 @@ def test_retry_pre_registration_task(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, kvk="12345678", form__registration_backend="stuf-zds-create-zaak", diff --git a/src/openforms/registrations/contrib/zgw_apis/tests/test_backend.py b/src/openforms/registrations/contrib/zgw_apis/tests/test_backend.py index d428218d62..c88209fa73 100644 --- a/src/openforms/registrations/contrib/zgw_apis/tests/test_backend.py +++ b/src/openforms/registrations/contrib/zgw_apis/tests/test_backend.py @@ -226,7 +226,14 @@ def test_submission_with_zgw_backend_with_natuurlijk_persoon_initiator(self, m): "tussenvoegsel": "de", "postcode": "1000 AA", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, @@ -455,7 +462,14 @@ def test_submission_with_zgw_backend_with_vestiging_and_kvk_initiator(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "vestigingsNummer": "87654321", }, kvk="12345678", @@ -665,7 +679,14 @@ def test_submission_with_zgw_backend_with_kvk_only_initiator(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, kvk="12345678", form__product__price=Decimal("0"), @@ -750,7 +771,14 @@ def test_submission_with_zgw_backend_with_vestiging_initiator_kvk_only(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, kvk="12345678", form__product__price=Decimal("0"), @@ -960,7 +988,14 @@ def test_submission_with_registrator(self, m): submitted_data={ "handelsnaam": "ACME", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, }, kvk="12345678", form__product__price=Decimal("0"), @@ -1811,7 +1846,14 @@ def get_create_json_for_zaakobject(req, ctx): "tussenvoegsel": "de", "postcode": "1000 AA", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, @@ -1874,7 +1916,17 @@ def get_create_json_for_zaakobject(req, ctx): "geboortedatum": "2000-12-31", "geslachtsaanduiding": "mannelijk", "postcode": "1000 AA", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [ + 4.893164274470299, + 52.36673378967122, + ], + }, + }, } }, "type": "ProductAanvraag", diff --git a/src/openforms/registrations/contrib/zgw_apis/tests/test_backend_partial_failure.py b/src/openforms/registrations/contrib/zgw_apis/tests/test_backend_partial_failure.py index 13377e8224..4d0978694d 100644 --- a/src/openforms/registrations/contrib/zgw_apis/tests/test_backend_partial_failure.py +++ b/src/openforms/registrations/contrib/zgw_apis/tests/test_backend_partial_failure.py @@ -492,7 +492,14 @@ def test_failure_after_object_creation(self, m, obj_api_config): "tussenvoegsel": "de", "postcode": "1000 AA", "geboortedatum": "2000-12-31", - "coordinaat": [52.36673378967122, 4.893164274470299], + "coordinaat": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [4.893164274470299, 52.36673378967122], + }, + }, "voorletters": "J.W.", "geslachtsaanduiding": "mannelijk", }, diff --git a/src/openforms/submissions/tests/test_submission_report.py b/src/openforms/submissions/tests/test_submission_report.py index 6c53b56368..a52e83242c 100644 --- a/src/openforms/submissions/tests/test_submission_report.py +++ b/src/openforms/submissions/tests/test_submission_report.py @@ -373,7 +373,14 @@ def test_report_is_generated_in_same_language_as_submission(self): "filekey": [{"originalName": "download(2).pdf"}], "ibankey": "NL56 INGB 0705 0051 00", "licenseplatekey": "AA-00-13", - "mapkey": [52.193459, 5.279538], + "mapkey": { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Point", + "coordinates": [52.193459, 5.279538], + }, + }, "numberkey": "1", "passwordkey": "Panda1911!", "phonenumberkey": "+49 1234 567 890", diff --git a/src/openforms/tests/e2e/test_input_validation.py b/src/openforms/tests/e2e/test_input_validation.py index 0deb90fa9a..cfe258f86a 100644 --- a/src/openforms/tests/e2e/test_input_validation.py +++ b/src/openforms/tests/e2e/test_input_validation.py @@ -542,6 +542,8 @@ def test_max_value(self): class SingleMapTests(ValidationsTestCase): + fuzzy_match_invalid_param_names = True + async def apply_ui_input(self, page: Page, label: str, ui_input: str | int | float): await page.wait_for_selector( f".openforms-leaflet-map, [aria-label='{label}']", state="visible"