Skip to content

Commit 5656d2b

Browse files
committed
Update nodeDetailsPanel.spec.ts
1 parent 11b8e91 commit 5656d2b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

e2e/tests/nodeDetailsPanel.spec.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,26 @@ test.describe("Node details panel tests", () => {
5959

6060

6161
test(`Validate copy functionality for node inside node details panel and verify with api`, async () => {
62-
const api = new ApiCalls();
63-
const response = await api.getProject(FLASK_GRAPH);
64-
6562
const codeGraph = await browser.createNewPage(CodeGraph, urls.baseUrl);
6663
await browser.setPageToFullScreen();
6764
await codeGraph.selectGraph(FLASK_GRAPH);
6865
const graphData = await codeGraph.getGraphNodes();
66+
const targetNode = graphData.find(node =>
67+
node.name === "root" && node.src !== undefined
68+
) || findFirstNodeWithSrc(graphData);
6969

70-
const targetNode = findFirstNodeWithSrc(graphData);
7170

7271
await new Promise(resolve => setTimeout(resolve, 2000));
7372
await codeGraph.nodeClick(targetNode.screenX, targetNode.screenY);
7473
await codeGraph.clickOnViewNode();
7574
const result = await codeGraph.clickOnCopyToClipboardNodePanelDetails();
76-
await new Promise(resolve => setTimeout(resolve, 2000));
75+
76+
const api = new ApiCalls();
77+
const response = await api.getProject(FLASK_GRAPH);
7778
const foundNode = response.result.entities.nodes.find((nod) => nod.properties?.name === targetNode.name);
78-
console.log("API Node:", foundNode);
79-
console.log("Copied Result:", result);
8079

8180
expect(foundNode?.properties.src).toBe(result);
82-
});
81+
});
8382

8483
nodes.slice(0, 2).forEach((node) => {
8584
test(`Validate view node panel keys via api for ${node.nodeName}`, async () => {

0 commit comments

Comments
 (0)