feat(e2e): add support running behind proxy (#5348)
* docs: update maintaining * chore(e2e): add maxFailures to playwright * fix(ci): skip submodule in e2e job We don't need the submodules for the e2e job. This will speed up the checkout step. * feat(ci): add test-e2e-proxy job This adds a new job to CI to run our tests behind Caddy and simulate code-server running against a reverse-proxy. * refactor: make e2e work with reverse proxy This refactors the e2e test in a couple ways: - remove setting cookie in localStorage (instead we pass --auth none) - refactor address() method to account for reverse proxy logic * Update test/e2e/models/CodeServer.ts * Update test/playwright.config.ts * Update test/utils/constants.ts Co-authored-by: Asher <ash@coder.com> * Update test/utils/helpers.ts Co-authored-by: Asher <ash@coder.com> Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
@ -2,7 +2,7 @@ import { test as base } from "@playwright/test"
|
||||
import { describe, expect, test } from "./baseFixture"
|
||||
|
||||
if (process.env.GITHUB_TOKEN) {
|
||||
describe("GitHub token", true, [], {}, () => {
|
||||
describe("GitHub token", [], {}, () => {
|
||||
test("should be logged in to pull requests extension", async ({ codeServerPage }) => {
|
||||
await codeServerPage.exec("git init")
|
||||
await codeServerPage.exec("git remote add origin https://github.com/coder/code-server")
|
||||
@ -16,7 +16,7 @@ if (process.env.GITHUB_TOKEN) {
|
||||
})
|
||||
})
|
||||
|
||||
describe("No GitHub token", true, [], { GITHUB_TOKEN: "" }, () => {
|
||||
describe("No GitHub token", [], { GITHUB_TOKEN: "" }, () => {
|
||||
test("should not be logged in to pull requests extension", async ({ codeServerPage }) => {
|
||||
await codeServerPage.exec("git init")
|
||||
await codeServerPage.exec("git remote add origin https://github.com/coder/code-server")
|
||||
|
Reference in New Issue
Block a user