@@ -267,7 +267,7 @@ class Environment {
267
267
logger . error ( 'error while clicking' , err ) ;
268
268
}
269
269
}
270
- logger . info ( `clicked "${ selector } ` )
270
+ logger . info ( `clicked "${ selector } ` ) ;
271
271
}
272
272
273
273
waitForNetworkIdle ( ) {
@@ -393,25 +393,28 @@ class Environment {
393
393
// After a click on `git-node` or `git-ref`, ensure `currentActionContext` is set
394
394
async clickOnNode ( nodeSelector ) {
395
395
await this . click ( nodeSelector ) ;
396
- await this . page . waitForFunction ( ( ) => {
397
- const app = ungit . __app ;
398
- if ( ! app ) {
399
- return ;
400
- }
401
- const path = app . content ( ) ;
402
- if ( ! path || path . constructor . name !== 'PathViewModel' ) {
403
- return ;
404
- }
405
- const repository = path . repository ( ) ;
406
- if ( ! repository ) {
407
- return ;
408
- }
409
- const graph = repository . graph ;
410
- if ( ! graph ) {
411
- return ;
412
- }
413
- return graph . currentActionContext ( ) ;
414
- } , { polling : 500 } ) ;
396
+ await this . page . waitForFunction (
397
+ ( ) => {
398
+ const app = ungit . __app ;
399
+ if ( ! app ) {
400
+ return ;
401
+ }
402
+ const path = app . content ( ) ;
403
+ if ( ! path || path . constructor . name !== 'PathViewModel' ) {
404
+ return ;
405
+ }
406
+ const repository = path . repository ( ) ;
407
+ if ( ! repository ) {
408
+ return ;
409
+ }
410
+ const graph = repository . graph ;
411
+ if ( ! graph ) {
412
+ return ;
413
+ }
414
+ return graph . currentActionContext ( ) ;
415
+ } ,
416
+ { polling : 500 }
417
+ ) ;
415
418
}
416
419
417
420
// If an api call matches `apiPart` and `method` is called, set the `globalVarName`
0 commit comments