File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ export class CodeServer {
63
63
const isTerminalVisible = await this . page . isVisible ( "#terminal" )
64
64
if ( isTerminalVisible ) {
65
65
await this . page . keyboard . press ( `Control+Backquote` )
66
+ // Wait for terminal to receive focus
67
+ await this . page . waitForSelector ( "div.terminal.xterm.focus" )
68
+ // Sometimes the terminal reloads
69
+ // which is why we wait for it twice
70
+ await this . page . waitForSelector ( "div.terminal.xterm.focus" )
66
71
return
67
72
}
68
73
// Open using the manu
@@ -76,6 +81,14 @@ export class CodeServer {
76
81
// Click text=Terminal
77
82
await this . page . hover ( "text=Terminal" )
78
83
await this . page . click ( "text=Terminal" )
84
+
85
+ // Wait for terminal to receive focus
86
+ // Sometimes the terminal reloads once or twice
87
+ // which is why we wati for it to have the focus class
88
+ await this . page . waitForSelector ( "div.terminal.xterm.focus" )
89
+ // Sometimes the terminal reloads
90
+ // which is why we wait for it twice
91
+ await this . page . waitForSelector ( "div.terminal.xterm.focus" )
79
92
}
80
93
81
94
/**
You can’t perform that action at this time.
0 commit comments