jomarko commented on code in PR #3046:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3046#discussion_r2086264749


##########
packages/dmn-editor/tests-e2e/drds/modelDecisionServicesInDrds.spec.ts:
##########
@@ -121,13 +179,55 @@ test.describe("Model Decision Services - DRD", () => {
     // TODO
   });
 
-  test("892 expand - same depiction as other DRDs", async ({ drds }) => {
-    test.skip(true, 
"https://github.com/apache/incubator-kie-issues/issues/892";);
+  test("892 expand - same depiction as other DRDs", async ({
+    drds,
+    drgNodes,
+    palette,
+    nodes,
+    diagram,
+    editor,
+    decisionServicePropertiesPanel,
+  }) => {
     test.info().annotations.push({
       type: TestAnnotations.REGRESSION,
       description: "https://github.com/apache/incubator-kie-issues/issues/892";,
     });
-    // TODO
+    await drds.toggle();
+    await drds.create({ name: "First DRD" });
+    await drgNodes.toggle();
+
+    await palette.dragNewNode({
+      type: NodeType.DECISION_SERVICE,
+      targetPosition: { x: 400, y: 200 },
+      thenRenameTo: "DS1",
+    });
+    await expect(nodes.get({ name: "DS1" })).toBeAttached();
+
+    await palette.dragNewNode({
+      type: NodeType.DECISION,
+      targetPosition: { x: 200, y: 200 },
+      thenRenameTo: "D1",
+    });
+    await expect(nodes.get({ name: "D1" })).toBeAttached();
+
+    await nodes.move({ name: "D1", targetPosition: { x: 500, y: 300 } });
+    await expect(nodes.get({ name: "D1" })).toBeAttached();
+    await nodes.select({ name: "DS1", position: NodePosition.TOP });
+    await editor.collapseDecisionService();
+
+    await drds.toggle();
+    await drds.create({ name: "Second DRD" });
+    await drgNodes.dragNode({ name: "DS1", targetPosition: { x: 400, y: 200 } 
});
+    await drgNodes.toggle();
+
+    await drds.toggle();
+    await drds.navigateTo({ name: "First DRD" });
+    await drds.toggle();
+
+    await nodes.select({ name: "DS1", position: NodePosition.TOP });
+    await editor.expandDecisionService();

Review Comment:
   Don't we want have:
   ```
   await editor.expandDecisionService({ name: "DS1", position: NodePosition.TOP 
});
   ```
   
   that would internally do `nodes.select`?



##########
packages/dmn-editor/tests-e2e/drds/modelDecisionServicesInDrds.spec.ts:
##########
@@ -121,13 +179,55 @@ test.describe("Model Decision Services - DRD", () => {
     // TODO
   });
 
-  test("892 expand - same depiction as other DRDs", async ({ drds }) => {
-    test.skip(true, 
"https://github.com/apache/incubator-kie-issues/issues/892";);
+  test("892 expand - same depiction as other DRDs", async ({
+    drds,
+    drgNodes,
+    palette,
+    nodes,
+    diagram,
+    editor,
+    decisionServicePropertiesPanel,
+  }) => {
     test.info().annotations.push({
       type: TestAnnotations.REGRESSION,
       description: "https://github.com/apache/incubator-kie-issues/issues/892";,
     });
-    // TODO
+    await drds.toggle();
+    await drds.create({ name: "First DRD" });
+    await drgNodes.toggle();
+
+    await palette.dragNewNode({
+      type: NodeType.DECISION_SERVICE,
+      targetPosition: { x: 400, y: 200 },
+      thenRenameTo: "DS1",
+    });
+    await expect(nodes.get({ name: "DS1" })).toBeAttached();
+
+    await palette.dragNewNode({
+      type: NodeType.DECISION,
+      targetPosition: { x: 200, y: 200 },
+      thenRenameTo: "D1",
+    });
+    await expect(nodes.get({ name: "D1" })).toBeAttached();
+
+    await nodes.move({ name: "D1", targetPosition: { x: 500, y: 300 } });
+    await expect(nodes.get({ name: "D1" })).toBeAttached();
+    await nodes.select({ name: "DS1", position: NodePosition.TOP });
+    await editor.collapseDecisionService();

Review Comment:
   similar comment as for `editor.expand`



##########
packages/dmn-editor/tests-e2e/drds/modelDecisionServicesInDrds.spec.ts:
##########
@@ -103,13 +145,29 @@ test.describe("Model Decision Services - DRD", () => {
     // TODO, question, not understand
   });
 
-  test("892 collapse - remove its content", async ({ drds }) => {
-    test.skip(true, 
"https://github.com/apache/incubator-kie-issues/issues/892";);
+  test("892 collapse - remove its content", async ({ editor, palette, nodes, 
diagram }) => {
     test.info().annotations.push({
       type: TestAnnotations.REGRESSION,
       description: "https://github.com/apache/incubator-kie-issues/issues/892";,
     });
-    // TODO
+    await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, 
targetPosition: { x: 400, y: 200 } });
+    await expect(nodes.get({ name: DefaultNodeName.DECISION_SERVICE 
})).toBeAttached();
+
+    await palette.dragNewNode({
+      type: NodeType.DECISION,
+      targetPosition: { x: 200, y: 200 },
+      thenRenameTo: "User Decision",
+    });
+    await expect(nodes.get({ name: "User Decision" })).toBeAttached();
+
+    await nodes.move({ name: "User Decision", targetPosition: { x: 500, y: 300 
} });
+    await expect(nodes.get({ name: "User Decision" })).toBeAttached();
+
+    await nodes.select({ name: DefaultNodeName.DECISION_SERVICE, position: 
NodePosition.TOP });
+    await editor.collapseDecisionService();

Review Comment:
   similar comment as for `editor.expand`



-- 
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