Copilot commented on code in PR #4040:
URL: 
https://github.com/apache/incubator-kie-tools/pull/4040#discussion_r4261915283


##########
packages/bpmn-editor/src/mutations/_dataMapping.ts:
##########
@@ -256,7 +278,7 @@ export function setInputDataMapping(
                 "@_id": generateUuid(),
                 from: {
                   "@_id": generateUuid(),
-                  "@_xsi:type": "tFormalExpression",
+                  "@_xsi:type": `${bpmnPrefix}tFormalExpression`,
                   __$$text: dataMapping.value,
                 } as any,

Review Comment:
   New behavior changes the serialized `@_xsi:type` to include a discovered 
BPMN prefix (e.g. `bpmn2:tFormalExpression`). There are unit tests for 
`getBpmnNamespacePrefix`, but no test shown that verifies the end-to-end effect 
on the generated data mapping objects (`setInputDataMapping` / 
`setOutputDataMapping`). Add assertions that, given `definitions` containing 
`@_xmlns:bpmn2: BPMN20_MODEL_NAMESPACE`, the produced assignment includes 
`@_xsi:type === 'bpmn2:tFormalExpression'` (and remains `'tFormalExpression'` 
when BPMN is the default xmlns).



##########
packages/bpmn-editor/tsconfig.tests.json:
##########
@@ -0,0 +1,3 @@
+{
+  "extends": "./tsconfig.json"
+}

Review Comment:
   `tsconfig.tests.json` is added but not referenced anywhere in the shown Jest 
setup. Unless `@kie-tools/jest-base` implicitly discovers it (not evident 
here), Jest/ts-jest will likely keep using `tsconfig.json`, making this file 
effectively dead and potentially misleading. Consider either wiring it 
explicitly (e.g., via Jest/ts-jest config in `jest.config.js`/transform 
options) or removing it if it’s not needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to