From cfeb75298618580c4c9661a7ad4260f1de825c8c Mon Sep 17 00:00:00 2001 From: CTomlyn Date: Tue, 25 Oct 2022 14:49:57 -0700 Subject: [PATCH] #1218 Comment link IDs should be persisted when getPipelineFlow is called (#1220) --- .../__tests__/common-canvas/supernode-test.js | 51 ++++++++++++++----- .../json/startPipelineFlow.json | 4 ++ .../json/supernode-test1-expected-flow.json | 4 ++ .../supernode-test1-expected-undo-flow.json | 5 ++ .../json/supernode-test2-expected-flow.json | 4 ++ .../supernode-test2-expected-undo-flow.json | 5 ++ .../json/supernode-test3-expected-flow.json | 3 ++ .../supernode-test3-expected-undo-flow.json | 5 ++ .../json/supernode-test4-expected-flow.json | 4 ++ .../supernode-test4-expected-undo-flow.json | 5 ++ .../json/supernode-test5-expected-flow.json | 3 ++ .../supernode-test5-expected-undo-flow.json | 5 ++ .../json/supernode-test6-expected-flow.json | 3 ++ .../supernode-test6-expected-undo-flow.json | 5 ++ .../json/supernode-test7-expected-flow.json | 5 ++ .../supernode-test7-expected-undo-flow.json | 5 ++ .../json/supernode-test8-expected-flow.json | 5 ++ .../supernode-test8-expected-undo-flow.json | 5 ++ .../json/supernodeWithoutSubPipeline.json | 4 ++ .../src/object-model/pipeline-out-handler.js | 2 +- .../cypress/integration/canvas/clipboard.js | 5 ++ .../support/canvas/verification-cmds.js | 36 ++++++------- .../diagrams/allTypesCanvas.json | 4 ++ .../test_resources/diagrams/bigCanvas.json | 11 ++++ .../diagrams/commentColorCanvas.json | 3 ++ .../diagrams/decoratorCanvas.json | 9 ++++ .../diagrams/detachedLinksCanvas.json | 4 ++ .../diagrams/linkColorCanvas.json | 8 +++ .../diagrams/multiPortsCanvas.json | 4 ++ .../diagrams/pipelineFlowExample.json | 2 + .../diagrams/robWoodsCanvas.json | 1 + .../test_resources/diagrams/stylesCanvas.json | 2 + .../diagrams/supernodeCanvas.json | 5 ++ .../diagrams/supernodeNestedCanvas.json | 3 ++ 34 files changed, 197 insertions(+), 32 deletions(-) diff --git a/canvas_modules/common-canvas/__tests__/common-canvas/supernode-test.js b/canvas_modules/common-canvas/__tests__/common-canvas/supernode-test.js index 2c01899784..df2c1e9515 100644 --- a/canvas_modules/common-canvas/__tests__/common-canvas/supernode-test.js +++ b/canvas_modules/common-canvas/__tests__/common-canvas/supernode-test.js @@ -1237,8 +1237,10 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test1ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - // console.log("Act = " + JSON.stringify(objectModel.getPipelineFlow(), null, 2)); - expect(isEqual(JSON.stringify(test1ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test1ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test1ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1282,8 +1284,11 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test2ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - // console.log("Act = " + JSON.stringify(objectModel.getPipelineFlow(), null, 2)); - expect(isEqual(JSON.stringify(test2ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test2ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; + canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test2ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1324,8 +1329,10 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test3ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - // console.log("Act = " + JSON.stringify(objectModel.getPipelineFlow(), null, 2)); - expect(isEqual(JSON.stringify(test3ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test3ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test3ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1360,7 +1367,11 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test4ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - expect(isEqual(JSON.stringify(test4ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test4ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; + canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test4ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1396,7 +1407,11 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test5ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - expect(isEqual(JSON.stringify(test5ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test5ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; + canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test5ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1440,7 +1455,10 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test6ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - expect(isEqual(JSON.stringify(test6ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test6ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test6ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1481,7 +1499,11 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test7ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - expect(isEqual(JSON.stringify(test7ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test7ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; + canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test7ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -1523,8 +1545,11 @@ describe("Create Supernode Action", () => { expect(isEqual(JSON.stringify(test8ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; canvasController.contextMenuActionHandler("undo"); - // console.log("Act = " + JSON.stringify(objectModel.getPipelineFlow(), null, 2)); - expect(isEqual(JSON.stringify(test8ExpectedUndoFlow), JSON.stringify(objectModel.getPipelineFlow()))).to.be.true; + const actualUndo = objectModel.getPipelineFlow(); + removeGeneratedLinkIds(actualUndo, supernodeCanvas); + // console.log("Act = " + JSON.stringify(actualUndo, null, 2)); + expect(isEqual(JSON.stringify(test8ExpectedUndoFlow), JSON.stringify(actualUndo))).to.be.true; + canvasController.contextMenuActionHandler("redo"); expect(isEqual(JSON.stringify(test8ExpectedFlow), JSON.stringify(pipelineFlow))).to.be.true; @@ -2061,7 +2086,7 @@ function removeGeneratedLinkIds(firstPipelineFlow, secondPipelineFlow) { pipeline.app_data.ui_data.comments.forEach((comment) => { if (comment.associated_id_refs) { comment.associated_id_refs.forEach((link) => { - if (findCommentLinkInSecondPipelineFlow(link.id, secondPipelineFlow)) { + if (!findCommentLinkInSecondPipelineFlow(link.id, secondPipelineFlow)) { delete link.id; } }); diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/startPipelineFlow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/startPipelineFlow.json index 810b821933..47c23f1618 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/startPipelineFlow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/startPipelineFlow.json @@ -398,18 +398,22 @@ "content": "The 4 different node types", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDSuperNodePE", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-flow.json index b2a0248a89..a80901fc69 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-flow.json @@ -823,14 +823,17 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -1514,6 +1517,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-undo-flow.json index cd9dd34d8c..a287233e50 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test1-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-flow.json index 227d36b903..f9e549fe5e 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-flow.json @@ -816,14 +816,17 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -1517,6 +1520,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-undo-flow.json index 84d4d85e0a..047c4173a8 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test2-expected-undo-flow.json @@ -864,18 +864,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-flow.json index 2116a0eda6..a3e138692d 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-flow.json @@ -805,6 +805,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } @@ -1521,10 +1522,12 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-undo-flow.json index 937780c867..4dd1060ea7 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test3-expected-undo-flow.json @@ -874,6 +874,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } @@ -889,18 +890,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-flow.json index c659ccdf0f..224c60df07 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-flow.json @@ -820,14 +820,17 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -843,6 +846,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-undo-flow.json index 5efbab81e0..21699481c3 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test4-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-flow.json index 2cdff13771..9950d27ab5 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-flow.json @@ -743,10 +743,12 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } @@ -762,6 +764,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-undo-flow.json index 2c4822e8bc..aadf721f01 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test5-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-flow.json index bc2521082f..9f5efbafed 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-flow.json @@ -737,10 +737,12 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } @@ -756,6 +758,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-undo-flow.json index 9121fbf3d0..8cad817778 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test6-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-flow.json index 4e98bee047..e1b934811d 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-flow.json @@ -732,18 +732,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -759,6 +763,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-undo-flow.json index 8716ad9c19..5f886f87c1 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test7-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-flow.json index 78408daaca..1d1f69ead0 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-flow.json @@ -743,18 +743,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -770,6 +774,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-undo-flow.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-undo-flow.json index 2d1a740049..c1bbe3361c 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-undo-flow.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernode-test8-expected-undo-flow.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/common-canvas/__tests__/test_resources/json/supernodeWithoutSubPipeline.json b/canvas_modules/common-canvas/__tests__/test_resources/json/supernodeWithoutSubPipeline.json index e6f93a88b0..2f40e5bf0a 100644 --- a/canvas_modules/common-canvas/__tests__/test_resources/json/supernodeWithoutSubPipeline.json +++ b/canvas_modules/common-canvas/__tests__/test_resources/json/supernodeWithoutSubPipeline.json @@ -409,18 +409,22 @@ "content": "The 4 different node types", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDSuperNodePE", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/common-canvas/src/object-model/pipeline-out-handler.js b/canvas_modules/common-canvas/src/object-model/pipeline-out-handler.js index 826443bee2..aaf2d2820a 100644 --- a/canvas_modules/common-canvas/src/object-model/pipeline-out-handler.js +++ b/canvas_modules/common-canvas/src/object-model/pipeline-out-handler.js @@ -365,7 +365,7 @@ export default class PipelineOutHandler { canvasInfoLinks.forEach((link) => { if (link.type === "commentLink" && link.srcNodeId === commentId) { - const newLink = { node_ref: link.trgNodeId }; + const newLink = { id: link.id, node_ref: link.trgNodeId }; if (link.class_name) { newLink.class_name = link.class_name; } diff --git a/canvas_modules/harness/cypress/integration/canvas/clipboard.js b/canvas_modules/harness/cypress/integration/canvas/clipboard.js index b742ccd2c0..8a46e4aca1 100644 --- a/canvas_modules/harness/cypress/integration/canvas/clipboard.js +++ b/canvas_modules/harness/cypress/integration/canvas/clipboard.js @@ -158,6 +158,8 @@ describe("Test clipboard with no link selection enabled", function() { it("Test cutting some nodes and a comment and paste to canvas using keyboard", function() { // Validate there are 8 links on the canvas cy.verifyNumberOfLinks(8); + cy.verifyNumberOfPortDataLinks(5); + cy.verifyNumberOfCommentLinks(3); // I ctrl/cmd click the comment with text " comment 1" to select it cy.ctrlOrCmdClickComment(" comment 1"); @@ -173,8 +175,11 @@ describe("Test clipboard with no link selection enabled", function() { cy.verifyNumberOfNodes(6); cy.verifyNumberOfComments(3); + // There are 7 links because a data link has disappeared during the cut and paste cy.verifyNumberOfLinks(7); + cy.verifyNumberOfPortDataLinks(4); + cy.verifyNumberOfCommentLinks(3); }); it("Test copying some nodes and a comment and paste to canvas using keyboard", function() { diff --git a/canvas_modules/harness/cypress/support/canvas/verification-cmds.js b/canvas_modules/harness/cypress/support/canvas/verification-cmds.js index 99e7ce5864..491c1b4c89 100644 --- a/canvas_modules/harness/cypress/support/canvas/verification-cmds.js +++ b/canvas_modules/harness/cypress/support/canvas/verification-cmds.js @@ -354,24 +354,6 @@ Cypress.Commands.add("verifyNumberOfNodesInExtraCanvas", (noOfNodes) => { }); }); -Cypress.Commands.add("verifyNumberOfPortDataLinks", (noOfLinks) => { - cy.get("body").then(($body) => { - if ($body.find(dataLinkSelector).length) { - cy.document().then((doc) => { - cy.get(dataLinkSelector).should("have.length", noOfLinks); - }); - } else { - // No Port Data Links found on canvas - expect(0).equal(noOfLinks); - } - }); - - // verify the number of port-links in the internal object model - cy.getPipeline().then((pipeline) => { - cy.getCountDataLinks(pipeline).should("eq", noOfLinks); - }); -}); - Cypress.Commands.add("verifyNumberOfComments", (noOfComments) => { cy.get("body").then(($body) => { if ($body.find(".d3-comment-group").length) { @@ -412,6 +394,24 @@ Cypress.Commands.add("verifyNumberOfLinks", (noOfLinks) => { }); }); +Cypress.Commands.add("verifyNumberOfPortDataLinks", (noOfLinks) => { + cy.get("body").then(($body) => { + if ($body.find(dataLinkSelector).length) { + cy.document().then((doc) => { + cy.get(dataLinkSelector).should("have.length", noOfLinks); + }); + } else { + // No Port Data Links found on canvas + expect(0).equal(noOfLinks); + } + }); + + // verify the number of port-links in the internal object model + cy.getPipeline().then((pipeline) => { + cy.getCountDataLinks(pipeline).should("eq", noOfLinks); + }); +}); + Cypress.Commands.add("verifyNumberOfCommentLinks", (noOfCommentLinks) => { cy.get("body").then(($body) => { if ($body.find(commentLinkSelector).length) { diff --git a/canvas_modules/harness/test_resources/diagrams/allTypesCanvas.json b/canvas_modules/harness/test_resources/diagrams/allTypesCanvas.json index 1dc6a82c9d..271159885e 100644 --- a/canvas_modules/harness/test_resources/diagrams/allTypesCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/allTypesCanvas.json @@ -464,18 +464,22 @@ "content": "The 4 different node types", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "|:;<,>.9?/`~!@#$%^&*()_+=-{}][", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDSuperNodePE", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/bigCanvas.json b/canvas_modules/harness/test_resources/diagrams/bigCanvas.json index 120185e47a..6ec986e7cf 100644 --- a/canvas_modules/harness/test_resources/diagrams/bigCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/bigCanvas.json @@ -5300,6 +5300,7 @@ "content": " comment 1", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id2PZSCTRPRIJ", "class_name": "canvas-comment-link" } @@ -5315,10 +5316,12 @@ "content": " comment 2", "associated_id_refs": [ { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "id5KIRGGJ3FYT", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } @@ -5344,10 +5347,12 @@ "content": " Special comment", "associated_id_refs": [ { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "22c42be1-ae33-45f8-8f31-e0097b44aec8", "class_name": "canvas-comment-link" }, { + "id": "ccd45623-c056-1234-a6a1-9072619c11123", "node_ref": "c7c0d91f-0680-47e1-ad2d-21d3b3c91747", "class_name": "canvas-comment-link" } @@ -5363,14 +5368,17 @@ "content": " Up and down comment", "associated_id_refs": [ { + "id": "ddd86023-5634-df34-3295-16743ad456", "node_ref": "f442f3d1-d9fc-4dff-bfea-4deb01ce4e29", "class_name": "canvas-comment-link" }, { + "id": "345df528-ae56-67a3-fad6-ad765af98bc", "node_ref": "3c324fc4-f0a8-4b92-9fd2-a6e457db84e9", "class_name": "canvas-comment-link" }, { + "id": "123f528-6354-7643-8754-983cbda873", "node_ref": "7b17a32d-035f-484f-9eb5-1036f407ecf0", "class_name": "canvas-comment-link" } @@ -5386,14 +5394,17 @@ "content": " Inside Comment", "associated_id_refs": [ { + "id": "adbd64575-2111-2222-3333-4a4d4f454", "node_ref": "79059d92-54bc-4545-ba5d-59954a81910a", "class_name": "canvas-comment-link" }, { + "id": "7dabc73-cdd8-53ad-708c-6abcd78ee", "node_ref": "1b6f34d4-40bf-426d-88fb-7a0b206b4fb4", "class_name": "canvas-comment-link" }, { + "id": "cde567aaa-bc56-3ad7-43ad-65382adef", "node_ref": "c91a4724-91fe-435e-a077-9c4100b95043", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/commentColorCanvas.json b/canvas_modules/harness/test_resources/diagrams/commentColorCanvas.json index 5cffa878e5..c0293fa5c4 100644 --- a/canvas_modules/harness/test_resources/diagrams/commentColorCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/commentColorCanvas.json @@ -287,6 +287,7 @@ "content": " comment 1", "associated_id_refs": [ { + "id": "aa86d345-7834-a345-dfe3-36892ae73bc", "node_ref": "id2PZSCTRPRIJ", "class_name": "canvas-comment-link" } @@ -302,10 +303,12 @@ "content": " comment 2", "associated_id_refs": [ { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id5KIRGGJ3FYT", "class_name": "canvas-comment-link" }, { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/decoratorCanvas.json b/canvas_modules/harness/test_resources/diagrams/decoratorCanvas.json index 5eeaf6794d..df5ad0ecd4 100644 --- a/canvas_modules/harness/test_resources/diagrams/decoratorCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/decoratorCanvas.json @@ -621,6 +621,7 @@ "content": " This node does not have any decorators.", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id1222222222", "class_name": "canvas-comment-link" } @@ -636,10 +637,12 @@ "content": "These two nodes have decorators that are hot spots. Clicking them should output a decorationHandler() message to the test harness console.", "associated_id_refs": [ { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "id1ZZTZ3ZMYWL", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } @@ -655,10 +658,12 @@ "content": " These two nodes have view only decorators", "associated_id_refs": [ { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "1234adf2-cd45-7d34-3478-af67sdfe87", "node_ref": "id2PZSCTRPRIJ", "class_name": "canvas-comment-link" } @@ -674,6 +679,7 @@ "content": " This node shows a decorator with a zoom-in image and a yellow background rectangle.", "associated_id_refs": [ { + "id": "6df87f66234-672d-bbbb-aaaa-abcd5642d", "node_ref": "id125111111", "class_name": "canvas-comment-link" } @@ -689,6 +695,7 @@ "content": "This node has a decorator at a custom position of x = -10 y = -10", "associated_id_refs": [ { + "id": "68dae98f-78ef-a4527-7823-abfe89d78d", "node_ref": "idABCD12345CT", "class_name": "d3-comment-link" } @@ -704,6 +711,7 @@ "content": "This node has two label decorators", "associated_id_refs": [ { + "id": "67de892-1234-5678-90ad-7d9a3c7b9", "node_ref": "idSGTRD12345XX", "class_name": "d3-comment-link" } @@ -719,6 +727,7 @@ "content": "This node should show 9 rectangle decorators each positioned at 0,0 offset from the 9 'anchor' points around the node.", "associated_id_refs": [ { + "id": "6542960ae-ad47-902d-2378-894def90", "node_ref": "d4b70f12-a42b-4f86-ba81-70c39cb61f7d", "class_name": "d3-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/detachedLinksCanvas.json b/canvas_modules/harness/test_resources/diagrams/detachedLinksCanvas.json index b2c3fa60e1..15dbe9933a 100644 --- a/canvas_modules/harness/test_resources/diagrams/detachedLinksCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/detachedLinksCanvas.json @@ -461,18 +461,22 @@ "content": "Comment attached to 4 nodes", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "excution-node-id", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDSuperNodePE", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/linkColorCanvas.json b/canvas_modules/harness/test_resources/diagrams/linkColorCanvas.json index 1a876be521..a9341f989e 100644 --- a/canvas_modules/harness/test_resources/diagrams/linkColorCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/linkColorCanvas.json @@ -392,10 +392,12 @@ "content": "The link between these nodes should be blue", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "446eee1d-60bc-4f76-a6bd-bc8e38ba7a82", "class_name": "d3-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "446eee1d-60bc-4f76-a6bd-125TTEEIK7V", "class_name": "d3-comment-link" } @@ -411,10 +413,12 @@ "content": "The link between these nodes should be green", "associated_id_refs": [ { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "4d7f3bdc-12e1-4dea-8b98-ee70209a8ede", "class_name": "d3-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "446eee1d-60bc-4f76-a6bd-bc8e38ba7a82", "class_name": "d3-comment-link" } @@ -430,10 +434,12 @@ "content": "The link between these nodes should be yellow", "associated_id_refs": [ { + "id": "bbbbbbbbb-aaaa-1234-3456-1234567", "node_ref": "e359d2f2-8d25-4eae-9f3d-18c46fe7cc13", "class_name": "d3-comment-link" }, { + "id": "ea45ed78-53bc-cacac-ffff-2355566", "node_ref": "0a4f1e7b-560c-4efc-ad59-90be91983ff4", "class_name": "d3-comment-link" } @@ -449,10 +455,12 @@ "content": "The link between these nodes should be red", "associated_id_refs": [ { + "id": "aaaaaaa-bbbb-cccc-dddd-eeeee", "node_ref": "0a4f1e7b-560c-4efc-ad59-90be91983ff4", "class_name": "d3-comment-link" }, { + "id": "111111-2222-3333-4444-5555555", "node_ref": "ab18d0ed-2d7f-4ccd-96b1-c23903c52c15", "class_name": "d3-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/multiPortsCanvas.json b/canvas_modules/harness/test_resources/diagrams/multiPortsCanvas.json index d7a073c80d..fc7f102932 100644 --- a/canvas_modules/harness/test_resources/diagrams/multiPortsCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/multiPortsCanvas.json @@ -363,10 +363,12 @@ "content": " This should link to port 2 on Na_to_K", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id6PXRG57DGIV", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "id2PZSCTRPRIJ", "class_name": "canvas-comment-link" } @@ -382,10 +384,12 @@ "content": " This should link port 2 on Discard Fields to port 2 on Define Types", "associated_id_refs": [ { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "id5RYSYN9CV1H", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/pipelineFlowExample.json b/canvas_modules/harness/test_resources/diagrams/pipelineFlowExample.json index 76b403c8e4..9028f2c7a4 100644 --- a/canvas_modules/harness/test_resources/diagrams/pipelineFlowExample.json +++ b/canvas_modules/harness/test_resources/diagrams/pipelineFlowExample.json @@ -475,10 +475,12 @@ "content": "This is sample comment should be linked to two nodes.", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "nodeID2PE", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "nodeID3PE", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/robWoodsCanvas.json b/canvas_modules/harness/test_resources/diagrams/robWoodsCanvas.json index eea7037b41..9ca4013aac 100644 --- a/canvas_modules/harness/test_resources/diagrams/robWoodsCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/robWoodsCanvas.json @@ -5772,6 +5772,7 @@ "content": "", "associated_id_refs": [ { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id7KBTL695D5M", "class_name": "canvas-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/stylesCanvas.json b/canvas_modules/harness/test_resources/diagrams/stylesCanvas.json index 7c3a9e12ab..438bf1a1b1 100644 --- a/canvas_modules/harness/test_resources/diagrams/stylesCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/stylesCanvas.json @@ -444,6 +444,7 @@ "content": "These nodes should have a dark sea green fill and forest green outline and dark cyan text. \n\nOn hover, they should have deep sky blue fill and a dodger blue outline with a royal blue selection highlight.\n\nThe line to the Binding node is orange/red and is 3px width and on hover becomes blue/violet.\n\nThe line between the binding node and execution node is hot pink and on hover become purple.", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link", "style": { @@ -454,6 +455,7 @@ } }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDSuperNodePE", "class_name": "d3-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/supernodeCanvas.json b/canvas_modules/harness/test_resources/diagrams/supernodeCanvas.json index a73f667842..9cbeae68b3 100644 --- a/canvas_modules/harness/test_resources/diagrams/supernodeCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/supernodeCanvas.json @@ -874,18 +874,22 @@ "content": "Connected to 4 nodes\n", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "id8I6RH2V91XW", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" }, { + "id": "307b36cc-4058-41b5-9840-7ed01740023c", "node_ref": "nodeIDMultiPlotPE", "class_name": "d3-comment-link" } @@ -901,6 +905,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "aaee5567d-aaaa-bbbb-ccccc-d5d6d7d8d7", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" } diff --git a/canvas_modules/harness/test_resources/diagrams/supernodeNestedCanvas.json b/canvas_modules/harness/test_resources/diagrams/supernodeNestedCanvas.json index f362795111..dd2cea3deb 100644 --- a/canvas_modules/harness/test_resources/diagrams/supernodeNestedCanvas.json +++ b/canvas_modules/harness/test_resources/diagrams/supernodeNestedCanvas.json @@ -859,10 +859,12 @@ "content": "Connected to nodes", "associated_id_refs": [ { + "id": "3b54f984-ab32-4da0-8a5a-41e3dba5dde3", "node_ref": "idGWRVT47XDV", "class_name": "canvas-comment-link" }, { + "id": "eaa87bbf-0a30-47df-bda1-da154c566dfb", "node_ref": "id125TTEEIK7V", "class_name": "canvas-comment-link" } @@ -1828,6 +1830,7 @@ "content": "This is connected to the select node", "associated_id_refs": [ { + "id": "bbf2f832-b096-471d-a6a1-9072619f1747", "node_ref": "6f704d84-85be-4520-9d76-57fe2295b310", "class_name": "d3-comment-link" }