diff --git a/awx/ui/src/screens/TopologyView/MeshGraph.js b/awx/ui/src/screens/TopologyView/MeshGraph.js index 90ba1ea2ed..cbe505eecf 100644 --- a/awx/ui/src/screens/TopologyView/MeshGraph.js +++ b/awx/ui/src/screens/TopologyView/MeshGraph.js @@ -161,11 +161,13 @@ function MeshGraph({ data }) { const link = svg .append('g') .attr('class', `links`) + .attr('data-cy', 'links') .selectAll('path') .data(graph.links) .enter() .append('path') .attr('class', (d, i) => `link-${i}`) + .attr('data-cy', (d) => `${d.source}-${d.target}`) .style('fill', 'none') .style('stroke', '#ccc') .style('stroke-width', '2px') @@ -177,6 +179,7 @@ function MeshGraph({ data }) { const node = svg .append('g') .attr('class', 'nodes') + .attr('data-cy', 'nodes') .selectAll('g') .data(graph.nodes) .enter() @@ -225,6 +228,7 @@ function MeshGraph({ data }) { .append('g') .selectAll('g') .attr('class', 'chart-legend') + .attr('data-cy', 'chart-legend') .data(graph.nodes) .enter() .append('circle') @@ -238,6 +242,7 @@ function MeshGraph({ data }) { svg .append('g') .attr('class', 'chart-text') + .attr('data-cy', 'chart-text') .selectAll('g') .data(graph.nodes) .enter() @@ -252,6 +257,7 @@ function MeshGraph({ data }) { .select('#chart') .append('div') .attr('class', 'd3-tooltip') + .attr('data-cy', 'd3-tooltip') .style('position', 'absolute') .style('top', '200px') .style('right', '40px')