Skip to content

Commit 2ac1435

Browse files
committed
update test
1 parent 6d2d286 commit 2ac1435

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

e2e/logic/POM/codeGraph.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -667,15 +667,8 @@ export default class CodeGraph extends BasePage {
667667
await this.page.mouse.move(centerX, centerY);
668668
}
669669

670-
async isNodeToolTipVisible(): Promise<boolean> {
671-
try {
672-
await this.nodeToolTip.waitFor({ state: 'visible', timeout: 7000 });
673-
return await this.nodeToolTip.evaluate(el => getComputedStyle(el).visibility === 'visible');
674-
} catch (error) {
675-
console.error("Tooltip visibility check failed:", error);
676-
return false;
677-
}
670+
async getTooltipVisibility(): Promise<string> {
671+
return await this.nodeToolTip.evaluate(el => getComputedStyle(el).visibility);
678672
}
679673

680-
681674
}

e2e/tests/canvas.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ test.describe("Canvas tests", () => {
217217
await codeGraph.selectSearchBarOptionBtn("1");
218218
await delay(2000);
219219
await codeGraph.hoverAtCanvasCenter();
220-
expect(await codeGraph.isNodeToolTipVisible()).toBe(true);
220+
expect(await codeGraph.getTooltipVisibility()).toBe("visible");
221221
})
222222
})
223223

0 commit comments

Comments
 (0)