@@ -152,6 +152,10 @@ export default class CodeGraph extends BasePage {
152152 return this . page . locator ( "//main[@data-name='main-chat']/*[last()-1]/p" ) ;
153153 }
154154
155+ private get responseLoadingImg ( ) : Locator {
156+ return this . page . locator ( "//img[@alt='Waiting for response']" ) ;
157+ }
158+
155159 /* Canvas Locators*/
156160
157161 private get canvasElement ( ) : Locator {
@@ -277,7 +281,8 @@ export default class CodeGraph extends BasePage {
277281 }
278282
279283 async getTextInLastChatElement ( ) : Promise < string > {
280- await delay ( 2500 ) ;
284+ await this . page . waitForSelector ( 'img[alt="Waiting for response"]' , { state : 'hidden' } ) ;
285+ await delay ( 2000 ) ;
281286 return ( await this . lastElementInChat . textContent ( ) ) ! ;
282287 }
283288
@@ -349,6 +354,7 @@ export default class CodeGraph extends BasePage {
349354 await this . selectGraphInComboBoxByName ( graph ) . waitFor ( { state : 'visible' } )
350355 await this . selectGraphInComboBoxByName ( graph ) . click ( ) ;
351356 }
357+ await delay ( 2000 ) ; // graph animation delay
352358 }
353359
354360 async createProject ( url : string ) : Promise < void > {
@@ -417,7 +423,7 @@ export default class CodeGraph extends BasePage {
417423
418424 async nodeClick ( x : number , y : number ) : Promise < void > {
419425 await this . canvasElement . hover ( { position : { x, y } } ) ;
420- await this . canvasElement . click ( { position : { x, y } } ) ;
426+ await this . canvasElement . click ( { position : { x, y } , button : 'right' } ) ;
421427 }
422428
423429 async selectCodeGraphCheckbox ( checkbox : string ) : Promise < void > {
0 commit comments