Skip to content

Commit a022d14

Browse files
committed
Fixes
1 parent 05f2ee1 commit a022d14

File tree

5 files changed

+3
-43
lines changed

5 files changed

+3
-43
lines changed

site/e2e/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Default port from the server
22
export const defaultPort = 3000
3+
export const defaultEndpoint = `localhost:${defaultPort}`
34

45
// Credentials for the first user
56
export const username = "admin"

site/e2e/helpers.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
1-
import { Page } from "@playwright/test"
21
import path from "path"
32

4-
export const buttons = {
5-
starterTemplates: "Starter templates",
6-
dockerTemplate: "Develop in Docker",
7-
useTemplate: "Use template",
8-
createTemplate: "Create template",
9-
createWorkspace: "Create workspace",
10-
submitCreateWorkspace: "Create workspace",
11-
stopWorkspace: "Stop",
12-
startWorkspace: "Start",
13-
}
14-
15-
export const clickButton = async (page: Page, name: string): Promise<void> => {
16-
await page.getByRole("button", { name, exact: true }).click()
17-
}
18-
19-
export const fillInput = async (
20-
page: Page,
21-
label: string,
22-
value: string,
23-
): Promise<void> => {
24-
await page.fill(`text=${label}`, value)
25-
}
26-
273
const statesDir = path.join(__dirname, "./states")
284

295
export const getStatePath = (name: string): string => {

site/e2e/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { PlaywrightTestConfig } from "@playwright/test"
22
import path from "path"
3-
import { defaultPort } from "./constants"
3+
import { defaultPort, defaultEndpoint } from "./constants"
44

55
const port = process.env.CODER_E2E_PORT
66
? Number(process.env.CODER_E2E_PORT)
@@ -12,7 +12,7 @@ const config: PlaywrightTestConfig = {
1212
testDir: "tests",
1313
globalSetup: require.resolve("./globalSetup"),
1414
use: {
15-
baseURL: `http://localhost:${port}`,
15+
baseURL: `http://${defaultEndpoint}`,
1616
video: {
1717
mode: "retain-on-failure",
1818
size: { width: 1280, height: 768 },

site/e2e/pom/SignInPage.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

site/e2e/states/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)