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:
@@ -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