@@ -205,7 +205,7 @@ export class CodeServerPage {
205
205
/**
206
206
* Navigate to a code-server endpoint. By default go to the root.
207
207
*/
208
- async navigate ( path : string = "/" ) {
208
+ async navigate ( path = "/" ) {
209
209
const to = new URL ( path , await this . codeServer . address ( ) )
210
210
await this . page . goto ( to . toString ( ) , { waitUntil : "networkidle" } )
211
211
}
@@ -361,10 +361,12 @@ export class CodeServerPage {
361
361
* try again.
362
362
*/
363
363
const navigate = async ( ctx : Context ) => {
364
- const steps : Array < { fn : ( ) => Promise < unknown > , name : string } > = [ {
365
- fn : ( ) => this . page . waitForSelector ( `${ selector } :focus-within` ) ,
366
- name : "focus" ,
367
- } ]
364
+ const steps : Array < { fn : ( ) => Promise < unknown > ; name : string } > = [
365
+ {
366
+ fn : ( ) => this . page . waitForSelector ( `${ selector } :focus-within` ) ,
367
+ name : "focus" ,
368
+ } ,
369
+ ]
368
370
369
371
for ( const item of items ) {
370
372
// Normally these will wait for the item to be visible and then execute
@@ -374,10 +376,22 @@ export class CodeServerPage {
374
376
// if the old promise clicks logout before the new one can). By
375
377
// splitting them into two steps each we can cancel before running the
376
378
// action.
377
- steps . push ( { fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { trial : true } ) , name : `${ item } :hover:trial` } )
378
- steps . push ( { fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { force : true } ) , name : `${ item } :hover:force` } )
379
- steps . push ( { fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { trial : true } ) , name : `${ item } :click:trial` } )
380
- steps . push ( { fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { force : true } ) , name : `${ item } :click:force` } )
379
+ steps . push ( {
380
+ fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { trial : true } ) ,
381
+ name : `${ item } :hover:trial` ,
382
+ } )
383
+ steps . push ( {
384
+ fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { force : true } ) ,
385
+ name : `${ item } :hover:force` ,
386
+ } )
387
+ steps . push ( {
388
+ fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { trial : true } ) ,
389
+ name : `${ item } :click:trial` ,
390
+ } )
391
+ steps . push ( {
392
+ fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { force : true } ) ,
393
+ name : `${ item } :click:force` ,
394
+ } )
381
395
}
382
396
383
397
for ( const step of steps ) {
0 commit comments