File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ test.describe("CodeServer", () => {
3636 expect ( await page . isVisible ( "#terminal" ) ) . toBe ( true )
3737 } )
3838
39- test . only ( "should open a file with quickOpen" , options , async ( { page } ) => {
39+ test ( "should open a file with quickOpen" , options , async ( { page } ) => {
4040 await codeServer . openFolder ( )
4141 await codeServer . quickOpen ( "extensions.json" )
4242 // If the file is open, we will see an empty array
Original file line number Diff line number Diff line change @@ -33,22 +33,29 @@ export class CodeServer {
3333
3434 /**
3535 * Toggles the integrated terminal if not already in view
36+ * and focuses it
3637 */
3738 async viewTerminal ( ) {
3839 // Check if Terminal is already in view
3940 const isTerminalInView = await this . page . isVisible ( "#terminal" )
4041
4142 if ( ! isTerminalInView ) {
4243 // Open using default keyboard shortcut
43- await this . page . keyboard . press ( "Control+Backquote" )
44+ await this . focusTerminal ( )
4445 await this . page . waitForSelector ( "#terminal" )
4546 }
4647 }
4748
49+ async focusTerminal ( ) {
50+ await this . page . keyboard . press ( "Control+Backquote" )
51+ }
52+
4853 async quickOpen ( input : string ) {
4954 await this . page . keyboard . press ( "Meta+P" )
5055 await this . page . waitForSelector ( '[aria-describedby="quickInput_message"]' )
5156 await this . page . keyboard . type ( input )
57+ await this . page . waitForTimeout ( 2000 )
5258 await this . page . keyboard . press ( "Enter" )
59+ await this . page . waitForTimeout ( 2000 )
5360 }
5461}
You can’t perform that action at this time.
0 commit comments