2022-03-03 04:02:51 +08:00
|
|
|
import * as path from "path"
|
2022-01-05 05:02:25 +08:00
|
|
|
import { describe, test } from "./baseFixture"
|
|
|
|
|
2022-02-16 05:51:42 +08:00
|
|
|
function runTestExtensionTests() {
|
2022-01-05 05:02:25 +08: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-16 05:15:53 +08:00
|
|
|
await codeServerPage.page.waitForSelector(`text=${address}/proxy/{{port}}`)
|
2022-01-05 05:02:25 +08:00
|
|
|
})
|
2022-02-16 05:51:42 +08:00
|
|
|
}
|
|
|
|
|
2022-03-03 04:02:51 +08:00
|
|
|
const flags = ["--extensions-dir", path.join(__dirname, "./extensions")]
|
|
|
|
|
|
|
|
describe("Extensions", true, flags, {}, () => {
|
2022-02-16 05:51:42 +08:00
|
|
|
runTestExtensionTests()
|
|
|
|
})
|
|
|
|
|
2022-03-03 04:02:51 +08:00
|
|
|
describe("Extensions with --cert", true, [...flags, "--cert"], {}, () => {
|
2022-02-16 05:51:42 +08:00
|
|
|
runTestExtensionTests()
|
2022-01-05 05:02:25 +08:00
|
|
|
})
|