File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments