@@ -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
}
@@ -360,10 +360,12 @@ export class CodeServerPage {
360
360
* try again.
361
361
*/
362
362
const navigate = async ( ctx : Context ) => {
363
- const steps : Array < { fn : ( ) => Promise < unknown > , name : string } > = [ {
364
- fn : ( ) => this . page . waitForSelector ( `${ selector } :focus-within` ) ,
365
- name : "focus" ,
366
- } ]
363
+ const steps : Array < { fn : ( ) => Promise < unknown > ; name : string } > = [
364
+ {
365
+ fn : ( ) => this . page . waitForSelector ( `${ selector } :focus-within` ) ,
366
+ name : "focus" ,
367
+ } ,
368
+ ]
367
369
368
370
for ( const item of items ) {
369
371
// Normally these will wait for the item to be visible and then execute
@@ -373,10 +375,22 @@ export class CodeServerPage {
373
375
// if the old promise clicks logout before the new one can). By
374
376
// splitting them into two steps each we can cancel before running the
375
377
// action.
376
- steps . push ( { fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { trial : true } ) , name : `${ item } :hover:trial` } )
377
- steps . push ( { fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { force : true } ) , name : `${ item } :hover:force` } )
378
- steps . push ( { fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { trial : true } ) , name : `${ item } :click:trial` } )
379
- steps . push ( { fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { force : true } ) , name : `${ item } :click:force` } )
378
+ steps . push ( {
379
+ fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { trial : true } ) ,
380
+ name : `${ item } :hover:trial` ,
381
+ } )
382
+ steps . push ( {
383
+ fn : ( ) => this . page . hover ( `${ selector } :text("${ item } ")` , { force : true } ) ,
384
+ name : `${ item } :hover:force` ,
385
+ } )
386
+ steps . push ( {
387
+ fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { trial : true } ) ,
388
+ name : `${ item } :click:trial` ,
389
+ } )
390
+ steps . push ( {
391
+ fn : ( ) => this . page . click ( `${ selector } :text("${ item } ")` , { force : true } ) ,
392
+ name : `${ item } :click:force` ,
393
+ } )
380
394
}
381
395
382
396
for ( const step of steps ) {
0 commit comments