mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: replace eslint with biome (#14263)
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect } from "@playwright/test";
|
||||
import { formatDuration, intervalToDuration } from "date-fns";
|
||||
import { type DeploymentConfig, API } from "api/api";
|
||||
import { API, type DeploymentConfig } from "api/api";
|
||||
import type { SerpentOption } from "api/typesGenerated";
|
||||
import { formatDuration, intervalToDuration } from "date-fns";
|
||||
import { coderPort } from "./constants";
|
||||
import { findSessionToken, randomName } from "./helpers";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
|
||||
export const coderMain = path.join(__dirname, "../../enterprise/cmd/coder");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
import { type Page, expect } from "@playwright/test";
|
||||
|
||||
type PollingOptions = { timeout?: number; intervals?: number[] };
|
||||
|
||||
@@ -11,7 +11,10 @@ export const expectUrl = expect.extend({
|
||||
let pass: boolean;
|
||||
try {
|
||||
await expect
|
||||
.poll(() => (actual = new URL(page.url()).pathname), options)
|
||||
.poll(() => {
|
||||
actual = new URL(page.url()).pathname;
|
||||
return actual;
|
||||
}, options)
|
||||
.toBe(expected);
|
||||
pass = true;
|
||||
} catch {
|
||||
@@ -24,11 +27,11 @@ export const expectUrl = expect.extend({
|
||||
actual,
|
||||
expected,
|
||||
message: () =>
|
||||
"The page does not have the expected URL pathname.\n" +
|
||||
`Expected: ${this.isNot ? "not" : ""}${this.utils.printExpected(
|
||||
`The page does not have the expected URL pathname.\nExpected: ${
|
||||
this.isNot ? "not" : ""
|
||||
}${this.utils.printExpected(
|
||||
expected,
|
||||
)}\n` +
|
||||
`Actual: ${this.utils.printReceived(actual)}`,
|
||||
)}\nActual: ${this.utils.printReceived(actual)}`,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
+36
-42
@@ -1,16 +1,16 @@
|
||||
import { type BrowserContext, expect, type Page, test } from "@playwright/test";
|
||||
import { type ChildProcess, exec, spawn } from "child_process";
|
||||
import { randomUUID } from "crypto";
|
||||
import express from "express";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import path from "path";
|
||||
import * as ssh from "ssh2";
|
||||
import { Duplex } from "stream";
|
||||
import { type ChildProcess, exec, spawn } from "node:child_process";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import path from "node:path";
|
||||
import { Duplex } from "node:stream";
|
||||
import { type BrowserContext, type Page, expect, test } from "@playwright/test";
|
||||
import { API } from "api/api";
|
||||
import type {
|
||||
WorkspaceBuildParameter,
|
||||
UpdateTemplateMeta,
|
||||
WorkspaceBuildParameter,
|
||||
} from "api/typesGenerated";
|
||||
import express from "express";
|
||||
import capitalize from "lodash/capitalize";
|
||||
import * as ssh from "ssh2";
|
||||
import { TarWriter } from "utils/tar";
|
||||
import {
|
||||
agentPProfPort,
|
||||
@@ -26,13 +26,13 @@ import {
|
||||
Agent,
|
||||
type App,
|
||||
AppSharingLevel,
|
||||
type ApplyComplete,
|
||||
type ExternalAuthProviderResource,
|
||||
type ParseComplete,
|
||||
type PlanComplete,
|
||||
type ApplyComplete,
|
||||
type Resource,
|
||||
Response,
|
||||
type RichParameter,
|
||||
type ExternalAuthProviderResource,
|
||||
} from "./provisionerGenerated";
|
||||
|
||||
// requiresEnterpriseLicense will skip the test if we're not running with an enterprise license
|
||||
@@ -88,7 +88,7 @@ export const createWorkspace = async (
|
||||
|
||||
await page.getByTestId("form-submit").click();
|
||||
|
||||
await expectUrl(page).toHavePathName("/@admin/" + name);
|
||||
await expectUrl(page).toHavePathName(`/@admin/${name}`);
|
||||
|
||||
await page.waitForSelector("*[data-testid='build-status'] >> text=Running", {
|
||||
state: "visible",
|
||||
@@ -102,7 +102,7 @@ export const verifyParameters = async (
|
||||
richParameters: RichParameter[],
|
||||
expectedBuildParameters: WorkspaceBuildParameter[],
|
||||
) => {
|
||||
await page.goto("/@admin/" + workspaceName + "/settings/parameters", {
|
||||
await page.goto(`/@admin/${workspaceName}/settings/parameters`, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
await expectUrl(page).toHavePathName(
|
||||
@@ -120,7 +120,7 @@ export const verifyParameters = async (
|
||||
}
|
||||
|
||||
const parameterLabel = await page.waitForSelector(
|
||||
"[data-testid='parameter-field-" + richParameter.name + "']",
|
||||
`[data-testid='parameter-field-${richParameter.name}']`,
|
||||
{ state: "visible" },
|
||||
);
|
||||
|
||||
@@ -128,17 +128,13 @@ export const verifyParameters = async (
|
||||
|
||||
if (richParameter.type === "bool") {
|
||||
const parameterField = await parameterLabel.waitForSelector(
|
||||
"[data-testid='parameter-field-bool'] .MuiRadio-root.Mui-checked" +
|
||||
muiDisabled +
|
||||
" input",
|
||||
`[data-testid='parameter-field-bool'] .MuiRadio-root.Mui-checked${muiDisabled} input`,
|
||||
);
|
||||
const value = await parameterField.inputValue();
|
||||
expect(value).toEqual(buildParameter.value);
|
||||
} else if (richParameter.options.length > 0) {
|
||||
const parameterField = await parameterLabel.waitForSelector(
|
||||
"[data-testid='parameter-field-options'] .MuiRadio-root.Mui-checked" +
|
||||
muiDisabled +
|
||||
" input",
|
||||
`[data-testid='parameter-field-options'] .MuiRadio-root.Mui-checked${muiDisabled} input`,
|
||||
);
|
||||
const value = await parameterField.inputValue();
|
||||
expect(value).toEqual(buildParameter.value);
|
||||
@@ -147,7 +143,7 @@ export const verifyParameters = async (
|
||||
} else {
|
||||
// text or number
|
||||
const parameterField = await parameterLabel.waitForSelector(
|
||||
"[data-testid='parameter-field-text'] input" + muiDisabled,
|
||||
`[data-testid='parameter-field-text'] input${muiDisabled}`,
|
||||
);
|
||||
const value = await parameterField.inputValue();
|
||||
expect(value).toEqual(buildParameter.value);
|
||||
@@ -266,7 +262,7 @@ export const sshIntoWorkspace = async (
|
||||
};
|
||||
|
||||
export const stopWorkspace = async (page: Page, workspaceName: string) => {
|
||||
await page.goto("/@admin/" + workspaceName, {
|
||||
await page.goto(`/@admin/${workspaceName}`, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
await expectUrl(page).toHavePathName(`/@admin/${workspaceName}`);
|
||||
@@ -283,9 +279,9 @@ export const buildWorkspaceWithParameters = async (
|
||||
workspaceName: string,
|
||||
richParameters: RichParameter[] = [],
|
||||
buildParameters: WorkspaceBuildParameter[] = [],
|
||||
confirm: boolean = false,
|
||||
confirm = false,
|
||||
) => {
|
||||
await page.goto("/@admin/" + workspaceName, {
|
||||
await page.goto(`/@admin/${workspaceName}`, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
await expectUrl(page).toHavePathName(`/@admin/${workspaceName}`);
|
||||
@@ -321,7 +317,7 @@ export const downloadCoderVersion = async (
|
||||
version = version.slice(1);
|
||||
}
|
||||
|
||||
const binaryName = "coder-e2e-" + version;
|
||||
const binaryName = `coder-e2e-${version}`;
|
||||
const tempDir = "/tmp/coder-e2e-cache";
|
||||
// The install script adds `./bin` automatically to the path :shrug:
|
||||
const binaryPath = path.join(tempDir, "bin", binaryName);
|
||||
@@ -367,7 +363,7 @@ export const downloadCoderVersion = async (
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error("install.sh failed with code " + code));
|
||||
reject(new Error(`install.sh failed with code ${code}`));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -385,8 +381,8 @@ export const startAgentWithCommand = async (
|
||||
...process.env,
|
||||
CODER_AGENT_URL: `http://localhost:${coderPort}`,
|
||||
CODER_AGENT_TOKEN: token,
|
||||
CODER_AGENT_PPROF_ADDRESS: "127.0.0.1:" + agentPProfPort,
|
||||
CODER_AGENT_PROMETHEUS_ADDRESS: "127.0.0.1:" + prometheusPort,
|
||||
CODER_AGENT_PPROF_ADDRESS: `127.0.0.1:${agentPProfPort}`,
|
||||
CODER_AGENT_PROMETHEUS_ADDRESS: `127.0.0.1:${prometheusPort}`,
|
||||
},
|
||||
});
|
||||
cp.stdout.on("data", (data: Buffer) => {
|
||||
@@ -406,7 +402,7 @@ export const startAgentWithCommand = async (
|
||||
return cp;
|
||||
};
|
||||
|
||||
export const stopAgent = async (cp: ChildProcess, goRun: boolean = true) => {
|
||||
export const stopAgent = async (cp: ChildProcess, goRun = true) => {
|
||||
// When the web server is started with `go run`, it spawns a child process with coder server.
|
||||
// `pkill -P` terminates child processes belonging the same group as `go run`.
|
||||
// The command `kill` is used to terminate a web server started as a standalone binary.
|
||||
@@ -415,7 +411,7 @@ export const stopAgent = async (cp: ChildProcess, goRun: boolean = true) => {
|
||||
throw new Error(`exec error: ${JSON.stringify(error)}`);
|
||||
}
|
||||
});
|
||||
await waitUntilUrlIsNotResponding("http://localhost:" + prometheusPort);
|
||||
await waitUntilUrlIsNotResponding(`http://localhost:${prometheusPort}`);
|
||||
};
|
||||
|
||||
export const waitUntilUrlIsNotResponding = async (url: string) => {
|
||||
@@ -555,7 +551,7 @@ const createTemplateVersionTar = async (
|
||||
try {
|
||||
Agent.encode(agentResource);
|
||||
} catch (e) {
|
||||
let m = `Error: agentResource encode failed, missing defaults?`;
|
||||
let m = "Error: agentResource encode failed, missing defaults?";
|
||||
if (e instanceof Error) {
|
||||
if (!e.stack?.includes(e.message)) {
|
||||
m += `\n${e.name}: ${e.message}`;
|
||||
@@ -632,7 +628,9 @@ export class Awaiter {
|
||||
private callback?: () => void;
|
||||
|
||||
constructor() {
|
||||
this.promise = new Promise((r) => (this.callback = r));
|
||||
this.promise = new Promise((r) => {
|
||||
this.callback = r;
|
||||
});
|
||||
}
|
||||
|
||||
public done(): void {
|
||||
@@ -745,22 +743,18 @@ export const fillParameters = async (
|
||||
}
|
||||
|
||||
const parameterLabel = await page.waitForSelector(
|
||||
"[data-testid='parameter-field-" + richParameter.name + "']",
|
||||
`[data-testid='parameter-field-${richParameter.name}']`,
|
||||
{ state: "visible" },
|
||||
);
|
||||
|
||||
if (richParameter.type === "bool") {
|
||||
const parameterField = await parameterLabel.waitForSelector(
|
||||
"[data-testid='parameter-field-bool'] .MuiRadio-root input[value='" +
|
||||
buildParameter.value +
|
||||
"']",
|
||||
`[data-testid='parameter-field-bool'] .MuiRadio-root input[value='${buildParameter.value}']`,
|
||||
);
|
||||
await parameterField.click();
|
||||
} else if (richParameter.options.length > 0) {
|
||||
const parameterField = await parameterLabel.waitForSelector(
|
||||
"[data-testid='parameter-field-options'] .MuiRadio-root input[value='" +
|
||||
buildParameter.value +
|
||||
"']",
|
||||
`[data-testid='parameter-field-options'] .MuiRadio-root input[value='${buildParameter.value}']`,
|
||||
);
|
||||
await parameterField.click();
|
||||
} else if (richParameter.type === "list(string)") {
|
||||
@@ -856,7 +850,7 @@ export const updateWorkspace = async (
|
||||
richParameters: RichParameter[] = [],
|
||||
buildParameters: WorkspaceBuildParameter[] = [],
|
||||
) => {
|
||||
await page.goto("/@admin/" + workspaceName, {
|
||||
await page.goto(`/@admin/${workspaceName}`, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
await expectUrl(page).toHavePathName(`/@admin/${workspaceName}`);
|
||||
@@ -878,7 +872,7 @@ export const updateWorkspaceParameters = async (
|
||||
richParameters: RichParameter[] = [],
|
||||
buildParameters: WorkspaceBuildParameter[] = [],
|
||||
) => {
|
||||
await page.goto("/@admin/" + workspaceName + "/settings/parameters", {
|
||||
await page.goto(`/@admin/${workspaceName}/settings/parameters`, {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
await expectUrl(page).toHavePathName(
|
||||
@@ -897,7 +891,7 @@ export async function openTerminalWindow(
|
||||
page: Page,
|
||||
context: BrowserContext,
|
||||
workspaceName: string,
|
||||
agentName: string = "dev",
|
||||
agentName = "dev",
|
||||
): Promise<Page> {
|
||||
// Wait for the web terminal to open in a new tab
|
||||
const pagePromise = context.waitForEvent("page");
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import http from "node:http";
|
||||
import type { BrowserContext, Page } from "@playwright/test";
|
||||
import http from "http";
|
||||
import { coderPort, gitAuth } from "./constants";
|
||||
|
||||
export const beforeCoderTest = async (page: Page) => {
|
||||
// eslint-disable-next-line no-console -- Show everything that was printed with console.log()
|
||||
page.on("console", (msg) => console.log("[onConsole] " + msg.text()));
|
||||
page.on("console", (msg) => console.log(`[onConsole] ${msg.text()}`));
|
||||
|
||||
page.on("request", (request) => {
|
||||
if (!isApiCall(request.url())) {
|
||||
|
||||
@@ -132,7 +132,7 @@ export const seventhParameter: RichParameter = {
|
||||
// It helps to avoid cross-test interference when user-auto-fill triggers on
|
||||
// the same parameter name.
|
||||
export const randParamName = (p: RichParameter): RichParameter => {
|
||||
const name = p.name + "_" + Math.random().toString(36).substring(7);
|
||||
const name = `${p.name}_${Math.random().toString(36).substring(7)}`;
|
||||
return { ...p, name: name };
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { execSync } from "node:child_process";
|
||||
import * as path from "node:path";
|
||||
import { defineConfig } from "@playwright/test";
|
||||
import { execSync } from "child_process";
|
||||
import * as path from "path";
|
||||
import {
|
||||
coderMain,
|
||||
coderPort,
|
||||
@@ -38,14 +38,15 @@ try {
|
||||
}
|
||||
|
||||
if (!hasTerraform || !hasDocker) {
|
||||
const msg =
|
||||
"Terraform provisioners require docker & terraform binaries to function. \n" +
|
||||
(hasTerraform
|
||||
const msg = `Terraform provisioners require docker & terraform binaries to function. \n${
|
||||
hasTerraform
|
||||
? ""
|
||||
: "\tThe `terraform` executable is not present in the runtime environment.\n") +
|
||||
(hasDocker
|
||||
: "\tThe `terraform` executable is not present in the runtime environment.\n"
|
||||
}${
|
||||
hasDocker
|
||||
? ""
|
||||
: "\tThe `docker` executable is not present in the runtime environment.\n");
|
||||
: "\tThe `docker` executable is not present in the runtime environment.\n"
|
||||
}`;
|
||||
throw new Error(msg);
|
||||
}
|
||||
|
||||
@@ -96,7 +97,7 @@ export default defineConfig({
|
||||
"--provisioner-daemons 10",
|
||||
// TODO: Enable some terraform provisioners
|
||||
`--provisioner-types=echo${requireTerraformTests ? ",terraform" : ""}`,
|
||||
`--provisioner-daemons=10`,
|
||||
"--provisioner-daemons=10",
|
||||
"--web-terminal-renderer=dom",
|
||||
"--pprof-enable",
|
||||
]
|
||||
@@ -146,7 +147,7 @@ export default defineConfig({
|
||||
gitAuth.webPort,
|
||||
gitAuth.validatePath,
|
||||
),
|
||||
CODER_PPROF_ADDRESS: "127.0.0.1:" + coderdPProfPort,
|
||||
CODER_PPROF_ADDRESS: `127.0.0.1:${coderdPProfPort}`,
|
||||
CODER_EXPERIMENTS: `multi-organization,${e2eFakeExperiment1},${e2eFakeExperiment2}`,
|
||||
|
||||
// Tests for Deployment / User Authentication / OIDC
|
||||
|
||||
+2
-5
@@ -1,4 +1,4 @@
|
||||
import { spawn, type ChildProcess, exec } from "child_process";
|
||||
import { type ChildProcess, exec, spawn } from "node:child_process";
|
||||
import { coderMain, coderPort, workspaceProxyPort } from "./constants";
|
||||
import { waitUntilUrlIsNotResponding } from "./helpers";
|
||||
|
||||
@@ -28,10 +28,7 @@ export const startWorkspaceProxy = async (
|
||||
return cp;
|
||||
};
|
||||
|
||||
export const stopWorkspaceProxy = async (
|
||||
cp: ChildProcess,
|
||||
goRun: boolean = true,
|
||||
) => {
|
||||
export const stopWorkspaceProxy = async (cp: ChildProcess, goRun = true) => {
|
||||
exec(goRun ? `pkill -P ${cp.pid}` : `kill ${cp.pid}`, (error) => {
|
||||
if (error) {
|
||||
throw new Error(`exec error: ${JSON.stringify(error)}`);
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as fs from "node:fs/promises";
|
||||
import type { Writable } from "node:stream";
|
||||
/* eslint-disable no-console -- Logging is sort of the whole point here */
|
||||
import type {
|
||||
FullConfig,
|
||||
Suite,
|
||||
TestCase,
|
||||
TestResult,
|
||||
FullResult,
|
||||
Reporter,
|
||||
Suite,
|
||||
TestCase,
|
||||
TestError,
|
||||
TestResult,
|
||||
} from "@playwright/test/reporter";
|
||||
import * as fs from "fs/promises";
|
||||
import type { Writable } from "stream";
|
||||
import { API } from "api/api";
|
||||
import { coderdPProfPort, enterpriseLicense } from "./constants";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import * as http from "node:http";
|
||||
import { test } from "@playwright/test";
|
||||
import { randomUUID } from "crypto";
|
||||
import * as http from "http";
|
||||
import {
|
||||
createTemplate,
|
||||
createWorkspace,
|
||||
@@ -37,7 +37,7 @@ test("app", async ({ context, page }) => {
|
||||
token,
|
||||
apps: [
|
||||
{
|
||||
url: "http://localhost:" + addr.port,
|
||||
url: `http://localhost:${addr.port}`,
|
||||
displayName: appName,
|
||||
order: 0,
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { type DeploymentConfig, API } from "api/api";
|
||||
import { API, type DeploymentConfig } from "api/api";
|
||||
import {
|
||||
findConfigOption,
|
||||
setupApiCalls,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect, type Page } from "@playwright/test";
|
||||
import { type Page, expect, test } from "@playwright/test";
|
||||
import { API } from "api/api";
|
||||
import { setupApiCalls } from "../../api";
|
||||
import { coderPort, workspaceProxyPort } from "../../constants";
|
||||
@@ -23,7 +23,7 @@ test("default proxy is online", async ({ page }) => {
|
||||
const workspaceProxyStatus = workspaceProxyPrimary.locator("td.status span");
|
||||
|
||||
await expect(workspaceProxyName).toHaveText("Default");
|
||||
await expect(workspaceProxyURL).toHaveText("http://localhost:" + coderPort);
|
||||
await expect(workspaceProxyURL).toHaveText(`http://localhost:${coderPort}`);
|
||||
await expect(workspaceProxyStatus).toHaveText("Healthy");
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ test("custom proxy is online", async ({ page }) => {
|
||||
waitUntil: "domcontentloaded",
|
||||
});
|
||||
|
||||
const workspaceProxy = page.locator(`table.MuiTable-root tr`, {
|
||||
const workspaceProxy = page.locator("table.MuiTable-root tr", {
|
||||
hasText: proxyName,
|
||||
});
|
||||
|
||||
@@ -82,7 +82,7 @@ const waitUntilWorkspaceProxyIsHealthy = async (
|
||||
while (retries < maxRetries) {
|
||||
await page.reload();
|
||||
|
||||
const workspaceProxy = page.locator(`table.MuiTable-root tr`, {
|
||||
const workspaceProxy = page.locator("table.MuiTable-root tr", {
|
||||
hasText: proxyName,
|
||||
});
|
||||
const workspaceProxyStatus = workspaceProxy.locator("td.status span");
|
||||
|
||||
@@ -26,8 +26,7 @@ test.beforeAll(async ({ baseURL }) => {
|
||||
});
|
||||
srv.use(gitAuth.authPath, (req, res) => {
|
||||
res.redirect(
|
||||
`${baseURL}/external-auth/${gitAuth.webProvider}/callback?code=1234&state=` +
|
||||
req.query.state,
|
||||
`${baseURL}/external-auth/${gitAuth.webProvider}/callback?code=1234&state=${req.query.state}`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import {
|
||||
createGroup,
|
||||
createUser,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { createUser, getCurrentOrgId, setupApiCalls } from "../../api";
|
||||
import { requiresEnterpriseLicense } from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { randomName, requiresEnterpriseLicense } from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { createGroup, getCurrentOrgId, setupApiCalls } from "../../api";
|
||||
import { requiresEnterpriseLicense } from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { createGroup, getCurrentOrgId, setupApiCalls } from "../../api";
|
||||
import { requiresEnterpriseLicense } from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { API } from "api/api";
|
||||
import {
|
||||
createGroup,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { setupApiCalls } from "../api";
|
||||
import { expectUrl } from "../expectUrl";
|
||||
import { requiresEnterpriseLicense } from "../helpers";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { test } from "@playwright/test";
|
||||
import { randomUUID } from "crypto";
|
||||
import {
|
||||
createTemplate,
|
||||
createWorkspace,
|
||||
@@ -16,7 +16,7 @@ const agentVersion = "v2.12.1";
|
||||
|
||||
test.beforeEach(({ page }) => beforeCoderTest(page));
|
||||
|
||||
test("ssh with agent " + agentVersion, async ({ page }) => {
|
||||
test(`ssh with agent ${agentVersion}`, async ({ page }) => {
|
||||
test.setTimeout(40_000); // This is a slow test, 20s may not be enough on Mac.
|
||||
|
||||
const token = randomUUID();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { test } from "@playwright/test";
|
||||
import { randomUUID } from "crypto";
|
||||
import {
|
||||
createTemplate,
|
||||
createWorkspace,
|
||||
@@ -16,7 +16,7 @@ const clientVersion = "v0.27.0";
|
||||
|
||||
test.beforeEach(({ page }) => beforeCoderTest(page));
|
||||
|
||||
test("ssh with client " + clientVersion, async ({ page }) => {
|
||||
test(`ssh with client ${clientVersion}`, async ({ page }) => {
|
||||
const token = randomUUID();
|
||||
const template = await createTemplate(page, {
|
||||
apply: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
test.beforeEach(({ page }) => beforeCoderTest(page));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { randomName } from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { createUser, getCurrentOrgId, setupApiCalls } from "../../api";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { test } from "@playwright/test";
|
||||
import { randomUUID } from "crypto";
|
||||
import {
|
||||
createTemplate,
|
||||
createWorkspace,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { username } from "../../constants";
|
||||
import {
|
||||
createTemplate,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { expect, test } from "@playwright/test";
|
||||
import {
|
||||
StarterTemplates,
|
||||
createTemplate,
|
||||
@@ -10,14 +10,14 @@ import {
|
||||
} from "../../helpers";
|
||||
import { beforeCoderTest } from "../../hooks";
|
||||
import {
|
||||
secondParameter,
|
||||
fourthParameter,
|
||||
fifthParameter,
|
||||
firstParameter,
|
||||
thirdParameter,
|
||||
fourthParameter,
|
||||
randParamName,
|
||||
secondParameter,
|
||||
seventhParameter,
|
||||
sixthParameter,
|
||||
randParamName,
|
||||
thirdParameter,
|
||||
} from "../../parameters";
|
||||
import type { RichParameter } from "../../provisionerGenerated";
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ import { beforeCoderTest } from "../../hooks";
|
||||
import {
|
||||
fifthParameter,
|
||||
firstParameter,
|
||||
secondBuildOption,
|
||||
secondParameter,
|
||||
sixthParameter,
|
||||
secondBuildOption,
|
||||
} from "../../parameters";
|
||||
import type { RichParameter } from "../../provisionerGenerated";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user