File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as path from "path"
2+ import { getMaybeProxiedCodeServer } from "../utils/helpers"
3+ import { describe , test , expect } from "./baseFixture"
4+
5+ // TODO@jsjoeio - account for proxy
6+
7+ const flags = [ "--extensions-dir" , path . join ( __dirname , "./extensions" ) ]
8+ describe ( "asExternalUri" , flags , { } , ( ) => {
9+ test ( "should use /proxy/port" , async ( { codeServerPage } ) => {
10+ // Given
11+ const port = "3000"
12+ const input = `http://localhost:${ port } `
13+ const address = await getMaybeProxiedCodeServer ( codeServerPage )
14+ const expected = `${ address } /proxy/${ port } `
15+
16+ // When
17+ await codeServerPage . waitForTestExtensionLoaded ( )
18+ await codeServerPage . executeCommandViaMenus ( "code-server: asExternalUri test" )
19+ await codeServerPage . page . type ( ".quick-input-widget" , input )
20+ await codeServerPage . page . keyboard . press ( "Enter" )
21+
22+ // Then
23+ const text = await codeServerPage . page . locator ( "text=output" ) . first ( ) . textContent ( )
24+ expect ( text ) . toBe ( `Info: input: ${ input } output: ${ expected } ` )
25+ } )
26+ } )
You can’t perform that action at this time.
0 commit comments