diff --git a/e2e_tests/integration/viz.spec.ts b/e2e_tests/integration/viz.spec.ts index 54449505e67..f16340165b8 100644 --- a/e2e_tests/integration/viz.spec.ts +++ b/e2e_tests/integration/viz.spec.ts @@ -248,7 +248,9 @@ describe('Viz rendering', () => { parseSpecialCharSequences: false }) - cy.get('#svg-vis').dblclick('center', { force: true }) + cy.get('[data-testid="graphCanvas"]') + .trigger('click', 200, 200, { force: true }) + .trigger('dblclick', 200, 200, { force: true }) cy.get('[data-testid="vizInspector"]', { timeout: 5000 }).contains( 'Undefined' diff --git a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/GraphEventHandlerModel.ts b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/GraphEventHandlerModel.ts index 76f493a8538..0e0a576c3a7 100644 --- a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/GraphEventHandlerModel.ts +++ b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/GraphEventHandlerModel.ts @@ -249,6 +249,7 @@ export class GraphEventHandlerModel { updateRelationships: true, restartSimulation: true }) + this.graphModelChanged() // this will persist node to Neo4J DB... this.onGraphInteraction(NODE_ON_CANVAS_CREATE, { diff --git a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts index 22cb391f21b..7b8d343d153 100644 --- a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts +++ b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/visualization/Visualization.ts @@ -101,6 +101,7 @@ export class Visualization { .attr('width', '100%') .attr('height', '100%') .attr('transform', 'scale(1)') + .attr('data-testid', 'graphCanvas') // Background click event // Check if panning is ongoing .on('click', () => {