Kusuma04-dev commented on code in PR #3716:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3716#discussion_r3802454914


##########
packages/dmn-editor/tests-e2e/drgRequirements/edgeProperties.spec.ts:
##########
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://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.
+ */
+
+import { test, expect } from "../__fixtures__/base";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+import { EdgeType } from "../__fixtures__/edges";
+import { EDGE_TITLE } from 
"../__fixtures__/propertiesPanel/edgePropertiesPanel";
+
+test.beforeEach(async ({ editor }) => {
+  await editor.open();
+});
+
+test.describe("Edge Properties Panel", () => {
+  test.describe("Information Requirement edge", () => {
+    test.beforeEach(async ({ palette, nodes }) => {
+      await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { 
x: 100, y: 100 } });
+      await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { 
x: 100, y: 300 } });
+      await nodes.dragNewConnectedEdge({
+        type: EdgeType.INFORMATION_REQUIREMENT,
+        from: DefaultNodeName.INPUT_DATA,
+        to: DefaultNodeName.DECISION,
+      });
+    });
+
+    test("should show 'Information Requirement' as the panel title when the 
edge is selected", async ({
+      edges,
+      edgePropertiesPanel,
+    }) => {
+      await edges.select({ from: DefaultNodeName.INPUT_DATA, to: 
DefaultNodeName.DECISION });
+      await edgePropertiesPanel.open();
+
+      const title = await edgePropertiesPanel.getTitle();
+      expect(title?.trim()).toBe(EDGE_TITLE[EdgeType.INFORMATION_REQUIREMENT]);
+    });
+
+    test("should show the edge ID in the properties panel", async ({ edges, 
edgePropertiesPanel }) => {
+      await edges.select({ from: DefaultNodeName.INPUT_DATA, to: 
DefaultNodeName.DECISION });
+      await edgePropertiesPanel.open();
+
+      const id = await edgePropertiesPanel.getId();
+      expect(id).toBeTruthy();
+      expect(id).toMatch(/^_/);
+    });
+
+    test("should set and get the edge description", async ({ edges, 
edgePropertiesPanel }) => {
+      await edges.select({ from: DefaultNodeName.INPUT_DATA, to: 
DefaultNodeName.DECISION });
+      await edgePropertiesPanel.open();
+      await edgePropertiesPanel.setDescription({ newDescription: "Edge 
description" });

Review Comment:
   Yes @jomarko , we can do that, Let me add it.



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