diff --git a/CHANGELOG.md b/CHANGELOG.md index 65732922d8..ea455af98a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha ## Added +- Added tests for aspect version compatibility. #529 - Added endpoint for dedicated removal of policy from BPNL. #559 - Integration Test Policy Store API Unhappy Path. #519 - Support for SingleLevelUsageAsPlanned. #470 diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 42960f9ce7..79675a5b37 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -27,6 +27,8 @@ Structure of test data: Test: - [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) + - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) + - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) ## SingleLevelBomAsPlanned Version Compatibility diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json new file mode 100644 index 0000000000..8a94d9668d --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json @@ -0,0 +1,61 @@ +{ + "relationships": [ + { + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000003CSAP" + }, + { + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000007RI31" + }, + { + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "linkedItem": { + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:litre" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000007RNYV" + } + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json new file mode 100644 index 0000000000..71a09354b5 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json @@ -0,0 +1,161 @@ +{ + "submodels": [ + { + "identification": "urn:uuid:3cbca689-83ed-40d9-81c1-3d060d54fd80", + "aspectType": "urn:samm:io.catenax.serial_part:1.0.1#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "localIdentifiers": [ + { + "value": "SN12345678", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-02-04T14:48:54", + "country": "HUR" + }, + "partTypeInformation": { + "manufacturerPartId": "456-7.890-1234-A", + "customerPartId": "PRT-12345", + "classification": "product", + "nameAtManufacturer": "Test part 1", + "nameAtCustomer": "Test part 1 customer" + } + } + }, + { + "identification": "urn:uuid:b7a19cfc-eed3-4f98-a440-352641cad328", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "localIdentifiers": [ + { + "value": "SN34567890", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-05-04T03:02:01", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS4567890123ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "678-9.012-3456-C", + "customerPartId": "PRT-90123", + "classification": "product", + "nameAtManufacturer": "Test part 4", + "nameAtCustomer": "Test part 4 customer" + } + } + }, + { + "identification": "urn:uuid:11d9d776-1239-45f8-9f28-e8e841a78b92", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "localIdentifiers": [ + { + "value": "SN23456789", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-03-04T11:12:13", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS3456789012ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "567-8.901-2345-B", + "customerPartId": "PRT-78901", + "classification": "product", + "nameAtManufacturer": "Test part 2", + "nameAtCustomer": "Test part 2 customer" + } + } + }, + { + "identification": "urn:uuid:d68ebb1b-9ab5-405f-956d-a5b514484c99", + "aspectType": "urn:samm:io.catenax.serial_part:3.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "localIdentifiers": [ + { + "value": "SN56789012", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2024-05-05T07:08:09Z", + "country": "HUR", + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ] + }, + "partTypeInformation": { + "partClassification": [ + { + "classificationStandard": "IEC", + "classificationID": "72451- 3:2012 ", + "classificationDescription": "Standard data element types with associated classification scheme for electric components." + } + ], + "manufacturerPartId": "890-1.234-5678-E", + "customerPartId": "PRT-89012", + "nameAtManufacturer": "Test part 3", + "nameAtCustomer": "Test part 3 customer" + } + } + }, + { + "identification": "urn:uuid:1c685bc9-efdc-4f74-b5f1-c9d2af385b55", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", + "localIdentifiers": [ + { + "value": "SN45678901", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-06-05T04:03:02", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "789-0.123-4567-D", + "customerPartId": "PRT-01234", + "classification": "product", + "nameAtManufacturer": "Test part 5", + "nameAtCustomer": "Test part 5 customer" + } + } + } + ], + "bpns": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json new file mode 100644 index 0000000000..82698c39df --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json @@ -0,0 +1,61 @@ +{ + "relationships": [ + { + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "linkedItem": { + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:litre" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + } + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json new file mode 100644 index 0000000000..0a24054028 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json @@ -0,0 +1,67 @@ +{ + "submodels": [ + { + "identification": "urn:uuid:169b7e61-88ee-47d0-8329-68ed5b7148d8", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "345-6.789-0123-A", + "nameAtManufacturer": "Test part 2" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + }, + { + "identification": "urn:uuid:24fe09b2-9a72-474d-9d01-268b417267e1", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "123-4.567-8901-A", + "nameAtManufacturer": "Test part 1" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + }, + { + "identification": "urn:uuid:c419973a-5e86-4821-b2f0-b064c3afd488", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "234-5.678-9012-A", + "nameAtManufacturer": "Test part 3" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json new file mode 100644 index 0000000000..815019b1a4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json @@ -0,0 +1,42 @@ +{ + "relationships": [ + { + "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "linkedItem": { + "quantity": { + "quantityNumber": 12.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsBuilt", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7", + "linkedItem": { + "quantity": { + "quantityNumber": 11.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsBuilt", + "bpn": "BPNL00000007QG00" + } + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json new file mode 100644 index 0000000000..2618c947a0 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json @@ -0,0 +1,4 @@ +{ + "submodels": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json new file mode 100644 index 0000000000..05aad0a3d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json @@ -0,0 +1,42 @@ +{ + "relationships": [ + { + "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "linkedItem": { + "quantity": { + "quantityNumber": 12.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "linkedItem": { + "quantity": { + "quantityNumber": 11.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsPlanned", + "bpn": "BPNL00000007QG00" + } + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json new file mode 100644 index 0000000000..2618c947a0 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json @@ -0,0 +1,4 @@ +{ + "submodels": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature new file mode 100644 index 0000000000..9f731291e1 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature @@ -0,0 +1,110 @@ +# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + +# Tests for Aspect Version Compatibility +Feature: Integration Tests for Aspect Version Compatibility #529 + + # Notes: + # - For possible values of "direction" and "bomLifecycle" see RelationshipAspect. + # - These tests require the following test data: + # - CX_Testdata_529_compatibility_*.json + + + Background: + Given the IRS URL "https://irs.dev.demo.catena-x.net" + And the admin user api key + + + # Requires test data CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json + @DEV @INTEGRATION_TEST + @TRI-2047 + Scenario: SingleLevelBomAsBuilt Version Compatibility + Given I register an IRS job for globalAssetId "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68" and BPN "BPNL00000007QG00" + And collectAspects "true" + And depth 10 + + And direction "downward" + And bomLifecycle "asBuilt" + + And aspects : + | urn:samm:io.catenax.serial_part:1.0.1#SerialPart | + | urn:samm:io.catenax.serial_part:2.0.0#SerialPart | + | urn:samm:io.catenax.serial_part:3.0.0#SerialPart | + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-built-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" + + + # Requires test data CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json + @DEV @INTEGRATION_TEST + @TRI-2048 + Scenario: SingleLevelBomAsPlanned Version Compatibility + Given I register an IRS job for globalAssetId "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd" and BPN "BPNL00000007QG00" + And collectAspects "true" + And depth 10 + + And direction "downward" + And bomLifecycle "asPlanned" + + And aspects : + | urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned | + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" + + + # Requires test data CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json + @DEV @INTEGRATION_TEST + @TRI-2049 + Scenario: SingleLevelUsageAsBuilt Version Compatibility + Given I register an IRS job for globalAssetId "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b" and BPN "BPNL00000007QG00" + And collectAspects "true" + And depth 10 + + And direction "upward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-usage-as-built-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" + + + # Requires test data CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json + @DEV @INTEGRATION_TEST + @TRI-2050 + Scenario: SingleLevelUsageAsPlanned Version Compatibility + Given I register an IRS job for globalAssetId "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6" and BPN "BPNL00000007QG00" + And collectAspects "true" + And depth 10 + + And direction "upward" + And bomLifecycle "asPlanned" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-usage-as-planned-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-planned-expected-submodels.json" + + diff --git a/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json b/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json new file mode 100644 index 0000000000..2c37d5494e --- /dev/null +++ b/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json @@ -0,0 +1,107 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema", + "description" : "The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves (e.g. serial parts or batches), unless parts can only be tracked by an part ID (on a type level).\n\nIf it is unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other.\n", + "type" : "object", + "components" : { + "schemas" : { + "urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" : { + "type" : "string", + "description" : "The provided regular expression ensures that the UUID is composed of five groups of characters separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens), optionally prefixed by \"urn:uuid:\" to make it an IRI.", + "pattern" : "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)" + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" : { + "type" : "string", + "description" : "Regular Expression to enable UTC and Timezone formats and the possibility to exclude time information.", + "pattern" : "^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?$" + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_QuantityValueCharacteristic" : { + "type" : "number", + "description" : "The quantity value associated with the unit expressed as float." + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_ItemUnitEnumeration" : { + "type" : "string", + "pattern" : "[a-zA-Z]*:[a-zA-Z]+", + "description" : "Enumeration for common item units.", + "enum" : [ "unit:piece", "unit:set", "unit:pair", "unit:page", "unit:cycle", "unit:kilowattHour", "unit:gram", "unit:kilogram", "unit:tonneMetricTon", "unit:tonUsOrShortTonUkorus", "unit:ounceAvoirdupois", "unit:pound", "unit:metre", "unit:centimetre", "unit:kilometre", "unit:inch", "unit:foot", "unit:yard", "unit:squareCentimetre", "unit:squareMetre", "unit:squareInch", "unit:squareFoot", "unit:squareYard", "unit:cubicCentimetre", "unit:cubicMetre", "unit:cubicInch", "unit:cubicFoot", "unit:cubicYard", "unit:litre", "unit:millilitre", "unit:hectolitre", "unit:secondUnitOfTime", "unit:minuteUnitOfTime", "unit:hourUnitOfTime", "unit:day" ] + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_ItemQuantityCharacteristic" : { + "description" : "Characteristic for measurements of an item (mass, count, linear, area, volume, misc).", + "type" : "object", + "properties" : { + "value" : { + "description" : "The quantity value associated with the unit.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_QuantityValueCharacteristic" + }, + "unit" : { + "description" : "The unit of an item. Common units may be related to mass, count, linear, area, volume or misc.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_ItemUnitEnumeration" + } + }, + "required" : [ "value", "unit" ] + }, + "urn_samm_io.catenax.shared.business_partner_number_2.0.0_BpnlTrait" : { + "type" : "string", + "description" : "The provided regular expression ensures that the BPNL is composed of prefix 'BPNL', 10 digits and two alphanumeric letters.", + "pattern" : "^BPNL[a-zA-Z0-9]{12}$" + }, + "urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Boolean" : { + "type" : "boolean", + "description" : "Represents a boolean value (i.e. a \"flag\")." + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_ChildData" : { + "description" : "Catena-X ID and meta data of the assembled child item.", + "type" : "object", + "properties" : { + "createdOn" : { + "description" : "Timestamp when the relation between the parent item and the child item was created, e.g. when the serialized child part was assembled into the given part.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" + }, + "quantity" : { + "description" : "Quantity of which the child item is assembled into the parent item. In general it is '1' for serialized parts.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_ItemQuantityCharacteristic" + }, + "lastModifiedOn" : { + "description" : "Timestamp when the assembly relationship between parent item and child item was last modified.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" + }, + "futureAddedField" : { + "description" : "Field added in the future (for testing compatibility).", + "type" : "string" + }, + "businessPartner" : { + "description" : "The supplier of the given child item.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.business_partner_number_2.0.0_BpnlTrait" + }, + "hasAlternatives" : { + "description" : "Expresses whether the part is built-in or wether it is one of several options. If the value is false, it can be assumed this exact item is built-in. If the value is true, it is unknown wether this or an alternative item is built-in.\nThis is the case when, e.g. the same item is supplied by two suppliers, the item is only tracked by a customer part ID during assembly. Thus, these items can not be differentiated from each other.\n\n", + "$ref" : "#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Boolean" + }, + "catenaXId" : { + "description" : "The Catena-X ID of the given part (e.g. the component), valid for the Catena-X dataspace.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" + } + }, + "required" : [ "createdOn", "quantity", "businessPartner", "hasAlternatives", "catenaXId" ] + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_SetOfChildItemsCharacteristic" : { + "description" : "Set of child items the parent item was assembled by (one structural level down).", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_ChildData" + }, + "uniqueItems" : true + } + } + }, + "properties" : { + "catenaXId" : { + "description" : "The Catena-X ID of the given part (e.g. the component), valid for the Catena-X dataspace.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" + }, + "childItems" : { + "description" : "Set of child items, of which the given parent item was assembled by (one structural level down).", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_SetOfChildItemsCharacteristic" + } + }, + "required" : [ "catenaXId", "childItems" ] +} \ No newline at end of file