Enhance TestPlugin and Playwright Tests to Replace Submodel Template #85
Merged
Enhance TestPlugin and Playwright Tests to Replace Submodel Template #85
Conversation
… Test Refactored all code, tests, data, and configs to remove the "Nameplate" and "Reliability" submodels, replacing them with "HandoverDocumentation" and "CustomSubmodel". Updated mock data, AAS XML, test cases, expected JSON, API definitions, and environment/configuration files to use the new, more complex and hierarchical submodel structures. This migration enables richer documentation, multilingual support, and flexible asset relationships, and removes all legacy references to the old submodels.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR migrates the TestPlugin example assets and Playwright API tests away from the legacy Nameplate and Reliability submodels to the new HandoverDocumentation and CustomSubmodel structures (including hierarchical/nested data).
Changes:
- Updated example docker-compose + Bruno API collection to use HandoverDocumentation/CustomSubmodel identifiers and requests.
- Replaced legacy example AAS XML assets (removed Reliability.xml, added CustomAas.xml using CustomSubmodel template semantics).
- Refactored Playwright tests + expected fixtures and updated DataEngine template mapping configuration.
Reviewed changes
Copilot reviewed 33 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml | Updates template mappings and shell creation payload to new submodels |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/collection.bru | Renames variables for new submodel identifiers |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - Reliability.bru | Repurposes Reliability request to CustomSubmodel |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - Nameplate.bru | Removes legacy Nameplate request |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - HandoverDocumentation.bru | Adds HandoverDocumentation request |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Reliability.bru | Repurposes Reliability submodel-element request to CustomSubmodel |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Nameplate.bru | Repurposes Nameplate submodel-element request to HandoverDocumentation |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Markings.bru | Removes legacy Markings request |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Serialization/Get appropriate serialization.bru | Updates serialization query to new submodel ids |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Registry/Get Submodel Descriptor By Id.bru | Adds timeout setting |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/aas/Reliability.xml | Removes legacy Reliability example AAS |
| source/AAS.TwinEngine.Plugin.TestPlugin/Example/aas/CustomAas.xml | Adds new CustomSubmodel hierarchical example AAS |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Reliability_Expected.json | Removes Reliability expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Nameplate_Expected.json | Updates fixture content (now reflects new model) |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json | Removes Reliability submodel-element expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_Markings_Expected.json | Removes Nameplate Markings expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_ManufacturerName_Expected.json | Removes Nameplate ManufacturerName expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_HandoverDocumentation_Documents0_DocumentVersions0_Language0.json | Adds HandoverDocumentation nested element expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_CustomSubmodel_OperatingConditionsOfReliabilityCharacteristics.json | Adds CustomSubmodel collection expected fixture |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelTests.cs | Updates tests to target ContactInfo/HandoverDocumentation/CustomSubmodel |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs | Updates element tests to new nested paths and new submodel |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SerializationTests.cs | Updates serialization test to expect new submodel ids |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Reliability_Expected.json | Updates descriptor expected fixture (now reflects new model) |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Nameplate_Expected.json | Updates descriptor expected fixture (now reflects new model) |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/SubmodelRegistryTests.cs | Updates descriptor tests to new submodels |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ApiTestBase.cs | Updates base64 identifiers to new submodel ids |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetSubmodelRefById_Expected.json | Updates expected shell submodel references |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetShellById_Expected.json | Updates expected shell submodel references |
| source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj | Updates copied test fixtures to new filenames |
| source/AAS.TwinEngine.DataEngine/appsettings.development.json | Updates template mapping rules for new submodels |
Comments suppressed due to low confidence (2)
source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml:1
- The SubModel registry host name looks misspelled (
sm-template-regisry). If this is intended to point at the submodel template registry service, the typo will prevent the plugin from reaching the registry at runtime. Rename it to the correct service name (e.g.,sm-template-registry) to match the declared docker service/network alias.
source/AAS.TwinEngine.DataEngine/appsettings.development.json:47 - The PR description says all references to deprecated Nameplate were removed, but the development configuration still maps a template pattern containing
\"Nameplate\". If Nameplate is truly deprecated, update/remove this mapping (or rename the pattern to the new submodel name) to keep configuration consistent with the migration.
{
"templateId": "https://admin-shell.io/idta/SubmodelTemplate/DigitalNameplate/3/0",
"pattern": [ "Nameplate" ]
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs
Show resolved
Hide resolved
...estData/GetSubmodelElement_HandoverDocumentation_Documents0_DocumentVersions0_Language0.json
Show resolved
Hide resolved
Replaced empty "IsPartOf" and "HasPart" objects with nested structures providing explicit relationship data for submodels 000-001, 000-002, and 000-003. This enhances the representation of hierarchical links between submodels and their elements.
mm-asha
previously approved these changes
Mar 26, 2026
Updated "ModelReference" key values in GetSubmodel_CustomSubmodel_Expected.json to reference submodels with version 000-003, replacing previous references to 000-001 and 000-002. This ensures the JSON structure points to the latest submodel versions.
|
Test & Coverage ReportTest Results Summary
Code CoverageUnit Tests Coverage
Minimum allowed line rate is Module Tests Coverage
|
mcn-mm
approved these changes
Mar 26, 2026
mm-asha
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This pull request completes a full migration from the legacy Nameplate and Reliability submodels to the new HandoverDocumentation and CustomSubmodel structures. It updates the TestPlugin, example folder, Playwright tests, configurations, and all related assets to support the new, hierarchical submodel definitions.
Key Changes
Replaced the Nameplate and Reliability submodels with:
Refactored TestPlugin to handle the new submodel types and nested hierarchical structures.
Updated the example folder, including:
Updated Playwright tests to reflect new API responses, UI expectations, and validation logic.
Refactored all unit tests to align with the new submodel definitions and structural changes.
Updated environment and configuration files to support the new model behavior and relationships.
Removed all remaining references to the deprecated Nameplate and Reliability submodels across the codebase, data files, and configs.