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", () => {
36
36
expect ( await page . isVisible ( "#terminal" ) ) . toBe ( true )
37
37
} )
38
38
39
- test . only ( "should open a file with quickOpen" , options , async ( { page } ) => {
39
+ test ( "should open a file with quickOpen" , options , async ( { page } ) => {
40
40
await codeServer . openFolder ( )
41
41
await codeServer . quickOpen ( "extensions.json" )
42
42
// 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 {
33
33
34
34
/**
35
35
* Toggles the integrated terminal if not already in view
36
+ * and focuses it
36
37
*/
37
38
async viewTerminal ( ) {
38
39
// Check if Terminal is already in view
39
40
const isTerminalInView = await this . page . isVisible ( "#terminal" )
40
41
41
42
if ( ! isTerminalInView ) {
42
43
// Open using default keyboard shortcut
43
- await this . page . keyboard . press ( "Control+Backquote" )
44
+ await this . focusTerminal ( )
44
45
await this . page . waitForSelector ( "#terminal" )
45
46
}
46
47
}
47
48
49
+ async focusTerminal ( ) {
50
+ await this . page . keyboard . press ( "Control+Backquote" )
51
+ }
52
+
48
53
async quickOpen ( input : string ) {
49
54
await this . page . keyboard . press ( "Meta+P" )
50
55
await this . page . waitForSelector ( '[aria-describedby="quickInput_message"]' )
51
56
await this . page . keyboard . type ( input )
57
+ await this . page . waitForTimeout ( 2000 )
52
58
await this . page . keyboard . press ( "Enter" )
59
+ await this . page . waitForTimeout ( 2000 )
53
60
}
54
61
}
You can’t perform that action at this time.
0 commit comments