* Navigate to a code-server endpoint (root by default). Then wait for the * editor to become available.
(endpoint = "/")
| 300 | * editor to become available. |
| 301 | */ |
| 302 | async navigate(endpoint = "/") { |
| 303 | const address = await getMaybeProxiedCodeServer(this.codeServer) |
| 304 | const noramlizedUrl = normalize(address + endpoint, true) |
| 305 | const to = new URL(noramlizedUrl) |
| 306 | |
| 307 | this.codeServer.logger.info(`navigating to ${to}`) |
| 308 | await this.page.goto(to.toString()) |
| 309 | |
| 310 | // Only reload editor if auth is not enabled. Otherwise we'll get stuck |
| 311 | // reloading the login page. |
| 312 | if (!this.codeServer.authEnabled()) { |
| 313 | await this.reloadUntilEditorIsReady() |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Checks if the editor is visible |
no test coverage detected