2022-03-02 21:02:51 +01:00
|
|
|
import * as path from "path"
|
2022-01-04 22:02:25 +01:00
|
|
|
import { describe, test } from "./baseFixture"
|
|
|
|
|
2022-02-15 22:51:42 +01:00
|
|
|
function runTestExtensionTests() {
|
2022-01-04 22:02:25 +01:00
|
|
|
// This will only work if the test extension is loaded into code-server.
|
|
|
|
test("should have access to VSCODE_PROXY_URI", async ({ codeServerPage }) => {
|
|
|
|
const address = await codeServerPage.address()
|
|
|
|
|
|
|
|
await codeServerPage.executeCommandViaMenus("code-server: Get proxy URI")
|
|
|
|
|
2022-02-15 22:15:53 +01:00
|
|
|
await codeServerPage.page.waitForSelector(`text=${address}/proxy/{{port}}`)
|
2022-01-04 22:02:25 +01:00
|
|
|
})
|
2022-02-15 22:51:42 +01:00
|
|
|
}
|
|
|
|
|
2022-03-02 21:02:51 +01:00
|
|
|
const flags = ["--extensions-dir", path.join(__dirname, "./extensions")]
|
|
|
|
|
|
|
|
describe("Extensions", true, flags, {}, () => {
|
2022-02-15 22:51:42 +01:00
|
|
|
runTestExtensionTests()
|
|
|
|
})
|
|
|
|
|
2022-03-02 21:02:51 +01:00
|
|
|
describe("Extensions with --cert", true, [...flags, "--cert"], {}, () => {
|
2022-02-15 22:51:42 +01:00
|
|
|
runTestExtensionTests()
|
2022-01-04 22:02:25 +01:00
|
|
|
})
|