Skip to content

Commit c827095

Browse files
committed
refactor: add args to describe e2e fn
1 parent ab56088 commit c827095

8 files changed

+8
-8
lines changed

test/e2e/baseFixture.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { CodeServer, CodeServerPage } from "./models/CodeServer"
99
*
1010
* If `includeCredentials` is `true` page requests will be authenticated.
1111
*/
12-
export const describe = (name: string, includeCredentials: boolean, fn: (codeServer: CodeServer) => void) => {
12+
export const describe = (name: string, includeCredentials: boolean, codeServerArgs: string[], fn: (codeServer: CodeServer) => void) => {
1313
test.describe(name, () => {
1414
// This will spawn on demand so nothing is necessary on before.
1515
const codeServer = new CodeServer(name)

test/e2e/codeServer.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test, expect } from "./baseFixture"
22

3-
describe("CodeServer", true, () => {
3+
describe("CodeServer", true, [], () => {
44
test("should navigate to home page", async ({ codeServerPage }) => {
55
// We navigate codeServer before each test
66
// and we start the test with a storage state

test/e2e/extensions.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test } from "./baseFixture"
22

3-
describe("Extensions", true, () => {
3+
describe("Extensions", true, [], () => {
44
// This will only work if the test extension is loaded into code-server.
55
test("should have access to VSCODE_PROXY_URI", async ({ codeServerPage }) => {
66
const address = await codeServerPage.address()

test/e2e/globalSetup.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, test, expect } from "./baseFixture"
22

33
// This test is to make sure the globalSetup works as expected
44
// meaning globalSetup ran and stored the storageState
5-
describe("globalSetup", true, () => {
5+
describe("globalSetup", true, [], () => {
66
test("should keep us logged in using the storageState", async ({ codeServerPage }) => {
77
// Make sure the editor actually loaded
88
expect(await codeServerPage.isEditorVisible()).toBe(true)

test/e2e/login.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PASSWORD } from "../utils/constants"
22
import { describe, test, expect } from "./baseFixture"
33

4-
describe("login", false, () => {
4+
describe("login", false, [], () => {
55
test("should see the login page", async ({ codeServerPage }) => {
66
// It should send us to the login page
77
expect(await codeServerPage.page.title()).toBe("code-server login")

test/e2e/logout.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// NOTE@jsjoeio commenting out until we can figure out what's wrong
22
// import { describe, test, expect } from "./baseFixture"
33

4-
// describe("logout", true, () => {
4+
// describe("logout", true, [], () => {
55
// test("should be able logout", async ({ codeServerPage }) => {
66
// // Recommended by Playwright for async navigation
77
// // https://github.com/microsoft/playwright/issues/1987#issuecomment-620182151

test/e2e/openHelpAbout.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test, expect } from "./baseFixture"
22

3-
describe("Open Help > About", true, () => {
3+
describe("Open Help > About", true, [], () => {
44
test("should see code-server version in about dialog", async ({ codeServerPage }) => {
55
// Open using the menu.
66
await codeServerPage.navigateMenus(["Help", "About"])

test/e2e/terminal.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import util from "util"
44
import { clean, tmpdir } from "../utils/helpers"
55
import { describe, expect, test } from "./baseFixture"
66

7-
describe("Integrated Terminal", true, () => {
7+
describe("Integrated Terminal", true, [], () => {
88
const testName = "integrated-terminal"
99
test.beforeAll(async () => {
1010
await clean(testName)

0 commit comments

Comments
 (0)