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,8 +667,29 @@ export default class CodeGraph extends BasePage {
667667 await this . page . mouse . move ( centerX , centerY ) ;
668668 }
669669
670- async getTooltipVisibility ( ) : Promise < string > {
671- return await this . nodeToolTip . evaluate ( el => getComputedStyle ( el ) . visibility ) ;
670+ async isNodeToolTipVisible ( ) : Promise < boolean > {
671+ try {
672+ const count = await this . nodeToolTip . count ( ) ;
673+ if ( count === 0 ) {
674+ console . error ( "Tooltip not found" ) ;
675+ return false ;
676+ }
677+
678+ const box = await this . nodeToolTip . boundingBox ( ) ;
679+ if ( box && box . width > 0 && box . height > 0 ) {
680+ return true ;
681+ }
682+
683+ return await this . nodeToolTip . evaluate ( el => {
684+ const style = getComputedStyle ( el ) ;
685+ return style . visibility === 'visible' && parseFloat ( style . opacity ) > 0 ;
686+ } ) ;
687+ } catch ( error ) {
688+ console . error ( "Tooltip visibility check failed:" , error ) ;
689+ return false ;
690+ }
672691 }
673692
693+
694+
674695}
You can’t perform that action at this time.
0 commit comments