1
1
import * as path from "path"
2
- import { describe , test } from "./baseFixture"
2
+ import { test as base } from "@playwright/test"
3
+ import { describe , test , expect } from "./baseFixture"
3
4
4
5
function runTestExtensionTests ( ) {
5
6
// This will only work if the test extension is loaded into code-server.
@@ -8,7 +9,10 @@ function runTestExtensionTests() {
8
9
9
10
await codeServerPage . executeCommandViaMenus ( "code-server: Get proxy URI" )
10
11
11
- await codeServerPage . page . waitForSelector ( `text=${ address } /proxy/{{port}}` )
12
+ const text = await codeServerPage . page . locator ( ".notification-list-item-message" ) . textContent ( )
13
+ // Remove end slash in address
14
+ const normalizedAddress = address . replace ( / \/ + $ / , "" )
15
+ expect ( text ) . toBe ( `${ normalizedAddress } /proxy/{{port}}` )
12
16
} )
13
17
}
14
18
@@ -18,6 +22,14 @@ describe("Extensions", flags, {}, () => {
18
22
runTestExtensionTests ( )
19
23
} )
20
24
21
- describe ( "Extensions with --cert" , [ ...flags , "--cert" ] , { } , ( ) => {
22
- runTestExtensionTests ( )
23
- } )
25
+ if ( process . env . USE_PROXY !== "1" ) {
26
+ describe ( "Extensions with --cert" , [ ...flags , "--cert" ] , { } , ( ) => {
27
+ runTestExtensionTests ( )
28
+ } )
29
+ } else {
30
+ base . describe ( "Extensions with --cert" , ( ) => {
31
+ base . skip ( "skipped because USE_PROXY is set" , ( ) => {
32
+ // Playwright will not show this without a function.
33
+ } )
34
+ } )
35
+ }
0 commit comments